diff options
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/WeakMap.cpp | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/WeakMap.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/WeakMap.cpp b/Userland/Libraries/LibJS/Runtime/WeakMap.cpp index 0169bdf1c1..f4e52c0cc8 100644 --- a/Userland/Libraries/LibJS/Runtime/WeakMap.cpp +++ b/Userland/Libraries/LibJS/Runtime/WeakMap.cpp @@ -8,9 +8,9 @@ namespace JS { -WeakMap* WeakMap::create(Realm& realm) +NonnullGCPtr<WeakMap> WeakMap::create(Realm& realm) { - return realm.heap().allocate<WeakMap>(realm, *realm.intrinsics().weak_map_prototype()); + return *realm.heap().allocate<WeakMap>(realm, *realm.intrinsics().weak_map_prototype()); } WeakMap::WeakMap(Object& prototype) diff --git a/Userland/Libraries/LibJS/Runtime/WeakMap.h b/Userland/Libraries/LibJS/Runtime/WeakMap.h index 832de588cb..ac0b516dba 100644 --- a/Userland/Libraries/LibJS/Runtime/WeakMap.h +++ b/Userland/Libraries/LibJS/Runtime/WeakMap.h @@ -19,7 +19,7 @@ class WeakMap final JS_OBJECT(WeakMap, Object); public: - static WeakMap* create(Realm&); + static NonnullGCPtr<WeakMap> create(Realm&); virtual ~WeakMap() override = default; |