1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:57:45 +00:00

LibJS: Convert ordinary_create_from_constructor() to NonnullGCPtr

This commit is contained in:
Linus Groh 2022-12-14 18:34:32 +00:00 committed by Tim Flynn
parent 22089436ed
commit 1c24b82dd7
39 changed files with 80 additions and 80 deletions

View file

@ -45,9 +45,9 @@ ThrowCompletionOr<Object*> WeakRefConstructor::construct(FunctionObject& new_tar
return vm.throw_completion<TypeError>(ErrorType::CannotBeHeldWeakly, target.to_string_without_side_effects());
if (target.is_object())
return TRY(ordinary_create_from_constructor<WeakRef>(vm, new_target, &Intrinsics::weak_ref_prototype, target.as_object()));
return TRY(ordinary_create_from_constructor<WeakRef>(vm, new_target, &Intrinsics::weak_ref_prototype, target.as_object())).ptr();
VERIFY(target.is_symbol());
return TRY(ordinary_create_from_constructor<WeakRef>(vm, new_target, &Intrinsics::weak_ref_prototype, target.as_symbol()));
return TRY(ordinary_create_from_constructor<WeakRef>(vm, new_target, &Intrinsics::weak_ref_prototype, target.as_symbol())).ptr();
}
}