Bug 298927
| Summary: | [JSC] Improve error message for calling constructor without `new` | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Sosuke Suzuki <aosukeke> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Sosuke Suzuki
Calling constructors without `new` is invalid:
class Foo {}
Foo();
Current JSC throws a TypeError with the message "Cannot call a class
constructor without |new|" for such code.
This patch changes this error message to include the constructor name
for debugging experience.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Sosuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/50792
Radar WebKit Bug Importer
<rdar://problem/161152310>
Radar WebKit Bug Importer
<rdar://problem/161152354>
EWS
Committed 301023@main (dabbab2ba61e): <https://commits.webkit.org/301023@main>
Reviewed commits have been landed. Closing PR #50792 and removing active labels.