mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00: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:
parent
332946ab4f
commit
06e89311fa
8 changed files with 31 additions and 11 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue