mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
LibJS: Convert FunctionObject::internal_construct() to NonnullGCPtr
This commit is contained in:
parent
1c24b82dd7
commit
03acbf0beb
Notes:
sideshowbarker
2024-07-17 03:09:22 +09:00
Author: https://github.com/linusg
Commit: 03acbf0beb
Pull-request: https://github.com/SerenityOS/serenity/pull/16498
Reviewed-by: https://github.com/trflynn89 ✅
10 changed files with 17 additions and 17 deletions
|
@ -66,7 +66,7 @@ ThrowCompletionOr<Value> BoundFunction::internal_call([[maybe_unused]] Value thi
|
|||
}
|
||||
|
||||
// 10.4.1.2 [[Construct]] ( argumentsList, newTarget ), https://tc39.es/ecma262/#sec-bound-function-exotic-objects-construct-argumentslist-newtarget
|
||||
ThrowCompletionOr<Object*> BoundFunction::internal_construct(MarkedVector<Value> arguments_list, FunctionObject& new_target)
|
||||
ThrowCompletionOr<NonnullGCPtr<Object>> BoundFunction::internal_construct(MarkedVector<Value> arguments_list, FunctionObject& new_target)
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
|
||||
|
@ -90,7 +90,7 @@ ThrowCompletionOr<Object*> BoundFunction::internal_construct(MarkedVector<Value>
|
|||
final_new_target = ⌖
|
||||
|
||||
// 6. Return ? Construct(target, args, newTarget).
|
||||
return construct(vm, target, move(args), final_new_target);
|
||||
return *TRY(construct(vm, target, move(args), final_new_target));
|
||||
}
|
||||
|
||||
void BoundFunction::visit_edges(Visitor& visitor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue