diff options
author | Josh Matthews <josh@joshmatthews.net> | 2016-03-30 11:07:37 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2016-03-30 11:07:37 -0400 |
commit | 042883eac270abb2be38a8eba800c5815ba5a578 (patch) | |
tree | 4992a198816f3d5c8c238301835ba5e03b4d398d | |
parent | 803f39df192272b607d0d42bb83abf1f6d1fd8fa (diff) | |
download | servo-042883eac270abb2be38a8eba800c5815ba5a578.tar.gz servo-042883eac270abb2be38a8eba800c5815ba5a578.zip |
Enable dictionaries in WebIDL sequences. Fixes #10282.
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 8 | ||||
-rw-r--r-- | components/script/dom/webidls/TestBinding.webidl | 1 |
2 files changed, 9 insertions, 0 deletions
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<TestDictionaryDefaults> seqDict; }; dictionary TestDictionaryDefaults { |