mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 18:19:03 +00:00
LibJS: Convert ordinary_create_from_constructor() to NonnullGCPtr
This commit is contained in:
parent
22089436ed
commit
1c24b82dd7
Notes:
sideshowbarker
2024-07-17 03:09:26 +09:00
Author: https://github.com/linusg
Commit: 1c24b82dd7
Pull-request: https://github.com/SerenityOS/serenity/pull/16498
Reviewed-by: https://github.com/trflynn89 ✅
39 changed files with 80 additions and 80 deletions
|
@ -41,10 +41,10 @@ ThrowCompletionOr<Object*> WeakSetConstructor::construct(FunctionObject& new_tar
|
|||
{
|
||||
auto& vm = this->vm();
|
||||
|
||||
auto* weak_set = TRY(ordinary_create_from_constructor<WeakSet>(vm, new_target, &Intrinsics::weak_set_prototype));
|
||||
auto weak_set = TRY(ordinary_create_from_constructor<WeakSet>(vm, new_target, &Intrinsics::weak_set_prototype));
|
||||
|
||||
if (vm.argument(0).is_nullish())
|
||||
return weak_set;
|
||||
return weak_set.ptr();
|
||||
|
||||
auto adder = TRY(weak_set->get(vm.names.add));
|
||||
if (!adder.is_function())
|
||||
|
@ -55,7 +55,7 @@ ThrowCompletionOr<Object*> WeakSetConstructor::construct(FunctionObject& new_tar
|
|||
return {};
|
||||
}));
|
||||
|
||||
return weak_set;
|
||||
return weak_set.ptr();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue