aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2016-03-30 11:07:37 -0400
committerJosh Matthews <josh@joshmatthews.net>2016-03-30 11:07:37 -0400
commit042883eac270abb2be38a8eba800c5815ba5a578 (patch)
tree4992a198816f3d5c8c238301835ba5e03b4d398d /components/script/dom/bindings/codegen/CodegenRust.py
parent803f39df192272b607d0d42bb83abf1f6d1fd8fa (diff)
downloadservo-042883eac270abb2be38a8eba800c5815ba5a578.tar.gz
servo-042883eac270abb2be38a8eba800c5815ba5a578.zip
Enable dictionaries in WebIDL sequences. Fixes #10282.
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py8
1 files changed, 8 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"