1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:28:11 +00:00

LibJS: Convert SetIterator::create() to NonnullGCPtr

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

View file

@ -9,9 +9,9 @@
namespace JS {
SetIterator* SetIterator::create(Realm& realm, Set& set, Object::PropertyKind iteration_kind)
NonnullGCPtr<SetIterator> SetIterator::create(Realm& realm, Set& set, Object::PropertyKind iteration_kind)
{
return realm.heap().allocate<SetIterator>(realm, set, iteration_kind, *realm.intrinsics().set_iterator_prototype());
return *realm.heap().allocate<SetIterator>(realm, set, iteration_kind, *realm.intrinsics().set_iterator_prototype());
}
SetIterator::SetIterator(Set& set, Object::PropertyKind iteration_kind, Object& prototype)

View file

@ -16,7 +16,7 @@ class SetIterator final : public Object {
JS_OBJECT(SetIterator, Object);
public:
static SetIterator* create(Realm&, Set& set, Object::PropertyKind iteration_kind);
static NonnullGCPtr<SetIterator> create(Realm&, Set& set, Object::PropertyKind iteration_kind);
virtual ~SetIterator() override = default;