summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Debugger-debuggees-22.js
blob: 4191fb0e61bb611c09f4973b846af50d530760ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Adding a debuggee allowed with scripts on stack.

var g = newGlobal({newCompartment: true});
g.dbg = new Debugger;

g.eval("" + function f(d) {
  g(d);
  if (d)
    assertEq(dbg.hasDebuggee(this), true);
});

g.eval("" + function g(d) {
  if (!d)
    return;

  dbg.addDebuggee(this);
});

g.eval("(" + function test() {
  f(false);
  f(false);
  f(true);
  f(true);
} + ")();");