mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
LibJS: Convert RegExpStringIterator::create() to NonnullGCPtr
This commit is contained in:
parent
cad40ec953
commit
9946e9e874
Notes:
sideshowbarker
2024-07-17 08:25:15 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/9946e9e874 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 {
|
||||
|
||||
// 22.2.7.1 CreateRegExpStringIterator ( R, S, global, fullUnicode ), https://tc39.es/ecma262/#sec-createregexpstringiterator
|
||||
RegExpStringIterator* RegExpStringIterator::create(Realm& realm, Object& regexp_object, Utf16String string, bool global, bool unicode)
|
||||
NonnullGCPtr<RegExpStringIterator> RegExpStringIterator::create(Realm& realm, Object& regexp_object, Utf16String string, bool global, bool unicode)
|
||||
{
|
||||
return realm.heap().allocate<RegExpStringIterator>(realm, *realm.intrinsics().regexp_string_iterator_prototype(), regexp_object, move(string), global, unicode);
|
||||
return *realm.heap().allocate<RegExpStringIterator>(realm, *realm.intrinsics().regexp_string_iterator_prototype(), regexp_object, move(string), global, unicode);
|
||||
}
|
||||
|
||||
RegExpStringIterator::RegExpStringIterator(Object& prototype, Object& regexp_object, Utf16String string, bool global, bool unicode)
|
||||
|
|
|
@ -16,7 +16,7 @@ class RegExpStringIterator final : public Object {
|
|||
JS_OBJECT(RegExpStringIterator, Object);
|
||||
|
||||
public:
|
||||
static RegExpStringIterator* create(Realm&, Object& regexp_object, Utf16String string, bool global, bool unicode);
|
||||
static NonnullGCPtr<RegExpStringIterator> create(Realm&, Object& regexp_object, Utf16String string, bool global, bool unicode);
|
||||
|
||||
virtual ~RegExpStringIterator() override = default;
|
||||
|
||||
|
|
Loading…
Reference in a new issue