aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/file.rs
diff options
context:
space:
mode:
authorShing Lyu <slyu@mozilla.com>2014-11-14 23:56:48 +0800
committerShing Lyu <shing.lyu@gmail.com>2014-12-09 22:52:19 +0800
commitf2885b8fc75d9c38ff4557d711e67d38bee20069 (patch)
treedb3fa793380e1966c1fe13ebb06d04b49d148ad5 /components/script/dom/file.rs
parentbdb3a2538b9f10aad4c911cc0118257d8311cd26 (diff)
downloadservo-f2885b8fc75d9c38ff4557d711e67d38bee20069.tar.gz
servo-f2885b8fc75d9c38ff4557d711e67d38bee20069.zip
Issue #1820 - Improve the Blob implementation
Diffstat (limited to 'components/script/dom/file.rs')
-rw-r--r--components/script/dom/file.rs10
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)
}