From c2108489a51bc96cc537aab09bedc67f0a6c363a Mon Sep 17 00:00:00 2001 From: Hendiadyoin1 Date: Sun, 13 Nov 2022 20:45:31 +0100 Subject: [PATCH] LibJS: Don't try to manage unwind contexts in the execution loop in BC We are already doing this in a good manner via the generated code, doing so in the execution loop as well will cause us to pop contexts multiple times, which is not very good. --- Userland/Libraries/LibJS/Bytecode/Interpreter.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp index 69f7fdc3cc..5328b562f9 100644 --- a/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Interpreter.cpp @@ -91,10 +91,6 @@ Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Executable const& e m_current_block = unwind_context.handler; unwind_context.handler = nullptr; - // If there's no finalizer, there's nowhere for the handler block to unwind to, so the unwind context is no longer needed. - if (!unwind_context.finalizer) - unwind_contexts().take_last(); - accumulator() = exception_value; m_saved_exception = {}; will_jump = true; @@ -102,7 +98,6 @@ Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Executable const& e } if (unwind_context.finalizer) { m_current_block = unwind_context.finalizer; - unwind_contexts().take_last(); will_jump = true; break; }