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

LibJS: Convert WeakRef::create() to NonnullGCPtr

This commit is contained in:
Linus Groh 2022-12-13 20:49:50 +00:00
parent 3358ddfd0e
commit cac71a6847
2 changed files with 6 additions and 6 deletions

View file

@ -8,14 +8,14 @@
namespace JS {
WeakRef* WeakRef::create(Realm& realm, Object& value)
NonnullGCPtr<WeakRef> WeakRef::create(Realm& realm, Object& value)
{
return realm.heap().allocate<WeakRef>(realm, value, *realm.intrinsics().weak_ref_prototype());
return *realm.heap().allocate<WeakRef>(realm, value, *realm.intrinsics().weak_ref_prototype());
}
WeakRef* WeakRef::create(Realm& realm, Symbol& value)
NonnullGCPtr<WeakRef> WeakRef::create(Realm& realm, Symbol& value)
{
return realm.heap().allocate<WeakRef>(realm, value, *realm.intrinsics().weak_ref_prototype());
return *realm.heap().allocate<WeakRef>(realm, value, *realm.intrinsics().weak_ref_prototype());
}
WeakRef::WeakRef(Object& value, Object& prototype)