mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
LibJS: Replace GlobalObject with VM in Value AOs [Part 4/19]
This is where the fun begins. :^)
This commit is contained in:
parent
f6c4a0f5d0
commit
a022e548b8
129 changed files with 1230 additions and 1325 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue