js/src/jit-test/tests/debug/Frame-onStep-resumption-02.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-resumption-02.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,17 @@
     1.4 +// If frame.onStep returns {throw:}, an exception is thrown in the debuggee.
     1.5 +
     1.6 +load(libdir + "asserts.js");
     1.7 +
     1.8 +var g = newGlobal();
     1.9 +g.eval("function h() { debugger; }\n" +
    1.10 +       "function f() {\n" +
    1.11 +       "    h();\n" +
    1.12 +       "    return 'fail';\n" +
    1.13 +       "}\n");
    1.14 +
    1.15 +var dbg = Debugger(g);
    1.16 +dbg.onDebuggerStatement = function (frame) {
    1.17 +    frame.older.onStep = function () { return {throw: "pass"}; };
    1.18 +};
    1.19 +
    1.20 +assertThrowsValue(g.f, "pass");

mercurial