diff options
author | Matt McCoy <mattnenterprise@yahoo.com> | 2015-01-08 11:16:55 -0500 |
---|---|---|
committer | Matt McCoy <matt.mccoy@threewide.com> | 2015-01-08 11:18:16 -0500 |
commit | 5a548431119b1bf8f45958f97df72c0cf35a2bea (patch) | |
tree | 179dff0ee71deb0bad960ae0aa8b717ab4fe3007 /components/script/dom/file.rs | |
parent | 85df7f0d6f4f66ad64130ecb09225bb94377737d (diff) | |
download | servo-5a548431119b1bf8f45958f97df72c0cf35a2bea.tar.gz servo-5a548431119b1bf8f45958f97df72c0cf35a2bea.zip |
Fixes #4164 Make file.rs Constructor and new functions take GlobalRef by value
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 3acedb43265..482b0aa9478 100644 --- a/components/script/dom/file.rs +++ b/components/script/dom/file.rs @@ -17,20 +17,20 @@ pub struct File { } impl File { - fn new_inherited(global: &GlobalRef, type_: BlobTypeId, + fn new_inherited(global: GlobalRef, type_: BlobTypeId, _file_bits: JSRef<Blob>, name: DOMString) -> File { File { //TODO: get type from the underlying filesystem instead of "".to_string() - blob: Blob::new_inherited(*global, type_, None, ""), + blob: Blob::new_inherited(global, type_, None, ""), name: name, } // XXXManishearth Once Blob is able to store data // 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: JSRef<Blob>, name: DOMString) -> Temporary<File> { reflect_dom_object(box File::new_inherited(global, BlobTypeId::File, file_bits, name), - *global, + global, FileBinding::Wrap) } |