summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/bug1004447.js
blob: 18ee6757f5779a1380984cdbb82805cc501ba4b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Tests that earlier try notes don't interfere with later exception handling.

var g = newGlobal({newCompartment: true});
g.debuggeeGlobal = this;
g.eval("(" + function () {
  dbg = new Debugger(debuggeeGlobal);
} + ")();");
var myObj = { p1: 'a', }
try {
  with(myObj) {
    do {
      throw value;
    } while(false);
  }
} catch(e) {
  // The above is expected to throw.
}

try {
  if(!(p1 === 1)) { }
} catch (e) {
  // The above is expected to throw.
}