mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 04:37:55 +00:00
LibJS: Propagate exceptions across bytecode executable boundaries
To support situations like this:
function foo() { throw 1; }
try {
foo();
} catch (e) {
}
Each unwind context now keeps track of its origin executable.
When an exception is thrown, we return from run() immediately if the
nearest unwind context isn't in the current executable.
This causes a natural unwind to the point where we find the
catch/finally block(s) to jump into.
This commit is contained in:
@@ -39,6 +39,7 @@ private:
|
||||
};
|
||||
|
||||
struct UnwindInfo {
|
||||
Executable const* executable;
|
||||
BasicBlock const* handler;
|
||||
BasicBlock const* finalizer;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user