From 70e25deea3db77c1af6900321824c7d11315ccfb Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 8 Oct 2021 01:31:39 +0200 Subject: [PATCH] LibJS: Avoid a FlyString copy in ECMAScriptFunctionObject --- Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp index 05c605618b..ce15244e39 100644 --- a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp @@ -177,7 +177,7 @@ ThrowCompletionOr ECMAScriptFunctionObject::function_declaration_instantia functions_to_initialize.append(function); }); - auto arguments_name = vm.names.arguments.as_string(); + auto const& arguments_name = vm.names.arguments.as_string(); if (!has_parameter_expressions && function_names.contains(arguments_name)) arguments_object_needed = false;