diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-12-19 16:16:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-19 16:16:56 -0500 |
commit | bac9903fbeed0a394a86c0091e727aada665433d (patch) | |
tree | 15f61a4fdcc8bbcc09f10a39e25495fb49cb9a75 /components/script/dom/testbinding.rs | |
parent | aa36d5f657eb32b59d994d08b177a02372b4b01c (diff) | |
parent | 6e8a85482c2068d4dbccb992954271f725570f91 (diff) | |
download | servo-bac9903fbeed0a394a86c0091e727aada665433d.tar.gz servo-bac9903fbeed0a394a86c0091e727aada665433d.zip |
Auto merge of #24123 - gterzian:redo_blob, r=jdm
Restructure Blob, structured serialization
<!-- Please describe your changes on the following line: -->
FIX #24052 and also address the "cloning" half of FIX #23917
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24123)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r-- | components/script/dom/testbinding.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs index 31972afe948..475f432417f 100644 --- a/components/script/dom/testbinding.rs +++ b/components/script/dom/testbinding.rs @@ -44,7 +44,7 @@ use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::{ByteString, DOMString, USVString}; use crate::dom::bindings::trace::RootedTraceableBox; use crate::dom::bindings::weakref::MutableWeakRef; -use crate::dom::blob::{Blob, BlobImpl}; +use crate::dom::blob::Blob; use crate::dom::globalscope::GlobalScope; use crate::dom::promise::Promise; use crate::dom::promisenativehandler::{Callback, PromiseNativeHandler}; @@ -58,6 +58,7 @@ use js::jsval::{JSVal, NullValue}; use js::rust::CustomAutoRooterGuard; use js::rust::{HandleObject, HandleValue}; use js::typedarray; +use script_traits::serializable::BlobImpl; use script_traits::MsDuration; use servo_config::prefs; use std::borrow::ToOwned; @@ -174,8 +175,7 @@ impl TestBindingMethods for TestBinding { fn InterfaceAttribute(&self) -> DomRoot<Blob> { Blob::new( &self.global(), - BlobImpl::new_from_bytes(vec![]), - "".to_owned(), + BlobImpl::new_from_bytes(vec![], "".to_owned()), ) } fn SetInterfaceAttribute(&self, _: &Blob) {} @@ -320,8 +320,7 @@ impl TestBindingMethods for TestBinding { fn GetInterfaceAttributeNullable(&self) -> Option<DomRoot<Blob>> { Some(Blob::new( &self.global(), - BlobImpl::new_from_bytes(vec![]), - "".to_owned(), + BlobImpl::new_from_bytes(vec![], "".to_owned()), )) } fn SetInterfaceAttributeNullable(&self, _: Option<&Blob>) {} @@ -415,8 +414,7 @@ impl TestBindingMethods for TestBinding { fn ReceiveInterface(&self) -> DomRoot<Blob> { Blob::new( &self.global(), - BlobImpl::new_from_bytes(vec![]), - "".to_owned(), + BlobImpl::new_from_bytes(vec![], "".to_owned()), ) } fn ReceiveAny(&self, _: SafeJSContext) -> JSVal { @@ -464,8 +462,7 @@ impl TestBindingMethods for TestBinding { fn ReceiveInterfaceSequence(&self) -> Vec<DomRoot<Blob>> { vec![Blob::new( &self.global(), - BlobImpl::new_from_bytes(vec![]), - "".to_owned(), + BlobImpl::new_from_bytes(vec![], "".to_owned()), )] } fn ReceiveUnionIdentity( @@ -530,8 +527,7 @@ impl TestBindingMethods for TestBinding { fn ReceiveNullableInterface(&self) -> Option<DomRoot<Blob>> { Some(Blob::new( &self.global(), - BlobImpl::new_from_bytes(vec![]), - "".to_owned(), + BlobImpl::new_from_bytes(vec![], "".to_owned()), )) } fn ReceiveNullableObject(&self, cx: SafeJSContext) -> Option<NonNull<JSObject>> { |