mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:47:45 +00:00
LibJS: Convert MapIterator::create() to NonnullGCPtr
This commit is contained in:
parent
d48cdc7fa6
commit
9846d23c79
2 changed files with 3 additions and 3 deletions
|
@ -9,9 +9,9 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
MapIterator* MapIterator::create(Realm& realm, Map& map, Object::PropertyKind iteration_kind)
|
NonnullGCPtr<MapIterator> MapIterator::create(Realm& realm, Map& map, Object::PropertyKind iteration_kind)
|
||||||
{
|
{
|
||||||
return realm.heap().allocate<MapIterator>(realm, map, iteration_kind, *realm.intrinsics().map_iterator_prototype());
|
return *realm.heap().allocate<MapIterator>(realm, map, iteration_kind, *realm.intrinsics().map_iterator_prototype());
|
||||||
}
|
}
|
||||||
|
|
||||||
MapIterator::MapIterator(Map& map, Object::PropertyKind iteration_kind, Object& prototype)
|
MapIterator::MapIterator(Map& map, Object::PropertyKind iteration_kind, Object& prototype)
|
||||||
|
|
|
@ -16,7 +16,7 @@ class MapIterator final : public Object {
|
||||||
JS_OBJECT(MapIterator, Object);
|
JS_OBJECT(MapIterator, Object);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static MapIterator* create(Realm&, Map& map, Object::PropertyKind iteration_kind);
|
static NonnullGCPtr<MapIterator> create(Realm&, Map& map, Object::PropertyKind iteration_kind);
|
||||||
|
|
||||||
virtual ~MapIterator() override = default;
|
virtual ~MapIterator() override = default;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue