diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-28 21:57:07 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-28 22:32:40 +0200 |
commit | 5855b19ff36f6a2589171dcd59ed06229e62857a (patch) | |
tree | e64b9beb6ae400c866a4f3d5a3520a86a352df5e /Userland | |
parent | 3d24850db5b41eeda1089212b6a3bafd9ce4c5b9 (diff) | |
download | serenity-5855b19ff36f6a2589171dcd59ed06229e62857a.zip |
LibJS: Avoid unnecessary HashMap copy in ECMAScriptFunctionObject
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp | 2 |
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); |