mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibJS: Replace GlobalObject with VM in RegExp AOs [Part 9/19]
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 08:00:23 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/f0b793db74 Pull-request: https://github.com/SerenityOS/serenity/pull/14973 Reviewed-by: https://github.com/davidot ✅
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user