LibJS: Also set ExecutionContext::realm in Bytecode::Interpreter::run()

I forgot to consider the bytecode Interpreter when adding a Realm to the
ExecutionContext. This should make it a lot less crashy again :^)
This commit is contained in:
Linus Groh 2021-09-13 21:05:53 +01:00
parent 1d47ec380f
commit 35cc579264
Notes: sideshowbarker 2024-07-18 04:00:45 +09:00

View file

@ -53,7 +53,7 @@ Value Interpreter::run(Executable const& executable, BasicBlock const* entry_poi
execution_context.function_name = global_execution_context_name;
execution_context.lexical_environment = &m_realm.global_environment();
execution_context.variable_environment = &m_realm.global_environment();
VERIFY(!vm().exception());
execution_context.realm = &m_realm;
// FIXME: How do we know if we're in strict mode? Maybe the Bytecode::Block should know this?
// execution_context.is_strict_mode = ???;
vm().push_execution_context(execution_context, global_object());