mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Root sequence<{any,object}> IDL arguments using CustomAutoRooter
Also pulls in mozjs 0.1.10 to support the change.
This commit is contained in:
parent
dfd8e85338
commit
a01d1eabef
8 changed files with 91 additions and 10 deletions
|
@ -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>>) {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue