summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-28 21:57:07 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-28 22:32:40 +0200
commit5855b19ff36f6a2589171dcd59ed06229e62857a (patch)
treee64b9beb6ae400c866a4f3d5a3520a86a352df5e /Userland
parent3d24850db5b41eeda1089212b6a3bafd9ce4c5b9 (diff)
downloadserenity-5855b19ff36f6a2589171dcd59ed06229e62857a.zip
LibJS: Avoid unnecessary HashMap copy in ECMAScriptFunctionObject
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
index 3e6dbed362..a72336e390 100644
--- a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
@@ -136,7 +136,7 @@ FunctionEnvironment* ECMAScriptFunctionObject::create_environment(FunctionObject
}
}
- auto* environment = heap().allocate<FunctionEnvironment>(global_object(), m_environment, variables);
+ auto* environment = heap().allocate<FunctionEnvironment>(global_object(), m_environment, move(variables));
environment->set_function_object(static_cast<ECMAScriptFunctionObject&>(function_being_invoked));
if (m_is_arrow_function) {
environment->set_this_binding_status(FunctionEnvironment::ThisBindingStatus::Lexical);