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

@ -104,12 +104,12 @@ impl Event {
Temporary::from_rooted(event.r())
}
pub fn Constructor(global: &GlobalRef,
pub fn Constructor(global: GlobalRef,
type_: DOMString,
init: &EventBinding::EventInit) -> Fallible<Temporary<Event>> {
let bubbles = if init.bubbles { EventBubbles::Bubbles } else { EventBubbles::DoesNotBubble };
let cancelable = if init.cancelable { EventCancelable::Cancelable } else { EventCancelable::NotCancelable };
Ok(Event::new(*global, type_, bubbles, cancelable))
Ok(Event::new(global, type_, bubbles, cancelable))
}
#[inline]