WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
298927
[JSC] Improve error message for calling constructor without `new`
https://bugs.webkit.org/show_bug.cgi?id=298927
Summary
[JSC] Improve error message for calling constructor without `new`
Sosuke Suzuki
Reported
2025-09-16 00:12:12 PDT
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
Comment 1
2025-09-16 00:20:56 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/50792
Radar WebKit Bug Importer
Comment 2
2025-09-23 00:13:36 PDT
<
rdar://problem/161152310
>
Radar WebKit Bug Importer
Comment 3
2025-09-23 00:13:37 PDT
<
rdar://problem/161152354
>
EWS
Comment 4
2025-10-05 06:23:38 PDT
Committed
301023@main
(dabbab2ba61e): <
https://commits.webkit.org/301023@main
> Reviewed commits have been landed. Closing PR #50792 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug