mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibJS: Implement the RegExpAlloc AO
This commit is contained in:
parent
db31c22491
commit
1da66b5879
4 changed files with 28 additions and 10 deletions
|
@ -82,7 +82,9 @@ ThrowCompletionOr<Object*> RegExpConstructor::construct(FunctionObject&)
|
|||
flags_value = flags;
|
||||
}
|
||||
|
||||
return TRY(regexp_create(vm, pattern_value, flags_value));
|
||||
auto regexp_object = TRY(regexp_alloc(vm, new_target));
|
||||
|
||||
return TRY(regexp_object->regexp_initialize(vm, pattern_value, flags_value)).ptr();
|
||||
}
|
||||
|
||||
// 22.2.4.2 get RegExp [ @@species ], https://tc39.es/ecma262/#sec-get-regexp-@@species
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue