1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:57:35 +00:00

LibJS: Avoid an unnecessary String in create_mapped_arguments_object()

This commit is contained in:
Andreas Kling 2021-10-04 22:53:44 +02:00
parent f4180b7269
commit d872f0d503

View file

@ -769,7 +769,7 @@ Object* create_mapped_arguments_object(GlobalObject& global_object, FunctionObje
// 2. Let p be MakeArgSetter(name, env).
// 3. Perform map.[[DefineOwnProperty]](! ToString(𝔽(index)), PropertyDescriptor { [[Set]]: p, [[Get]]: g, [[Enumerable]]: false, [[Configurable]]: true }).
object->parameter_map().define_native_accessor(
String::number(index),
PropertyName { index },
[&environment, name](VM&, GlobalObject& global_object_getter) -> Value {
return environment.get_binding_value(global_object_getter, name, false);
},