summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-09-24 23:49:24 +0200
committerLinus Groh <mail@linusgroh.de>2021-09-25 17:51:30 +0200
commit136451c3aff8785af23be7b000176bde4fd90755 (patch)
treef0822e937499938e4d12ed4a9319fed7baa24276 /Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
parent06726d41ac931af6f8bb8020a303b0d27e4063b6 (diff)
downloadserenity-136451c3aff8785af23be7b000176bde4fd90755.zip
LibJS: Move [[HomeObject]] to ECMAScriptFunctionObject
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp3
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))