LibJS: Avoid an unnecessary MarkedValueList copy in VM::call_internal()

This commit is contained in:
Andreas Kling 2020-10-04 22:42:24 +02:00
parent 2852ce4954
commit 2864cb66c0
Notes: sideshowbarker 2024-07-19 02:03:30 +09:00

View file

@ -309,7 +309,7 @@ Value VM::call_internal(Function& function, Value this_value, Optional<MarkedVal
call_frame.this_value = function.bound_this().value_or(this_value);
call_frame.arguments = function.bound_arguments();
if (arguments.has_value())
call_frame.arguments.append(arguments.value().values());
call_frame.arguments.append(move(arguments.release_value().values()));
call_frame.environment = function.create_environment();
ASSERT(call_frame.environment->this_binding_status() == LexicalEnvironment::ThisBindingStatus::Uninitialized);