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/blob.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/blob.rs')
-rw-r--r-- | components/script/dom/blob.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/dom/blob.rs b/components/script/dom/blob.rs index b0d0b155821..cbe98b13a47 100644 --- a/components/script/dom/blob.rs +++ b/components/script/dom/blob.rs @@ -30,10 +30,11 @@ pub struct Blob { } impl Blob { - pub fn new_inherited(global: &GlobalRef, bytes: Option<Vec<u8>>) -> Blob { + pub fn new_inherited(global: &GlobalRef, type_: BlobType, + bytes: Option<Vec<u8>>) -> Blob { Blob { reflector_: Reflector::new(), - type_: BlobTypeId, + type_: type_, bytes: bytes, typeString: "".to_string(), global: GlobalField::from_rooted(global) @@ -42,7 +43,7 @@ impl Blob { } pub fn new(global: &GlobalRef, bytes: Option<Vec<u8>>) -> Temporary<Blob> { - reflect_dom_object(box Blob::new_inherited(global, bytes), + reflect_dom_object(box Blob::new_inherited(global, BlobTypeId, bytes), *global, BlobBinding::Wrap) } |