From 042883eac270abb2be38a8eba800c5815ba5a578 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 30 Mar 2016 11:07:37 -0400 Subject: [PATCH] Enable dictionaries in WebIDL sequences. Fixes #10282. --- components/script/dom/bindings/codegen/CodegenRust.py | 8 ++++++++ components/script/dom/webidls/TestBinding.webidl | 1 + 2 files changed, 9 insertions(+) diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index e497e9a5725..51c29764125 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -5186,6 +5186,14 @@ class CGDictionary(CGThing): " }\n" "}\n" "\n" + "impl FromJSValConvertible for ${selfName} {\n" + " type Config = ();\n" + " unsafe fn from_jsval(cx: *mut JSContext, value: HandleValue, _option: ())\n" + " -> Result<${selfName}, ()> {\n" + " ${selfName}::new(cx, value)\n" + " }\n" + "}\n" + "\n" "impl ToJSValConvertible for ${selfName} {\n" " unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue) {\n" " let obj = RootedObject::new(cx, JS_NewObject(cx, ptr::null()));\n" diff --git a/components/script/dom/webidls/TestBinding.webidl b/components/script/dom/webidls/TestBinding.webidl index 4a933dd2b28..9047833bfa8 100644 --- a/components/script/dom/webidls/TestBinding.webidl +++ b/components/script/dom/webidls/TestBinding.webidl @@ -29,6 +29,7 @@ dictionary TestDictionary { any anyValue; object objectValue; TestDictionaryDefaults dict; + sequence seqDict; }; dictionary TestDictionaryDefaults {