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/blob.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/blob.rs')
-rw-r--r-- | components/script/dom/blob.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/components/script/dom/blob.rs b/components/script/dom/blob.rs index c472554357c..ad8e9a5d898 100644 --- a/components/script/dom/blob.rs +++ b/components/script/dom/blob.rs @@ -7,7 +7,6 @@ use dom::bindings::codegen::Bindings::BlobBinding; use dom::bindings::codegen::Bindings::BlobBinding::BlobMethods; use dom::bindings::codegen::UnionTypes::BlobOrString; use dom::bindings::error::{Error, Fallible}; -use dom::bindings::global::GlobalRef; use dom::bindings::js::{JS, Root}; use dom::bindings::reflector::{Reflectable, Reflector, reflect_dom_object}; use dom::bindings::str::DOMString; @@ -121,7 +120,7 @@ impl Blob { } // https://w3c.github.io/FileAPI/#constructorBlob - pub fn Constructor(global: GlobalRef, + pub fn Constructor(global: &GlobalScope, blobParts: Option<Vec<BlobOrString>>, blobPropertyBag: &BlobBinding::BlobPropertyBag) -> Fallible<Root<Blob>> { @@ -134,7 +133,7 @@ impl Blob { } }; - Ok(Blob::new(global.as_global_scope(), BlobImpl::new_from_bytes(bytes), blobPropertyBag.type_.to_string())) + Ok(Blob::new(global, BlobImpl::new_from_bytes(bytes), blobPropertyBag.type_.to_string())) } /// Get a slice to inner data, this might incur synchronous read and caching |