diff options
author | Zhen Zhang <izgzhen@gmail.com> | 2016-07-05 16:42:07 +0800 |
---|---|---|
committer | Zhen Zhang <izgzhen@gmail.com> | 2016-07-05 17:51:53 +0800 |
commit | ab14777312b6bc0e21736f907bc22364dea143d3 (patch) | |
tree | 9cd66fac8556e87da7b483785a8c8a27de1527ec /components/script/dom/testbinding.rs | |
parent | 1cba3b3e9835fffbae91ab9dac76ed1f75bcf5c7 (diff) | |
download | servo-ab14777312b6bc0e21736f907bc22364dea143d3.tar.gz servo-ab14777312b6bc0e21736f907bc22364dea143d3.zip |
Remove DataSlice, fix #12249
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r-- | components/script/dom/testbinding.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs index ffe8afc0b89..64fb6fb7578 100644 --- a/components/script/dom/testbinding.rs +++ b/components/script/dom/testbinding.rs @@ -101,7 +101,7 @@ impl TestBindingMethods for TestBinding { fn EnumAttribute(&self) -> TestEnum { TestEnum::_empty } fn SetEnumAttribute(&self, _: TestEnum) {} fn InterfaceAttribute(&self) -> Root<Blob> { - Blob::new(self.global().r(), BlobImpl::new_from_empty_slice(), "".to_owned()) + Blob::new(self.global().r(), BlobImpl::new_from_bytes(vec![]), "".to_owned()) } fn SetInterfaceAttribute(&self, _: &Blob) {} fn UnionAttribute(&self) -> HTMLElementOrLong { HTMLElementOrLong::Long(0) } @@ -179,7 +179,7 @@ impl TestBindingMethods for TestBinding { fn SetAttr_to_automatically_rename(&self, _: DOMString) {} fn GetEnumAttributeNullable(&self) -> Option<TestEnum> { Some(TestEnum::_empty) } fn GetInterfaceAttributeNullable(&self) -> Option<Root<Blob>> { - Some(Blob::new(self.global().r(), BlobImpl::new_from_empty_slice(), "".to_owned())) + Some(Blob::new(self.global().r(), BlobImpl::new_from_bytes(vec![]), "".to_owned())) } fn SetInterfaceAttributeNullable(&self, _: Option<&Blob>) {} fn GetInterfaceAttributeWeak(&self) -> Option<Root<URL>> { @@ -230,7 +230,7 @@ impl TestBindingMethods for TestBinding { fn ReceiveByteString(&self) -> ByteString { ByteString::new(vec!()) } fn ReceiveEnum(&self) -> TestEnum { TestEnum::_empty } fn ReceiveInterface(&self) -> Root<Blob> { - Blob::new(self.global().r(), BlobImpl::new_from_empty_slice(), "".to_owned()) + Blob::new(self.global().r(), BlobImpl::new_from_bytes(vec![]), "".to_owned()) } fn ReceiveAny(&self, _: *mut JSContext) -> JSVal { NullValue() } fn ReceiveObject(&self, _: *mut JSContext) -> *mut JSObject { panic!() } @@ -247,7 +247,7 @@ impl TestBindingMethods for TestBinding { } fn ReceiveSequence(&self) -> Vec<i32> { vec![1] } fn ReceiveInterfaceSequence(&self) -> Vec<Root<Blob>> { - vec![Blob::new(self.global().r(), BlobImpl::new_from_empty_slice(), "".to_owned())] + vec![Blob::new(self.global().r(), BlobImpl::new_from_bytes(vec![]), "".to_owned())] } fn ReceiveNullableBoolean(&self) -> Option<bool> { Some(false) } @@ -268,7 +268,7 @@ impl TestBindingMethods for TestBinding { fn ReceiveNullableByteString(&self) -> Option<ByteString> { Some(ByteString::new(vec!())) } fn ReceiveNullableEnum(&self) -> Option<TestEnum> { Some(TestEnum::_empty) } fn ReceiveNullableInterface(&self) -> Option<Root<Blob>> { - Some(Blob::new(self.global().r(), BlobImpl::new_from_empty_slice(), "".to_owned())) + Some(Blob::new(self.global().r(), BlobImpl::new_from_bytes(vec![]), "".to_owned())) } fn ReceiveNullableObject(&self, _: *mut JSContext) -> *mut JSObject { ptr::null_mut() } fn ReceiveNullableUnion(&self) -> Option<HTMLElementOrLong> { |