summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-12-13 20:49:50 +0000
committerLinus Groh <mail@linusgroh.de>2022-12-14 09:59:45 +0000
commitc200c247e4ae5e152f8d111043ec63352e3f33b2 (patch)
tree4a6607fd382b2f7557e12e8fc598525f27e3ef81 /Userland/Libraries
parent1c8b70024838e1c62a221f6bd38286b2ebe16299 (diff)
downloadserenity-c200c247e4ae5e152f8d111043ec63352e3f33b2.zip
LibJS: Convert SetIterator::create() to NonnullGCPtr
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibJS/Runtime/SetIterator.cpp4
-rw-r--r--Userland/Libraries/LibJS/Runtime/SetIterator.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/SetIterator.cpp b/Userland/Libraries/LibJS/Runtime/SetIterator.cpp
index 5fcdb86f8b..5e4b946e98 100644
--- a/Userland/Libraries/LibJS/Runtime/SetIterator.cpp
+++ b/Userland/Libraries/LibJS/Runtime/SetIterator.cpp
@@ -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)
diff --git a/Userland/Libraries/LibJS/Runtime/SetIterator.h b/Userland/Libraries/LibJS/Runtime/SetIterator.h
index 9caef615b3..8fa3cd9b34 100644
--- a/Userland/Libraries/LibJS/Runtime/SetIterator.h
+++ b/Userland/Libraries/LibJS/Runtime/SetIterator.h
@@ -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;