1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:04:59 +00:00

LibJS: Convert WeakSet::create() to NonnullGCPtr

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

View file

@ -8,9 +8,9 @@
namespace JS {
WeakSet* WeakSet::create(Realm& realm)
NonnullGCPtr<WeakSet> WeakSet::create(Realm& realm)
{
return realm.heap().allocate<WeakSet>(realm, *realm.intrinsics().weak_set_prototype());
return *realm.heap().allocate<WeakSet>(realm, *realm.intrinsics().weak_set_prototype());
}
WeakSet::WeakSet(Object& prototype)

View file

@ -19,7 +19,7 @@ class WeakSet final
JS_OBJECT(WeakSet, Object);
public:
static WeakSet* create(Realm&);
static NonnullGCPtr<WeakSet> create(Realm&);
virtual ~WeakSet() override = default;