mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
LibJS: Convert StringIterator::create() to NonnullGCPtr
This commit is contained in:
parent
c200c247e4
commit
337c55a893
Notes:
sideshowbarker
2024-07-17 22:09:47 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/337c55a893 Pull-request: https://github.com/SerenityOS/serenity/pull/16479 Reviewed-by: https://github.com/davidot ✅
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue