mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Fix binding generation for overloaded functions with optionals and default values
This commit is contained in:
parent
33fa728d6e
commit
2974dae431
6 changed files with 14 additions and 7 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue