mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +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*> MapConstructor::construct(FunctionObject& new_target)
|
|||
{
|
||||
auto& vm = this->vm();
|
||||
|
||||
auto* map = TRY(ordinary_create_from_constructor<Map>(vm, new_target, &Intrinsics::map_prototype));
|
||||
auto map = TRY(ordinary_create_from_constructor<Map>(vm, new_target, &Intrinsics::map_prototype));
|
||||
|
||||
if (vm.argument(0).is_nullish())
|
||||
return map;
|
||||
return map.ptr();
|
||||
|
||||
auto adder = TRY(map->get(vm.names.set));
|
||||
if (!adder.is_function())
|
||||
|
@ -63,7 +63,7 @@ ThrowCompletionOr<Object*> MapConstructor::construct(FunctionObject& new_target)
|
|||
return {};
|
||||
}));
|
||||
|
||||
return map;
|
||||
return map.ptr();
|
||||
}
|
||||
|
||||
// 24.1.2.2 get Map [ @@species ], https://tc39.es/ecma262/#sec-get-map-@@species
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue