summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
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;