mirror of
https://github.com/servo/servo.git
synced 2025-06-14 11:24:33 +00:00
Auto merge of #24137 - gterzian:fix_error_throwing_on_unknown_js_arg, r=jdm
Codegen: throw type error when encountering an unknown argument <!-- Please describe your changes on the following line: --> FIX #24130 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24137) <!-- Reviewable:end -->
This commit is contained in:
commit
8eddb60150
2 changed files with 7 additions and 2 deletions
|
@ -492,7 +492,7 @@ class CGMethodCall(CGThing):
|
|||
else:
|
||||
# Just throw; we have no idea what we're supposed to
|
||||
# do with this.
|
||||
caseBody.append(CGGeneric("throw_internal_error(*cx, \"Could not convert JavaScript argument\");\n"
|
||||
caseBody.append(CGGeneric("throw_type_error(*cx, \"Could not convert JavaScript argument\");\n"
|
||||
"return false;"))
|
||||
|
||||
argCountCases.append(CGCase(str(argCount),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue