/js/src/jit-test/tests/debug/Frame-onStep-resumption-01.js
http://github.com/zpao/v8monkey · JavaScript · 14 lines · 10 code · 3 blank · 1 comment · 0 complexity · ca4e9851d6e2f3395e99a83eaa702d25 MD5 · raw file
- // If frame.onStep returns {return:val}, the frame returns.
- var g = newGlobal('new-compartment');
- g.eval("function f(x) {\n" +
- " var a = x * x;\n" +
- " return a;\n" +
- "}\n");
- var dbg = Debugger(g);
- dbg.onEnterFrame = function (frame) {
- frame.onStep = function () { return {return: "pass"}; };
- };
- assertEq(g.f(4), "pass");