From 35cc57926497db7c151f202c6559924e30440dc0 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Mon, 13 Sep 2021 21:05:53 +0100 Subject: [PATCH] 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 :^) --- Userland/Libraries/LibJS/Bytecode/Interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp index 61e174d210..7f0943c7ac 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -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());