diff options
author | David Raifaizen <d-raif@hotmail.com> | 2016-01-06 19:41:52 -0500 |
---|---|---|
committer | David Raifaizen <d-raif@hotmail.com> | 2016-01-06 19:41:52 -0500 |
commit | 76f689cd0626540d8db5d12b4d827d89748a9ab7 (patch) | |
tree | 456bc2ddb415071ba7fe37e53005200703475ff9 /components/script/dom/testbinding.rs | |
parent | 238a8786de66344d2dd6855dca25a4d4be6fa949 (diff) | |
download | servo-76f689cd0626540d8db5d12b4d827d89748a9ab7.tar.gz servo-76f689cd0626540d8db5d12b4d827d89748a9ab7.zip |
Changed blob to use DataSlice with Arc in order to limit wasteful copying of byte vector
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r-- | components/script/dom/testbinding.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs index 1eed6e8eb5f..bc969d69ffd 100644 --- a/components/script/dom/testbinding.rs +++ b/components/script/dom/testbinding.rs @@ -85,7 +85,7 @@ impl TestBindingMethods for TestBinding { fn EnumAttribute(&self) -> TestEnum { TestEnum::_empty } fn SetEnumAttribute(&self, _: TestEnum) {} fn InterfaceAttribute(&self) -> Root<Blob> { - Blob::new(global_root_from_reflector(self).r(), None, "") + Blob::new(global_root_from_reflector(self).r(), Vec::new(), "") } fn SetInterfaceAttribute(&self, _: &Blob) {} fn UnionAttribute(&self) -> HTMLElementOrLong { HTMLElementOrLong::eLong(0) } @@ -143,7 +143,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(global_root_from_reflector(self).r(), None, "")) + Some(Blob::new(global_root_from_reflector(self).r(), Vec::new(), "")) } fn SetInterfaceAttributeNullable(&self, _: Option<&Blob>) {} fn GetInterfaceAttributeWeak(&self) -> Option<Root<URL>> { @@ -182,7 +182,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(global_root_from_reflector(self).r(), None, "") + Blob::new(global_root_from_reflector(self).r(), Vec::new(), "") } fn ReceiveAny(&self, _: *mut JSContext) -> JSVal { NullValue() } fn ReceiveObject(&self, _: *mut JSContext) -> *mut JSObject { panic!() } @@ -207,7 +207,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(global_root_from_reflector(self).r(), None, "")) + Some(Blob::new(global_root_from_reflector(self).r(), Vec::new(), "")) } fn ReceiveNullableObject(&self, _: *mut JSContext) -> *mut JSObject { ptr::null_mut() } fn ReceiveNullableUnion(&self) -> Option<HTMLElementOrLong> { |