Use Heap for dictionary and union members.

This commit is contained in:
Ms2ger 2017-02-14 14:32:49 +01:00
parent 5eaa19bdd4
commit 8ce9ca6243
10 changed files with 35 additions and 27 deletions

View file

@ -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,