Correctly set the BlobType for File objects.

This commit is contained in:
Ms2ger 2014-12-15 10:45:45 +01:00
parent 1bc2c8a639
commit ba891e49f8
2 changed files with 8 additions and 8 deletions

View file

@ -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)
}