diff options
author | Linus Groh <mail@linusgroh.de> | 2021-09-24 23:49:24 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-25 17:51:30 +0200 |
commit | 136451c3aff8785af23be7b000176bde4fd90755 (patch) | |
tree | f0822e937499938e4d12ed4a9319fed7baa24276 /Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp | |
parent | 06726d41ac931af6f8bb8020a303b0d27e4063b6 (diff) | |
download | serenity-136451c3aff8785af23be7b000176bde4fd90755.zip |
LibJS: Move [[HomeObject]] to ECMAScriptFunctionObject
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)) |