1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 09:17:34 +00:00

LibJS: Reset scheduled-jump flag when throwing an exception

Otherwise we might attempt to follow the scheduled jump later
This commit is contained in:
Hendiadyoin1 2023-10-20 17:55:14 +02:00 committed by Andreas Kling
parent f5645e3c9c
commit 4da5b8ec67
2 changed files with 23 additions and 0 deletions

View file

@ -277,6 +277,7 @@ void Interpreter::run_bytecode()
if (result.is_error()) [[unlikely]] {
reg(Register::exception()) = *result.throw_completion().value();
m_scheduled_jump = {};
auto const* handler = m_current_block->handler();
auto const* finalizer = m_current_block->finalizer();
if (!handler && !finalizer)