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:
parent
1c8b700248
commit
c200c247e4
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue