1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibJS: Remove GlobalObject parameter from native functions

This commit is contained in:
Linus Groh 2022-08-22 11:48:08 +01:00
parent 7b990c27a1
commit b465f46e00
77 changed files with 240 additions and 215 deletions

View file

@ -1118,10 +1118,10 @@ Object* create_mapped_arguments_object(VM& vm, FunctionObject& function, Vector<
// 3. Perform ! map.[[DefineOwnProperty]](! ToString(𝔽(index)), PropertyDescriptor { [[Set]]: p, [[Get]]: g, [[Enumerable]]: false, [[Configurable]]: true }).
object->parameter_map().define_native_accessor(
PropertyKey { index },
[&environment, name](VM& vm, GlobalObject&) -> ThrowCompletionOr<Value> {
[&environment, name](VM& vm) -> ThrowCompletionOr<Value> {
return MUST(environment.get_binding_value(vm, name, false));
},
[&environment, name](VM& vm, GlobalObject&) {
[&environment, name](VM& vm) {
MUST(environment.set_mutable_binding(vm, name, vm.argument(0), false));
return js_undefined();
},