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

LibJS: Replace GlobalObject with VM in common AOs [Part 18/19]

This commit is contained in:
Linus Groh 2022-08-21 19:24:32 +01:00
parent 7856886ed5
commit 25849f8a6d
95 changed files with 536 additions and 677 deletions

View file

@ -3548,7 +3548,7 @@ JS_DEFINE_NATIVE_FUNCTION(@prototype_class@::for_each)
generate_variable_statement(iterator_generator, "wrapped_key", interface.pair_iterator_types->get<0>(), "key", interface);
generate_variable_statement(iterator_generator, "wrapped_value", interface.pair_iterator_types->get<1>(), "value", interface);
iterator_generator.append(R"~~~(
TRY(call(global_object, callback.as_function(), vm.argument(1), wrapped_value, wrapped_key, this_value));
TRY(call(vm, callback.as_function(), vm.argument(1), wrapped_value, wrapped_key, this_value));
return {};
}));