mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
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.
This commit is contained in:
committed by
Linus Groh
parent
d7c207beb9
commit
3a5f7cb524
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user