mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
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:
@@ -478,10 +478,10 @@ const FlyString& ProxyObject::name() const
|
||||
return static_cast<Function&>(m_target).name();
|
||||
}
|
||||
|
||||
FunctionEnvironmentRecord* ProxyObject::create_environment_record()
|
||||
FunctionEnvironmentRecord* ProxyObject::create_environment_record(Function& function_being_invoked)
|
||||
{
|
||||
VERIFY(is_function());
|
||||
return static_cast<Function&>(m_target).create_environment_record();
|
||||
return static_cast<Function&>(m_target).create_environment_record(function_being_invoked);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user