mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Pass a &GlobalScope to WebIDL static methods and constructors
This commit is contained in:
parent
1fd470889d
commit
19108aa330
56 changed files with 198 additions and 245 deletions
|
@ -6,7 +6,6 @@ use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
|
|||
use dom::bindings::codegen::Bindings::MessageEventBinding;
|
||||
use dom::bindings::codegen::Bindings::MessageEventBinding::MessageEventMethods;
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::reflector::reflect_dom_object;
|
||||
|
@ -61,14 +60,14 @@ impl MessageEvent {
|
|||
ev
|
||||
}
|
||||
|
||||
pub fn Constructor(global: GlobalRef,
|
||||
pub fn Constructor(global: &GlobalScope,
|
||||
type_: DOMString,
|
||||
init: &MessageEventBinding::MessageEventInit)
|
||||
-> Fallible<Root<MessageEvent>> {
|
||||
// Dictionaries need to be rooted
|
||||
// https://github.com/servo/servo/issues/6381
|
||||
rooted!(in(global.get_cx()) let data = init.data);
|
||||
let ev = MessageEvent::new(global.as_global_scope(),
|
||||
let ev = MessageEvent::new(global,
|
||||
Atom::from(type_),
|
||||
init.parent.bubbles,
|
||||
init.parent.cancelable,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue