diff options
Diffstat (limited to 'src/components/script/dom')
-rw-r--r-- | src/components/script/dom/bindings/codegen/CodegenRust.py | 4 | ||||
-rw-r--r-- | src/components/script/dom/webidls/TestBinding.webidl | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/components/script/dom/bindings/codegen/CodegenRust.py b/src/components/script/dom/bindings/codegen/CodegenRust.py index 9d5578b6b58..beb0b46e8e0 100644 --- a/src/components/script/dom/bindings/codegen/CodegenRust.py +++ b/src/components/script/dom/bindings/codegen/CodegenRust.py @@ -686,7 +686,7 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None, "yet") enum = type.inner.identifier.name if invalidEnumValueFatal: - handleInvalidEnumValueCode = "return 0;" + handleInvalidEnumValueCode = exceptionCode else: handleInvalidEnumValueCode = "return 1;" @@ -696,7 +696,7 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None, " Ok(None) => { %(handleInvalidEnumValueCode)s },\n" " Ok(Some(index)) => {\n" " //XXXjdm need some range checks up in here.\n" - " cast::transmute(index)\n" + " unsafe { cast::transmute(index) }\n" " },\n" "}" % { "values" : enum + "Values::strings", "exceptionCode" : exceptionCode, diff --git a/src/components/script/dom/webidls/TestBinding.webidl b/src/components/script/dom/webidls/TestBinding.webidl index 467abce3328..578a2d3948b 100644 --- a/src/components/script/dom/webidls/TestBinding.webidl +++ b/src/components/script/dom/webidls/TestBinding.webidl @@ -23,30 +23,30 @@ enum TestEnum { "", "foo", "bar" }; }; */ dictionary TestDictionaryDefaults { - // boolean booleanValue = false; - // byte byteValue = 7; - // octet octetValue = 7; + boolean booleanValue = false; + byte byteValue = 7; + octet octetValue = 7; short shortValue = 7; unsigned short unsignedShortValue = 7; long longValue = 7; unsigned long unsignedLongValue = 7; - // long long longLongValue = 7; - // unsigned long long unsignedLongLongValue = 7; + long long longLongValue = 7; + unsigned long long unsignedLongLongValue = 7; // float floatValue = 7.0; // double doubleValue = 7.0; DOMString stringValue = ""; - // TestEnum enumValue = "bar"; + TestEnum enumValue = "bar"; any anyValue = null; - // boolean? nullableBooleanValue = false; - // byte? nullableByteValue = 7; - // octet? nullableOctetValue = 7; + boolean? nullableBooleanValue = false; + byte? nullableByteValue = 7; + octet? nullableOctetValue = 7; short? nullableShortValue = 7; unsigned short? nullableUnsignedShortValue = 7; long? nullableLongValue = 7; unsigned long? nullableUnsignedLongValue = 7; - // long long? nullableLongLongValue = 7; - // unsigned long long? nullableUnsignedLongLongValue = 7; + long long? nullableLongLongValue = 7; + unsigned long long? nullableUnsignedLongLongValue = 7; // float? nullableFloatValue = 7.0; // double? nullableDoubleValue = 7.0; DOMString? nullableStringValue = ""; |