diff options
Diffstat (limited to 'Userland/Libraries/LibJS')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/StringIterator.cpp | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/StringIterator.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/StringIterator.cpp b/Userland/Libraries/LibJS/Runtime/StringIterator.cpp index db505c4db7..0dac262bb1 100644 --- a/Userland/Libraries/LibJS/Runtime/StringIterator.cpp +++ b/Userland/Libraries/LibJS/Runtime/StringIterator.cpp @@ -10,9 +10,9 @@ namespace JS { -StringIterator* StringIterator::create(Realm& realm, DeprecatedString string) +NonnullGCPtr<StringIterator> StringIterator::create(Realm& realm, DeprecatedString string) { - return realm.heap().allocate<StringIterator>(realm, move(string), *realm.intrinsics().string_iterator_prototype()); + return *realm.heap().allocate<StringIterator>(realm, move(string), *realm.intrinsics().string_iterator_prototype()); } StringIterator::StringIterator(DeprecatedString string, Object& prototype) diff --git a/Userland/Libraries/LibJS/Runtime/StringIterator.h b/Userland/Libraries/LibJS/Runtime/StringIterator.h index f2869fa53f..f419caabc4 100644 --- a/Userland/Libraries/LibJS/Runtime/StringIterator.h +++ b/Userland/Libraries/LibJS/Runtime/StringIterator.h @@ -15,7 +15,7 @@ class StringIterator final : public Object { JS_OBJECT(StringIterator, Object); public: - static StringIterator* create(Realm&, DeprecatedString string); + static NonnullGCPtr<StringIterator> create(Realm&, DeprecatedString string); virtual ~StringIterator() override = default; |