diff options
author | Michael Wu <mwu@mozilla.com> | 2015-04-06 19:27:56 -0400 |
---|---|---|
committer | Michael Wu <mwu@mozilla.com> | 2015-06-19 18:42:48 -0400 |
commit | 675267b7822d2d6c30c0e36fc22e0191b741b973 (patch) | |
tree | 640b22869e8a7eb7d5657df3074f0b0ccd528c29 /components/script/dom/file.rs | |
parent | a256f39796270cd3a5f40f33eaa4e407117b0cc6 (diff) | |
download | servo-675267b7822d2d6c30c0e36fc22e0191b741b973.tar.gz servo-675267b7822d2d6c30c0e36fc22e0191b741b973.zip |
Upgrade to SM 39
Diffstat (limited to 'components/script/dom/file.rs')
-rw-r--r-- | components/script/dom/file.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/file.rs b/components/script/dom/file.rs index a592d336fb0..b95072b841c 100644 --- a/components/script/dom/file.rs +++ b/components/script/dom/file.rs @@ -5,7 +5,7 @@ use dom::bindings::codegen::Bindings::FileBinding; use dom::bindings::codegen::Bindings::FileBinding::FileMethods; use dom::bindings::global::GlobalRef; -use dom::bindings::js::{JSRef, Temporary}; +use dom::bindings::js::Root; use dom::bindings::utils::reflect_dom_object; use dom::blob::{Blob, BlobTypeId}; use util::str::DOMString; @@ -18,7 +18,7 @@ pub struct File { impl File { fn new_inherited(global: GlobalRef, type_: BlobTypeId, - _file_bits: JSRef<Blob>, name: DOMString) -> File { + _file_bits: &Blob, name: DOMString) -> File { File { //TODO: get type from the underlying filesystem instead of "".to_string() blob: Blob::new_inherited(global, type_, None, ""), @@ -28,7 +28,7 @@ impl File { // the relevant subfields of file_bits should be copied over } - pub fn new(global: GlobalRef, file_bits: JSRef<Blob>, name: DOMString) -> Temporary<File> { + pub fn new(global: GlobalRef, file_bits: &Blob, name: DOMString) -> Root<File> { reflect_dom_object(box File::new_inherited(global, BlobTypeId::File, file_bits, name), global, FileBinding::Wrap) @@ -39,7 +39,7 @@ impl File { } } -impl<'a> FileMethods for JSRef<'a, File> { +impl<'a> FileMethods for &'a File { fn Name(self) -> DOMString { self.name.clone() } |