diff options
author | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2017-11-10 17:57:02 +0100 |
---|---|---|
committer | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2017-11-11 08:41:19 +0100 |
commit | 2974dae4315420d1e7252029c2c30198ea62ac61 (patch) | |
tree | 16a909fed12d2c183ce4776d6bd04c794208d66c /components/script/dom/bindings/codegen/CodegenRust.py | |
parent | 33fa728d6e5392993c83f630acc1d6e442104dec (diff) | |
download | servo-2974dae4315420d1e7252029c2c30198ea62ac61.tar.gz servo-2974dae4315420d1e7252029c2c30198ea62ac61.zip |
Fix binding generation for overloaded functions with optionals and default values
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index c32c8f2c090..b408d0a670f 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -483,7 +483,8 @@ class CGMethodCall(CGThing): else: # Just throw; we have no idea what we're supposed to # do with this. - caseBody.append(CGGeneric("return Throw(cx, NS_ERROR_XPC_BAD_CONVERT_JS);")) + caseBody.append(CGGeneric("throw_internal_error(cx, \"Could not convert JavaScript argument\");\n" + "return false;")) argCountCases.append(CGCase(str(argCount), CGList(caseBody, "\n"))) @@ -5591,6 +5592,7 @@ def generate_imports(config, cgthings, descriptors, callbacks=None, dictionaries 'js::JSCLASS_RESERVED_SLOTS_MASK', 'js::JS_CALLEE', 'js::error::throw_type_error', + 'js::error::throw_internal_error', 'js::jsapi::AutoIdVector', 'js::jsapi::Call', 'js::jsapi::CallArgs', |