mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Use Heap for dictionary and union members.
This commit is contained in:
parent
5eaa19bdd4
commit
8ce9ca6243
10 changed files with 35 additions and 27 deletions
|
@ -33,7 +33,7 @@ use dom::globalscope::GlobalScope;
|
|||
use dom::promise::Promise;
|
||||
use dom::promisenativehandler::{PromiseNativeHandler, Callback};
|
||||
use dom::url::URL;
|
||||
use js::jsapi::{HandleObject, HandleValue, JSContext, JSObject, JSAutoCompartment};
|
||||
use js::jsapi::{HandleObject, HandleValue, Heap, JSContext, JSObject, JSAutoCompartment};
|
||||
use js::jsapi::{JS_NewPlainObject, JS_NewUint8ClampedArray};
|
||||
use js::jsval::{JSVal, NullValue};
|
||||
use script_traits::MsDuration;
|
||||
|
@ -338,12 +338,12 @@ impl TestBindingMethods for TestBinding {
|
|||
fn ReceiveNullableSequence(&self) -> Option<Vec<i32>> { Some(vec![1]) }
|
||||
fn ReceiveTestDictionaryWithSuccessOnKeyword(&self) -> TestDictionary {
|
||||
TestDictionary {
|
||||
anyValue: NullValue(),
|
||||
anyValue: Heap::new(NullValue()),
|
||||
booleanValue: None,
|
||||
byteValue: None,
|
||||
dict: TestDictionaryDefaults {
|
||||
UnrestrictedDoubleValue: 0.0,
|
||||
anyValue: NullValue(),
|
||||
anyValue: Heap::new(NullValue()),
|
||||
booleanValue: false,
|
||||
bytestringValue: ByteString::new(vec![]),
|
||||
byteValue: 0,
|
||||
|
@ -359,7 +359,7 @@ impl TestBindingMethods for TestBinding {
|
|||
nullableFloatValue: None,
|
||||
nullableLongLongValue: None,
|
||||
nullableLongValue: None,
|
||||
nullableObjectValue: ptr::null_mut(),
|
||||
nullableObjectValue: Heap::new(ptr::null_mut()),
|
||||
nullableOctetValue: None,
|
||||
nullableShortValue: None,
|
||||
nullableStringValue: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue