diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-12-15 10:45:45 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-12-15 10:45:45 +0100 |
commit | ba891e49f8109226781fc6eb4dae0699529ce332 (patch) | |
tree | c8a3f05d5fb707ca31d6d3a67cb860609942b5ed /components/script/dom/file.rs | |
parent | 1bc2c8a6397382b4db8fb09582434f4798d43868 (diff) | |
download | servo-ba891e49f8109226781fc6eb4dae0699529ce332.tar.gz servo-ba891e49f8109226781fc6eb4dae0699529ce332.zip |
Correctly set the BlobType for File objects.
Diffstat (limited to 'components/script/dom/file.rs')
-rw-r--r-- | components/script/dom/file.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/components/script/dom/file.rs b/components/script/dom/file.rs index 52fb22abd12..985386321c3 100644 --- a/components/script/dom/file.rs +++ b/components/script/dom/file.rs @@ -14,22 +14,21 @@ use servo_util::str::DOMString; pub struct File { blob: Blob, name: DOMString, - type_: BlobType } impl File { - fn new_inherited(global: &GlobalRef, _file_bits: JSRef<Blob>, name: DOMString) -> File { + fn new_inherited(global: &GlobalRef, type_: BlobType, + _file_bits: JSRef<Blob>, name: DOMString) -> File { File { - blob: Blob::new_inherited(global, None), + blob: Blob::new_inherited(global, type_, None), name: name, - type_: FileTypeId } // 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> { - reflect_dom_object(box File::new_inherited(global, file_bits, name), + reflect_dom_object(box File::new_inherited(global, FileTypeId, file_bits, name), *global, FileBinding::Wrap) } |