diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp index 28deabee52..bebb6436bc 100644 --- a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp @@ -99,6 +99,7 @@ void ECMAScriptFunctionObject::visit_edges(Visitor& visitor) Base::visit_edges(visitor); visitor.visit(m_environment); visitor.visit(m_realm); + visitor.visit(m_home_object); } FunctionEnvironment* ECMAScriptFunctionObject::create_environment(FunctionObject& function_being_invoked) @@ -131,7 +132,7 @@ FunctionEnvironment* ECMAScriptFunctionObject::create_environment(FunctionObject } auto* environment = heap().allocate<FunctionEnvironment>(global_object(), m_environment, variables); - environment->set_function_object(function_being_invoked); + environment->set_function_object(static_cast<ECMAScriptFunctionObject&>(function_being_invoked)); if (m_is_arrow_function) { environment->set_this_binding_status(FunctionEnvironment::ThisBindingStatus::Lexical); if (is<FunctionEnvironment>(m_environment)) |