aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2015-12-15 18:05:20 +0100
committerggomez <ggomez@ggo.ifr.lan>2015-12-15 18:26:35 +0100
commit14a22953ddedf5881919a762bd68e072eacfec44 (patch)
tree93ea9671e5841ceebdb592e0cf4f8682414d5723
parent81282ba82afd4c0871c3c63a13bf304a9bbe0a4d (diff)
downloadservo-14a22953ddedf5881919a762bd68e072eacfec44.tar.gz
servo-14a22953ddedf5881919a762bd68e072eacfec44.zip
Fix invalid returned value for dictionary types
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py4
-rw-r--r--components/script/dom/webidls/TestBinding.webidl1
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 {