From 3a5f7cb524bb061bae07ba0554ef1edcd34c502b Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Sat, 12 Feb 2022 00:32:18 +0330 Subject: [PATCH] LibJS: Don't emit a LeaveUnwindContext after a successful handler The handler already comes with a nice and shiny FinishUnwind, doubling up will leave two contexts instead. --- Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp index 39a1e430e1..5cb0bfa22b 100644 --- a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp +++ b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp @@ -1152,8 +1152,6 @@ void TryStatement::generate_bytecode(Bytecode::Generator& generator) const if (m_handler) { auto& handler_block = generator.make_block(); generator.switch_to_basic_block(handler_block); - if (!m_finalizer) - generator.emit(); m_handler->parameter().visit( [&](FlyString const& parameter) { if (!parameter.is_empty()) {