LibJS: Convert StringIterator::create() to NonnullGCPtr

This commit is contained in:
Linus Groh 2022-12-13 20:49:50 +00:00
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)