js/src/jit-test/tests/debug/Debugger-debuggees-22.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/debug/Debugger-debuggees-22.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,24 @@
     1.4 +// Adding a debuggee allowed with scripts on stack.
     1.5 +
     1.6 +var g = newGlobal();
     1.7 +g.dbg = new Debugger;
     1.8 +
     1.9 +g.eval("" + function f(d) {
    1.10 +  g(d);
    1.11 +  if (d)
    1.12 +    assertEq(dbg.hasDebuggee(this), true);
    1.13 +});
    1.14 +
    1.15 +g.eval("" + function g(d) {
    1.16 +  if (!d)
    1.17 +    return;
    1.18 +
    1.19 +  dbg.addDebuggee(this);
    1.20 +});
    1.21 +
    1.22 +g.eval("(" + function test() {
    1.23 +  f(false);
    1.24 +  f(false);
    1.25 +  f(true);
    1.26 +  f(true);
    1.27 +} + ")();");

mercurial