aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/testbinding.rs
diff options
context:
space:
mode:
authorZhen Zhang <izgzhen@gmail.com>2016-05-17 12:52:35 +0800
committerZhen Zhang <izgzhen@gmail.com>2016-06-01 09:47:07 +0800
commit43ad4ba5857dbcd1a31aaf7e441c5cfe4fe1b84f (patch)
treeef221985dfe1d3ed54e7a2af31903d8b1dbf40e4 /components/script/dom/testbinding.rs
parentd53507f747f7122dc520f5e4a374ee1ad955aa5d (diff)
downloadservo-43ad4ba5857dbcd1a31aaf7e441c5cfe4fe1b84f.tar.gz
servo-43ad4ba5857dbcd1a31aaf7e441c5cfe4fe1b84f.zip
Add file backend support for Blob and related
Changes include: - Add BlobImpl to Blob, and related caching mechanism - Expose ResourceThreads to document_loader, workerglobalscope, worker, and global - Fix encode_multipart_form_data - Other small fixes to accommodate the above changes
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r--components/script/dom/testbinding.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs
index 630e5b2acd7..4fe7512ddcc 100644
--- a/components/script/dom/testbinding.rs
+++ b/components/script/dom/testbinding.rs
@@ -22,7 +22,7 @@ use dom::bindings::num::Finite;
use dom::bindings::reflector::{Reflectable, Reflector, reflect_dom_object};
use dom::bindings::str::{ByteString, DOMString, USVString};
use dom::bindings::weakref::MutableWeakRef;
-use dom::blob::{Blob, DataSlice};
+use dom::blob::{Blob, BlobImpl};
use dom::url::URL;
use js::jsapi::{HandleObject, HandleValue, JSContext, JSObject};
use js::jsval::{JSVal, NullValue};
@@ -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(), DataSlice::empty(), "")
+ Blob::new(self.global().r(), BlobImpl::new_from_empty_slice(), "")
}
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(), DataSlice::empty(), ""))
+ Some(Blob::new(self.global().r(), BlobImpl::new_from_empty_slice(), ""))
}
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(), DataSlice::empty(), "")
+ Blob::new(self.global().r(), BlobImpl::new_from_empty_slice(), "")
}
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(), DataSlice::empty(), "")]
+ vec![Blob::new(self.global().r(), BlobImpl::new_from_empty_slice(), "")]
}
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(), DataSlice::empty(), ""))
+ Some(Blob::new(self.global().r(), BlobImpl::new_from_empty_slice(), ""))
}
fn ReceiveNullableObject(&self, _: *mut JSContext) -> *mut JSObject { ptr::null_mut() }
fn ReceiveNullableUnion(&self) -> Option<HTMLElementOrLong> {