mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibJS: Replace GlobalObject with VM in Value AOs [Part 4/19]
This is where the fun begins. :^)
This commit is contained in:
@@ -33,12 +33,11 @@ void RegExpConstructor::initialize(Realm& realm)
|
||||
ThrowCompletionOr<Value> RegExpConstructor::call()
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
auto& global_object = this->global_object();
|
||||
|
||||
auto pattern = vm.argument(0);
|
||||
auto flags = vm.argument(1);
|
||||
|
||||
bool pattern_is_regexp = TRY(pattern.is_regexp(global_object));
|
||||
bool pattern_is_regexp = TRY(pattern.is_regexp(vm));
|
||||
|
||||
if (pattern_is_regexp && flags.is_undefined()) {
|
||||
auto pattern_constructor = TRY(pattern.as_object().get(vm.names.constructor));
|
||||
@@ -58,7 +57,7 @@ ThrowCompletionOr<Object*> RegExpConstructor::construct(FunctionObject&)
|
||||
auto pattern = vm.argument(0);
|
||||
auto flags = vm.argument(1);
|
||||
|
||||
bool pattern_is_regexp = TRY(pattern.is_regexp(global_object));
|
||||
bool pattern_is_regexp = TRY(pattern.is_regexp(vm));
|
||||
|
||||
Value pattern_value;
|
||||
Value flags_value;
|
||||
|
||||
Reference in New Issue
Block a user