diff options
author | Igor Matuszewski <Xanewok@gmail.com> | 2017-12-24 20:44:41 +0100 |
---|---|---|
committer | Igor Matuszewski <Xanewok@gmail.com> | 2018-01-05 18:21:25 +0100 |
commit | a01d1eabefeb9ec6a65c518234647ddbf15e7f92 (patch) | |
tree | d0c2a85bc2681e045ee567f44b584bf851b4d49f /components/script/dom/testbinding.rs | |
parent | dfd8e85338fb5460d800577d5761e979644dc869 (diff) | |
download | servo-a01d1eabefeb9ec6a65c518234647ddbf15e7f92.tar.gz servo-a01d1eabefeb9ec6a65c518234647ddbf15e7f92.zip |
Root sequence<{any,object}> IDL arguments using CustomAutoRooter
Also pulls in mozjs 0.1.10 to support the change.
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r-- | components/script/dom/testbinding.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs index 9e1d5cf7de5..6ffe2efefdd 100644 --- a/components/script/dom/testbinding.rs +++ b/components/script/dom/testbinding.rs @@ -38,6 +38,7 @@ use dom_struct::dom_struct; use js::jsapi::{HandleObject, HandleValue, Heap, JSContext, JSObject}; use js::jsapi::{JS_NewPlainObject, JS_NewUint8ClampedArray}; use js::jsval::{JSVal, NullValue}; +use js::rust::CustomAutoRooterGuard; use script_traits::MsDuration; use servo_config::prefs::PREFS; use std::borrow::ToOwned; @@ -449,6 +450,14 @@ impl TestBindingMethods for TestBinding { fn PassCallbackFunction(&self, _: Rc<Function>) {} fn PassCallbackInterface(&self, _: Rc<EventListener>) {} fn PassSequence(&self, _: Vec<i32>) {} + #[allow(unsafe_code)] + unsafe fn PassAnySequence(&self, _: *mut JSContext, _: CustomAutoRooterGuard<Vec<JSVal>>) {} + #[allow(unsafe_code)] + unsafe fn AnySequencePassthrough(&self, _: *mut JSContext, seq: CustomAutoRooterGuard<Vec<JSVal>>) -> Vec<JSVal> { + (*seq).clone() + } + #[allow(unsafe_code)] + unsafe fn PassObjectSequence(&self, _: *mut JSContext, _: CustomAutoRooterGuard<Vec<*mut JSObject>>) {} fn PassStringSequence(&self, _: Vec<DOMString>) {} fn PassInterfaceSequence(&self, _: Vec<DomRoot<Blob>>) {} |