1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +00:00

LibJS: Decouple new_function_environment() from FunctionObject

Now that only ECMAScriptFunctionObject uses this, we can remove the
FunctionObject::new_function_environment() pure virtual method and just
implement it as a standalone AO with an ECMAScriptFunctionObject
parameter, next to the other NewFooEnvironment AOs.
This commit is contained in:
Linus Groh 2021-10-08 21:24:51 +01:00
parent 53af66d57d
commit fe5c2b7bb9
11 changed files with 30 additions and 43 deletions

View file

@ -80,11 +80,6 @@ ThrowCompletionOr<Object*> BoundFunction::internal_construct(MarkedValueList arg
return construct(global_object(), target, move(args), final_new_target);
}
FunctionEnvironment* BoundFunction::new_function_environment(Object* new_target)
{
return m_bound_target_function->new_function_environment(new_target);
}
void BoundFunction::visit_edges(Visitor& visitor)
{
Base::visit_edges(visitor);