mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +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
|
@ -41,10 +41,10 @@ ThrowCompletionOr<Object*> WeakMapConstructor::construct(FunctionObject& new_tar
|
|||
{
|
||||
auto& vm = this->vm();
|
||||
|
||||
auto* weak_map = TRY(ordinary_create_from_constructor<WeakMap>(vm, new_target, &Intrinsics::weak_map_prototype));
|
||||
auto weak_map = TRY(ordinary_create_from_constructor<WeakMap>(vm, new_target, &Intrinsics::weak_map_prototype));
|
||||
|
||||
if (vm.argument(0).is_nullish())
|
||||
return weak_map;
|
||||
return weak_map.ptr();
|
||||
|
||||
auto adder = TRY(weak_map->get(vm.names.set));
|
||||
if (!adder.is_function())
|
||||
|
@ -61,7 +61,7 @@ ThrowCompletionOr<Object*> WeakMapConstructor::construct(FunctionObject& new_tar
|
|||
return {};
|
||||
}));
|
||||
|
||||
return weak_map;
|
||||
return weak_map.ptr();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue