Root sequence<{any,object}> IDL arguments using CustomAutoRooter

Also pulls in mozjs 0.1.10 to support the change.
This commit is contained in:
Igor Matuszewski 2017-12-24 20:44:41 +01:00
parent dfd8e85338
commit a01d1eabef
8 changed files with 91 additions and 10 deletions

View file

@ -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>>) {}