Fixes #4164 Make Constructor and new functions take GlobalRef by value

This commit is contained in:
Matt McCoy 2015-01-07 18:42:06 -05:00 committed by Matt McCoy
parent cf616b90a2
commit 85df7f0d6f
25 changed files with 61 additions and 61 deletions

View file

@ -48,13 +48,13 @@ impl ErrorEvent {
}
}
pub fn new_uninitialized(global: &GlobalRef) -> Temporary<ErrorEvent> {
pub fn new_uninitialized(global: GlobalRef) -> Temporary<ErrorEvent> {
reflect_dom_object(box ErrorEvent::new_inherited(EventTypeId::ErrorEvent),
*global,
global,
ErrorEventBinding::Wrap)
}
pub fn new(global: &GlobalRef,
pub fn new(global: GlobalRef,
type_: DOMString,
bubbles: EventBubbles,
cancelable: EventCancelable,
@ -75,7 +75,7 @@ impl ErrorEvent {
Temporary::from_rooted(ev.r())
}
pub fn Constructor(global: &GlobalRef,
pub fn Constructor(global: GlobalRef,
type_: DOMString,
init: &ErrorEventBinding::ErrorEventInit) -> Fallible<Temporary<ErrorEvent>>{
let msg = match init.message.as_ref() {