mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:17:45 +00:00
LibJS: Convert WeakMap::create() to NonnullGCPtr
This commit is contained in:
parent
37c85fa07e
commit
3358ddfd0e
2 changed files with 3 additions and 3 deletions
|
@ -8,9 +8,9 @@
|
||||||
|
|
||||||
namespace JS {
|
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)
|
WeakMap::WeakMap(Object& prototype)
|
||||||
|
|
|
@ -19,7 +19,7 @@ class WeakMap final
|
||||||
JS_OBJECT(WeakMap, Object);
|
JS_OBJECT(WeakMap, Object);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static WeakMap* create(Realm&);
|
static NonnullGCPtr<WeakMap> create(Realm&);
|
||||||
|
|
||||||
virtual ~WeakMap() override = default;
|
virtual ~WeakMap() override = default;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue