LibJS: Convert StringIterator::create() to NonnullGCPtr

This commit is contained in:
Linus Groh 2022-12-13 20:49:50 +00:00
parent c200c247e4
commit 337c55a893
Notes: sideshowbarker 2024-07-17 22:09:47 +09:00
2 changed files with 3 additions and 3 deletions

View file

@ -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)

View file

@ -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;