diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-04-01 00:28:13 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-04-01 00:28:13 +0530 |
commit | acaac52be7973cfbf6621796d4fb944fbfd343ff (patch) | |
tree | 28743082ac9c029932c38bb3e785d1c33f47a085 /components | |
parent | f10c01cd39842e7a98198e8b9edd11fb59306157 (diff) | |
parent | 042883eac270abb2be38a8eba800c5815ba5a578 (diff) | |
download | servo-acaac52be7973cfbf6621796d4fb944fbfd343ff.tar.gz servo-acaac52be7973cfbf6621796d4fb944fbfd343ff.zip |
Auto merge of #10288 - jdm:dictseq, r=nox
Enable dictionaries in WebIDL sequences. Fixes #10282.
r? @nox
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10288)
<!-- Reviewable:end -->
Diffstat (limited to 'components')
-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 { |