mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 13:37:10 +09:00
LibJS: Mark ESFO path for [[Call]] on a class constructor [[unlikely]]
This is an exception path that's not supposed to be called normally, so let's mark it unlikely.
This commit is contained in:
parent
6ec4d0f5ba
commit
b4554c01db
Notes:
github-actions[bot]
2025-04-28 14:40:45 +00:00
Author: https://github.com/awesomekling
Commit: b4554c01db
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4502
1 changed files with 1 additions and 1 deletions
|
@ -516,7 +516,7 @@ FLATTEN ThrowCompletionOr<Value> ECMAScriptFunctionObject::internal_call(Executi
|
|||
ASSERT(&vm.running_execution_context() == &callee_context);
|
||||
|
||||
// 4. If F.[[IsClassConstructor]] is true, then
|
||||
if (is_class_constructor()) {
|
||||
if (is_class_constructor()) [[unlikely]] {
|
||||
// a. Let error be a newly created TypeError object.
|
||||
// b. NOTE: error is created in calleeContext with F's associated Realm Record.
|
||||
auto throw_completion = vm.throw_completion<TypeError>(ErrorType::ClassConstructorWithoutNew, name());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue