1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:07:35 +00:00

LibJS: Replace GlobalObject with VM in RegExp AOs [Part 9/19]

This commit is contained in:
Linus Groh 2022-08-21 16:14:51 +01:00
parent d74f8039eb
commit f0b793db74
8 changed files with 40 additions and 44 deletions

View file

@ -52,7 +52,6 @@ ThrowCompletionOr<Value> RegExpConstructor::call()
ThrowCompletionOr<Object*> RegExpConstructor::construct(FunctionObject&)
{
auto& vm = this->vm();
auto& global_object = this->global_object();
auto pattern = vm.argument(0);
auto flags = vm.argument(1);
@ -83,7 +82,7 @@ ThrowCompletionOr<Object*> RegExpConstructor::construct(FunctionObject&)
flags_value = flags;
}
return TRY(regexp_create(global_object, pattern_value, flags_value));
return TRY(regexp_create(vm, pattern_value, flags_value));
}
// 22.2.4.2 get RegExp [ @@species ], https://tc39.es/ecma262/#sec-get-regexp-@@species