mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibJS: Convert ArrayIterator::create() to NonnullGCPtr
This commit is contained in:
parent
947ea92bf6
commit
4763cab323
Notes:
sideshowbarker
2024-07-17 04:32:07 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/4763cab323 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 {
|
||||
|
||||
ArrayIterator* ArrayIterator::create(Realm& realm, Value array, Object::PropertyKind iteration_kind)
|
||||
NonnullGCPtr<ArrayIterator> ArrayIterator::create(Realm& realm, Value array, Object::PropertyKind iteration_kind)
|
||||
{
|
||||
return realm.heap().allocate<ArrayIterator>(realm, array, iteration_kind, *realm.intrinsics().array_iterator_prototype());
|
||||
return *realm.heap().allocate<ArrayIterator>(realm, array, iteration_kind, *realm.intrinsics().array_iterator_prototype());
|
||||
}
|
||||
|
||||
ArrayIterator::ArrayIterator(Value array, Object::PropertyKind iteration_kind, Object& prototype)
|
||||
|
|
|
@ -14,7 +14,7 @@ class ArrayIterator final : public Object {
|
|||
JS_OBJECT(ArrayIterator, Object);
|
||||
|
||||
public:
|
||||
static ArrayIterator* create(Realm&, Value array, Object::PropertyKind iteration_kind);
|
||||
static NonnullGCPtr<ArrayIterator> create(Realm&, Value array, Object::PropertyKind iteration_kind);
|
||||
|
||||
virtual ~ArrayIterator() override = default;
|
||||
|
||||
|
|
Loading…
Reference in a new issue