PageRenderTime 22ms CodeModel.GetById 14ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

/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
 1// If frame.onStep returns {return:val}, the frame returns.
 2
 3var g = newGlobal('new-compartment');
 4g.eval("function f(x) {\n" +
 5       "    var a = x * x;\n" +
 6       "    return a;\n" +
 7       "}\n");
 8
 9var dbg = Debugger(g);
10dbg.onEnterFrame = function (frame) {
11    frame.onStep = function () { return {return: "pass"}; };
12};
13
14assertEq(g.f(4), "pass");