mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 04:08:08 +00:00
LibJS: Remove an old VERIFY from break handling in try-finally blocks
The VERIFY assumed that we either have a finally block which we already
visited through a previous boundary or have no finally block what so
ever; But since 301a1fc763 we propagate
finalizers through unwind scopes breaking that assumption.
This commit is contained in:
committed by
Andreas Kling
parent
3438293e7b
commit
d79347dd4a
@@ -902,7 +902,6 @@ void Generator::generate_scoped_jump(JumpType type)
|
||||
}
|
||||
break;
|
||||
case Unwind:
|
||||
VERIFY(last_was_finally || !m_current_unwind_context->finalizer().has_value());
|
||||
if (!last_was_finally) {
|
||||
VERIFY(m_current_unwind_context && m_current_unwind_context->handler().has_value());
|
||||
emit<Bytecode::Op::LeaveUnwindContext>();
|
||||
@@ -944,7 +943,6 @@ void Generator::generate_labelled_jump(JumpType type, DeprecatedFlyString const&
|
||||
for (; current_boundary > 0; --current_boundary) {
|
||||
auto boundary = m_boundaries[current_boundary - 1];
|
||||
if (boundary == BlockBoundaryType::Unwind) {
|
||||
VERIFY(last_was_finally || !m_current_unwind_context->finalizer().has_value());
|
||||
if (!last_was_finally) {
|
||||
VERIFY(m_current_unwind_context && m_current_unwind_context->handler().has_value());
|
||||
emit<Bytecode::Op::LeaveUnwindContext>();
|
||||
|
||||
Reference in New Issue
Block a user