js/src/jit-test/tests/debug/Frame-onStep-05.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/Frame-onStep-05.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,14 @@
     1.4 +// Upon returning to a frame with an onStep hook, the hook is called before the
     1.5 +// next line.
     1.6 +
     1.7 +var g = newGlobal();
     1.8 +g.log = '';
     1.9 +g.eval("function f() { debugger; }");
    1.10 +
    1.11 +var dbg = Debugger(g);
    1.12 +dbg.onDebuggerStatement = function (frame) {
    1.13 +    frame.older.onStep = function () { g.log += 's'; };
    1.14 +};
    1.15 +g.eval("f();\n" +
    1.16 +       "log += 'x';\n");
    1.17 +assertEq(g.log.charAt(0), 's');

mercurial