Debian Codegraph @

js/src/jit-test/tests/debug/bug1004447.js

raw
1 // Tests that earlier try notes don't interfere with later exception handling.
2
3 var g = newGlobal({newCompartment: true});
4 g.debuggeeGlobal = this;
5 g.eval("(" + function () {
6 dbg = new Debugger(debuggeeGlobal);
7 } + ")();");
8 var myObj = { p1: 'a', }
9 try {
10 with(myObj) {
11 do {
12 throw value;
13 } while(false);
14 }
15 } catch(e) {
16 // The above is expected to throw.
17 }
18
19 try {
20 if(!(p1 === 1)) { }
21 } catch (e) {
22 // The above is expected to throw.
23 }