mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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
|
@ -7,7 +7,6 @@ use dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
|
|||
use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
|
||||
use dom::bindings::codegen::Bindings::FileReaderBinding::{self, FileReaderConstants, FileReaderMethods};
|
||||
use dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::{JS, MutNullableHeap, Root};
|
||||
use dom::bindings::refcounted::Trusted;
|
||||
|
@ -94,8 +93,8 @@ impl FileReader {
|
|||
global, FileReaderBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn Constructor(global: GlobalRef) -> Fallible<Root<FileReader>> {
|
||||
Ok(FileReader::new(global.as_global_scope()))
|
||||
pub fn Constructor(global: &GlobalScope) -> Fallible<Root<FileReader>> {
|
||||
Ok(FileReader::new(global))
|
||||
}
|
||||
|
||||
//https://w3c.github.io/FileAPI/#dfn-error-steps
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue