1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 17:55:06 +00:00

LibJS: Replace GlobalObject with VM in Reference AOs [Part 6/19]

This commit is contained in:
Linus Groh 2022-08-21 15:39:13 +01:00
parent 275a7a0c0a
commit ae9e031f56
10 changed files with 88 additions and 77 deletions

View file

@ -463,9 +463,9 @@ ThrowCompletionOr<void> ECMAScriptFunctionObject::function_declaration_instantia
Reference reference = TRY(vm.resolve_binding(param, used_environment));
// Here the difference from hasDuplicates is important
if (has_duplicates)
return reference.put_value(global_object, argument_value);
return reference.put_value(vm, argument_value);
else
return reference.initialize_referenced_binding(global_object, argument_value);
return reference.initialize_referenced_binding(vm, argument_value);
} else if (IsSame<NonnullRefPtr<BindingPattern> const&, decltype(param)>) {
// Here the difference from hasDuplicates is important
return vm.binding_initialization(param, argument_value, used_environment, global_object);