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 -->
This commit is contained in:
bors-servo 2016-04-01 00:28:13 +05:30
commit acaac52be7
2 changed files with 9 additions and 0 deletions

View file

@ -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"

View file

@ -29,6 +29,7 @@ dictionary TestDictionary {
any anyValue;
object objectValue;
TestDictionaryDefaults dict;
sequence<TestDictionaryDefaults> seqDict;
};
dictionary TestDictionaryDefaults {