Bug #1820, add the optional "type" parameter to Blob

This commit is contained in:
Shing Lyu 2014-12-22 23:45:00 +08:00
parent 37a97f3273
commit 6df9b7fd3a
6 changed files with 66 additions and 51 deletions

View file

@ -59,7 +59,7 @@ impl<'a> TestBindingMethods for JSRef<'a, TestBinding> {
fn SetEnumAttribute(self, _: TestEnum) {}
fn InterfaceAttribute(self) -> Temporary<Blob> {
let global = self.global.root();
Blob::new(&global.root_ref(), None)
Blob::new(&global.root_ref(), None, "")
}
fn SetInterfaceAttribute(self, _: JSRef<Blob>) {}
fn UnionAttribute(self) -> HTMLElementOrLong { eLong(0) }
@ -99,7 +99,7 @@ impl<'a> TestBindingMethods for JSRef<'a, TestBinding> {
fn GetEnumAttributeNullable(self) -> Option<TestEnum> { Some(_empty) }
fn GetInterfaceAttributeNullable(self) -> Option<Temporary<Blob>> {
let global = self.global.root();
Some(Blob::new(&global.root_ref(), None))
Some(Blob::new(&global.root_ref(), None, ""))
}
fn SetInterfaceAttributeNullable(self, _: Option<JSRef<Blob>>) {}
fn GetUnionAttributeNullable(self) -> Option<HTMLElementOrLong> { Some(eLong(0)) }
@ -123,7 +123,7 @@ impl<'a> TestBindingMethods for JSRef<'a, TestBinding> {
fn ReceiveEnum(self) -> TestEnum { _empty }
fn ReceiveInterface(self) -> Temporary<Blob> {
let global = self.global.root();
Blob::new(&global.root_ref(), None)
Blob::new(&global.root_ref(), None, "")
}
fn ReceiveAny(self, _: *mut JSContext) -> JSVal { NullValue() }
fn ReceiveUnion(self) -> HTMLElementOrLong { eLong(0) }
@ -145,7 +145,7 @@ impl<'a> TestBindingMethods for JSRef<'a, TestBinding> {
fn ReceiveNullableEnum(self) -> Option<TestEnum> { Some(_empty) }
fn ReceiveNullableInterface(self) -> Option<Temporary<Blob>> {
let global = self.global.root();
Some(Blob::new(&global.root_ref(), None))
Some(Blob::new(&global.root_ref(), None, ""))
}
fn ReceiveNullableUnion(self) -> Option<HTMLElementOrLong> { Some(eLong(0)) }
fn ReceiveNullableUnion2(self) -> Option<EventOrString> { Some(eString("".into_string())) }