summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Debugger-debuggees-22.js
blob: bf1dd638e1150547fa6693f0e9e0f04bb9f7ab46 (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();
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);
} + ")();");