LibJS: FunctionEnvironment.[[FunctionObject]] is the *invoked* function

We were setting the wrong [[FunctionObject]] on the environment when
going through ProxyObject and BoundFunction.
This commit is contained in:
Andreas Kling 2021-06-25 20:14:17 +02:00
commit b650d11dd3
Notes: sideshowbarker 2024-07-18 11:30:45 +09:00
10 changed files with 14 additions and 14 deletions

View file

@ -44,9 +44,9 @@ Value BoundFunction::construct(Function& new_target)
return m_target_function->construct(new_target);
}
FunctionEnvironmentRecord* BoundFunction::create_environment_record()
FunctionEnvironmentRecord* BoundFunction::create_environment_record(Function& function_being_invoked)
{
return m_target_function->create_environment_record();
return m_target_function->create_environment_record(function_being_invoked);
}
void BoundFunction::visit_edges(Visitor& visitor)