diff options
author | bors-servo <metajack+bors@gmail.com> | 2014-12-09 08:43:08 -0700 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2014-12-09 08:43:08 -0700 |
commit | d2a67abea9f6acd7b0ea29a852bf5029aef3f405 (patch) | |
tree | d2c401d4a30a3b9439c989846413abd434575e1d /components/script/dom/file.rs | |
parent | ef81fb13e73d8d8bbda80fbe52ee9d5a539bc519 (diff) | |
parent | f2885b8fc75d9c38ff4557d711e67d38bee20069 (diff) | |
download | servo-d2a67abea9f6acd7b0ea29a852bf5029aef3f405.tar.gz servo-d2a67abea9f6acd7b0ea29a852bf5029aef3f405.zip |
auto merge of #4108 : shinglyu/servo/blob, r=jdm
Let's build this incrementally. I implemented a `Blob` that can hold a `DOMString`, and has `size` attribute and `slice(...)` method. I'll finish the rest in later PRs.
Diffstat (limited to 'components/script/dom/file.rs')
-rw-r--r-- | components/script/dom/file.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/file.rs b/components/script/dom/file.rs index 26555755401..52fb22abd12 100644 --- a/components/script/dom/file.rs +++ b/components/script/dom/file.rs @@ -18,9 +18,9 @@ pub struct File { } impl File { - fn new_inherited(_file_bits: JSRef<Blob>, name: DOMString) -> File { + fn new_inherited(global: &GlobalRef, _file_bits: JSRef<Blob>, name: DOMString) -> File { File { - blob: Blob::new_inherited(), + blob: Blob::new_inherited(global, None), name: name, type_: FileTypeId } @@ -28,9 +28,9 @@ 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> { - reflect_dom_object(box File::new_inherited(file_bits, name), - global, + pub fn new(global: &GlobalRef, file_bits: JSRef<Blob>, name: DOMString) -> Temporary<File> { + reflect_dom_object(box File::new_inherited(global, file_bits, name), + *global, FileBinding::Wrap) } |