1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:58:11 +00:00

LibJS/Bytecode: Do not rethrow caught exception from finally

If the exception from the `try` block has already been caught by
`catch`, we need to clear the saved exception before entering `finally`
so that ContinuePendingUnwind will not re-throw it.

9 new passes on test262 :^)
This commit is contained in:
Daniel Bertalan 2023-07-14 15:50:36 +02:00 committed by Andreas Kling
parent 93b3f12680
commit e3f65f215d
2 changed files with 9 additions and 2 deletions

View file

@ -19,6 +19,8 @@ struct UnwindInfo {
BasicBlock const* finalizer;
JS::GCPtr<Environment> lexical_environment;
bool handler_called { false };
};
class BasicBlock {