1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 10:18:15 +09:00

LibJS: Set the callee context's realm in prepare_for_ordinary_call()

This includes making FunctionObject::realm() actually return a Realm,
instead of a GlobalObject.
This commit is contained in:
Linus Groh 2021-09-11 21:42:01 +01:00
parent 332946ab4f
commit 06e89311fa
Notes: sideshowbarker 2024-07-18 22:57:59 +09:00
8 changed files with 31 additions and 11 deletions

View file

@ -53,7 +53,7 @@ void Interpreter::run(GlobalObject& global_object, const Program& program)
execution_context.function_name = global_execution_context_name;
execution_context.lexical_environment = &realm().global_environment();
execution_context.variable_environment = &realm().global_environment();
VERIFY(!vm.exception());
execution_context.realm = &realm();
execution_context.is_strict_mode = program.is_strict_mode();
vm.push_execution_context(execution_context, global_object);
VERIFY(!vm.exception());