mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
LibJS: Convert ordinary_create_from_constructor() to NonnullGCPtr
This commit is contained in:
parent
22089436ed
commit
1c24b82dd7
39 changed files with 80 additions and 80 deletions
|
@ -43,10 +43,10 @@ ThrowCompletionOr<Object*> SetConstructor::construct(FunctionObject& new_target)
|
|||
{
|
||||
auto& vm = this->vm();
|
||||
|
||||
auto* set = TRY(ordinary_create_from_constructor<Set>(vm, new_target, &Intrinsics::set_prototype));
|
||||
auto set = TRY(ordinary_create_from_constructor<Set>(vm, new_target, &Intrinsics::set_prototype));
|
||||
|
||||
if (vm.argument(0).is_nullish())
|
||||
return set;
|
||||
return set.ptr();
|
||||
|
||||
auto adder = TRY(set->get(vm.names.add));
|
||||
if (!adder.is_function())
|
||||
|
@ -57,7 +57,7 @@ ThrowCompletionOr<Object*> SetConstructor::construct(FunctionObject& new_target)
|
|||
return {};
|
||||
}));
|
||||
|
||||
return set;
|
||||
return set.ptr();
|
||||
}
|
||||
|
||||
// 24.2.2.2 get Set [ @@species ], https://tc39.es/ecma262/#sec-get-set-@@species
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue