mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibJS: Convert MapIterator::create() to NonnullGCPtr
This commit is contained in:
parent
d48cdc7fa6
commit
9846d23c79
Notes:
sideshowbarker
2024-07-17 16:23:06 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/9846d23c79 Pull-request: https://github.com/SerenityOS/serenity/pull/16479 Reviewed-by: https://github.com/davidot ✅
2 changed files with 3 additions and 3 deletions
|
@ -9,9 +9,9 @@
|
|||
|
||||
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)
|
||||
|
|
|
@ -16,7 +16,7 @@ class MapIterator final : public Object {
|
|||
JS_OBJECT(MapIterator, Object);
|
||||
|
||||
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue