diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-04 00:54:05 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-06 21:35:49 +0200 |
commit | 19108aa3305df2172208c83500f5ac67d2dee104 (patch) | |
tree | d65138e8d1a8723cb30a56f8bd117f580f39438c /components/script/dom/file.rs | |
parent | 1fd470889dd9b4e6c3a871b6b40b50e30114443d (diff) | |
download | servo-19108aa3305df2172208c83500f5ac67d2dee104.tar.gz servo-19108aa3305df2172208c83500f5ac67d2dee104.zip |
Pass a &GlobalScope to WebIDL static methods and constructors
Diffstat (limited to 'components/script/dom/file.rs')
-rw-r--r-- | components/script/dom/file.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/components/script/dom/file.rs b/components/script/dom/file.rs index 6ee2f0c3771..dba94a85e50 100644 --- a/components/script/dom/file.rs +++ b/components/script/dom/file.rs @@ -6,7 +6,6 @@ use dom::bindings::codegen::Bindings::FileBinding; use dom::bindings::codegen::Bindings::FileBinding::FileMethods; use dom::bindings::codegen::UnionTypes::BlobOrString; use dom::bindings::error::{Error, Fallible}; -use dom::bindings::global::GlobalRef; use dom::bindings::inheritance::Castable; use dom::bindings::js::Root; use dom::bindings::reflector::reflect_dom_object; @@ -59,7 +58,7 @@ impl File { } // https://w3c.github.io/FileAPI/#file-constructor - pub fn Constructor(global: GlobalRef, + pub fn Constructor(global: &GlobalScope, fileBits: Vec<BlobOrString>, filename: DOMString, filePropertyBag: &FileBinding::FilePropertyBag) @@ -76,11 +75,11 @@ impl File { // NOTE: Following behaviour might be removed in future, // see https://github.com/w3c/FileAPI/issues/41 let replaced_filename = DOMString::from_string(filename.replace("/", ":")); - Ok(File::new(global.as_global_scope(), - BlobImpl::new_from_bytes(bytes), - replaced_filename, - modified, - typeString)) + Ok(File::new(global, + BlobImpl::new_from_bytes(bytes), + replaced_filename, + modified, + typeString)) } pub fn name(&self) -> &DOMString { |