diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2022-02-12 00:32:18 +0330 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-02-13 14:41:33 +0000 |
commit | 3a5f7cb524bb061bae07ba0554ef1edcd34c502b (patch) | |
tree | 68a42013e4d8fc6bf12e5c1b91b737ff66e0c40e | |
parent | d7c207beb98e8ef27576bf3375beb483fdac7c6e (diff) | |
download | serenity-3a5f7cb524bb061bae07ba0554ef1edcd34c502b.zip |
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.
-rw-r--r-- | Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp | 2 |
1 files changed, 0 insertions, 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<Bytecode::Op::LeaveUnwindContext>(); m_handler->parameter().visit( [&](FlyString const& parameter) { if (!parameter.is_empty()) { |