mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +00:00
LibJS: Cleanup unwind state when transferring control out of a finalizer
This does two things: * Clear exceptions when transferring control out of a finalizer Otherwise they would resurface at the end of the next finalizer (see test the new test case), or at the end of a function * Pop one scheduled jump when transferring control out of a finalizer This removes one old FIXME
This commit is contained in:
committed by
Andreas Kling
parent
27b238d9af
commit
ada5027163
@@ -532,7 +532,10 @@ void Generator::generate_scoped_jump(JumpType type)
|
||||
switch_to_basic_block(block);
|
||||
last_was_finally = true;
|
||||
break;
|
||||
};
|
||||
}
|
||||
case LeaveFinally:
|
||||
emit<Op::LeaveFinally>();
|
||||
break;
|
||||
}
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
|
||||
Reference in New Issue
Block a user