mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Make reflect_dom_object take a &GlobalScope
This commit is contained in:
parent
093b189b48
commit
fcb59d3057
132 changed files with 488 additions and 407 deletions
|
@ -8,8 +8,7 @@ use dom::bindings::global::GlobalRef;
|
|||
use dom::bindings::js::Root;
|
||||
use dom::bindings::reflector::reflect_dom_object;
|
||||
use dom::eventtarget::EventTarget;
|
||||
|
||||
|
||||
use dom::globalscope::GlobalScope;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct FileReaderSync {
|
||||
|
@ -23,12 +22,12 @@ impl FileReaderSync {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(global: GlobalRef) -> Root<FileReaderSync> {
|
||||
pub fn new(global: &GlobalScope) -> Root<FileReaderSync> {
|
||||
reflect_dom_object(box FileReaderSync::new_inherited(),
|
||||
global, FileReaderSyncBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn Constructor(global: GlobalRef) -> Fallible<Root<FileReaderSync>> {
|
||||
Ok(FileReaderSync::new(global))
|
||||
Ok(FileReaderSync::new(global.as_global_scope()))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue