aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/testbinding.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r--components/script/dom/testbinding.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs
index 1a56a77a64f..22f8066d24a 100644
--- a/components/script/dom/testbinding.rs
+++ b/components/script/dom/testbinding.rs
@@ -338,14 +338,14 @@ impl TestBindingMethods for TestBinding {
Some(ByteStringOrLong::ByteString(ByteString::new(vec!())))
}
fn ReceiveNullableSequence(&self) -> Option<Vec<i32>> { Some(vec![1]) }
- fn ReceiveTestDictionaryWithSuccessOnKeyword(&self) -> TestDictionary {
- TestDictionary {
- anyValue: Heap::new(NullValue()),
+ fn ReceiveTestDictionaryWithSuccessOnKeyword(&self) -> RootedTraceableBox<TestDictionary> {
+ RootedTraceableBox::new(TestDictionary {
+ anyValue: Heap::default(),
booleanValue: None,
byteValue: None,
- dict: TestDictionaryDefaults {
+ dict: RootedTraceableBox::new(TestDictionaryDefaults {
UnrestrictedDoubleValue: 0.0,
- anyValue: Heap::new(NullValue()),
+ anyValue: Heap::default(),
booleanValue: false,
bytestringValue: ByteString::new(vec![]),
byteValue: 0,
@@ -361,7 +361,7 @@ impl TestBindingMethods for TestBinding {
nullableFloatValue: None,
nullableLongLongValue: None,
nullableLongValue: None,
- nullableObjectValue: Heap::new(ptr::null_mut()),
+ nullableObjectValue: Heap::default(),
nullableOctetValue: None,
nullableShortValue: None,
nullableStringValue: None,
@@ -379,7 +379,7 @@ impl TestBindingMethods for TestBinding {
unsignedLongValue: 0,
unsignedShortValue: 0,
usvstringValue: USVString("".to_owned()),
- },
+ }),
doubleValue: None,
enumValue: None,
floatValue: None,
@@ -401,7 +401,7 @@ impl TestBindingMethods for TestBinding {
usvstringValue: None,
nonRequiredNullable: None,
nonRequiredNullable2: Some(None), // null
- }
+ })
}
fn DictMatchesPassedValues(&self, arg: RootedTraceableBox<TestDictionary>) -> bool {
@@ -436,9 +436,9 @@ impl TestBindingMethods for TestBinding {
fn PassUnion6(&self, _: UnsignedLongOrBoolean) {}
fn PassUnion7(&self, _: StringSequenceOrUnsignedLong) {}
fn PassUnion8(&self, _: ByteStringSequenceOrLong) {}
- fn PassUnion9(&self, _: RootedTraceableBox<UnionTypes::TestDictionaryOrLong>) {}
+ fn PassUnion9(&self, _: UnionTypes::TestDictionaryOrLong) {}
#[allow(unsafe_code)]
- unsafe fn PassUnion10(&self, _: *mut JSContext, _: RootedTraceableBox<UnionTypes::StringOrObject>) {}
+ unsafe fn PassUnion10(&self, _: *mut JSContext, _: UnionTypes::StringOrObject) {}
fn PassUnionWithTypedef(&self, _: DocumentOrTestTypedef) {}
fn PassUnionWithTypedef2(&self, _: LongSequenceOrTestTypedef) {}
#[allow(unsafe_code)]