mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 04:27:12 +02:00
LibJS: Convert Object::construct() to NonnullGCPtr
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 07:20:49 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/6ae79a84df Pull-request: https://github.com/SerenityOS/serenity/pull/16498 Reviewed-by: https://github.com/trflynn89 ✅
@@ -80,7 +80,7 @@ ThrowCompletionOr<Value> RegExpConstructor::call()
|
||||
}
|
||||
|
||||
// 22.2.3.1 RegExp ( pattern, flags ), https://tc39.es/ecma262/#sec-regexp-pattern-flags
|
||||
ThrowCompletionOr<Object*> RegExpConstructor::construct(FunctionObject& new_target)
|
||||
ThrowCompletionOr<NonnullGCPtr<Object>> RegExpConstructor::construct(FunctionObject& new_target)
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
|
||||
@@ -137,7 +137,7 @@ ThrowCompletionOr<Object*> RegExpConstructor::construct(FunctionObject& new_targ
|
||||
auto regexp_object = TRY(regexp_alloc(vm, new_target));
|
||||
|
||||
// 8. Return ? RegExpInitialize(O, P, F).
|
||||
return TRY(regexp_object->regexp_initialize(vm, pattern_value, flags_value)).ptr();
|
||||
return TRY(regexp_object->regexp_initialize(vm, pattern_value, flags_value));
|
||||
}
|
||||
|
||||
// 22.2.4.2 get RegExp [ @@species ], https://tc39.es/ecma262/#sec-get-regexp-@@species
|
||||
|
||||
Reference in New Issue
Block a user