diff options
author | bors-servo <release+servo@mozilla.com> | 2014-06-02 13:07:47 -0400 |
---|---|---|
committer | bors-servo <release+servo@mozilla.com> | 2014-06-02 13:07:47 -0400 |
commit | 488ac518e4d425e3d671eb1480df4502578b789e (patch) | |
tree | d0382a952196a2a3a7031c8616750e34c41850eb /src | |
parent | 6c557265533355bd588c61d54ed0b18ef9c03bcd (diff) | |
parent | 6d619f484cefb9c73df8ab515a1535d4bc2428cd (diff) | |
download | servo-488ac518e4d425e3d671eb1480df4502578b789e.tar.gz servo-488ac518e4d425e3d671eb1480df4502578b789e.zip |
auto merge of #2547 : Ms2ger/servo/dictionary-tests, r=jdm
Diffstat (limited to 'src')
-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 = ""; |