1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +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

@ -37,7 +37,6 @@ ThrowCompletionOr<Value> GeneratorFunctionConstructor::call()
ThrowCompletionOr<Object*> GeneratorFunctionConstructor::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();
@ -46,7 +45,7 @@ ThrowCompletionOr<Object*> GeneratorFunctionConstructor::construct(FunctionObjec
auto& args = vm.running_execution_context().arguments;
// 3. Return ? CreateDynamicFunction(C, NewTarget, generator, args).
return TRY(FunctionConstructor::create_dynamic_function(global_object, *constructor, &new_target, FunctionKind::Generator, args));
return TRY(FunctionConstructor::create_dynamic_function(vm, *constructor, &new_target, FunctionKind::Generator, args));
}
}