mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibJS: Fix crash in bytecode generator on https://twinings.co.uk/
If the current block has already been terminated, we should just skip creating a per-iteration environment.
This commit is contained in:
committed by
Andreas Kling
parent
c5afe70f77
commit
9a7e6158af
@@ -0,0 +1,12 @@
|
||||
test("check that codegen doesn't crash", () => {
|
||||
function func(x) {
|
||||
expect(x()).toBe(0);
|
||||
}
|
||||
|
||||
function go() {
|
||||
for (let i = 0; ; ) {
|
||||
func(() => i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user