diff options
author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2015-12-15 18:05:20 +0100 |
---|---|---|
committer | ggomez <ggomez@ggo.ifr.lan> | 2015-12-15 18:26:35 +0100 |
commit | 14a22953ddedf5881919a762bd68e072eacfec44 (patch) | |
tree | 93ea9671e5841ceebdb592e0cf4f8682414d5723 | |
parent | 81282ba82afd4c0871c3c63a13bf304a9bbe0a4d (diff) | |
download | servo-14a22953ddedf5881919a762bd68e072eacfec44.tar.gz servo-14a22953ddedf5881919a762bd68e072eacfec44.zip |
Fix invalid returned value for dictionary types
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 4 | ||||
-rw-r--r-- | components/script/dom/webidls/TestBinding.webidl | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 1e8033c7347..75de595694c 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -1016,8 +1016,8 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None, declType = CGGeneric(typeName) template = ("match %s::new(cx, ${val}) {\n" " Ok(dictionary) => dictionary,\n" - " Err(_) => return false,\n" - "}" % typeName) + " Err(_) => { %s },\n" + "}" % (typeName, exceptionCode)) return handleOptional(template, declType, handleDefaultNull("%s::empty(cx)" % typeName)) diff --git a/components/script/dom/webidls/TestBinding.webidl b/components/script/dom/webidls/TestBinding.webidl index a8573aa2ee5..e6495d90d66 100644 --- a/components/script/dom/webidls/TestBinding.webidl +++ b/components/script/dom/webidls/TestBinding.webidl @@ -28,6 +28,7 @@ dictionary TestDictionary { Blob interfaceValue; any anyValue; object objectValue; + TestDictionaryDefaults dict; }; dictionary TestDictionaryDefaults { |