1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

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

This commit is contained in:
Linus Groh 2022-08-21 20:38:35 +01:00
parent 25849f8a6d
commit 56b2ae5ac0
46 changed files with 173 additions and 207 deletions

View file

@ -39,7 +39,6 @@ ThrowCompletionOr<Value> AsyncGeneratorFunctionConstructor::call()
ThrowCompletionOr<Object*> AsyncGeneratorFunctionConstructor::construct(FunctionObject& new_target)
{
auto& vm = this->vm();
auto& global_object = this->global_object();
// 1. Let C be the active function object.
auto* constructor = vm.active_function_object();
@ -48,7 +47,7 @@ ThrowCompletionOr<Object*> AsyncGeneratorFunctionConstructor::construct(Function
auto& args = vm.running_execution_context().arguments;
// 3. Return ? CreateDynamicFunction(C, NewTarget, asyncGenerator, args).
return TRY(FunctionConstructor::create_dynamic_function(global_object, *constructor, &new_target, FunctionKind::AsyncGenerator, args));
return TRY(FunctionConstructor::create_dynamic_function(vm, *constructor, &new_target, FunctionKind::AsyncGenerator, args));
}
}