From b86f1c2fe7b304f44c72533a6e08ecf615f0fc90 Mon Sep 17 00:00:00 2001 From: Hendiadyoin1 Date: Tue, 8 Nov 2022 19:38:57 +0100 Subject: [PATCH] LibJS: Restore cached current_block on return in Bytecode Otherwise debug prints will show the wrong block until we preform a jump --- Userland/Libraries/LibJS/Bytecode/Interpreter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp index 41eb283228..428b0f3be6 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -61,7 +61,8 @@ Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Executable const& e pushed_execution_context = true; } - m_current_block = entry_point ?: &executable.basic_blocks.first(); + TemporaryChange restore_current_block { m_current_block, entry_point ?: &executable.basic_blocks.first() }; + if (in_frame) m_register_windows.append(in_frame); else