PageRenderTime 14ms CodeModel.GetById 11ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/js/src/jit-test/tests/debug/onDebuggerStatement-04.js

http://github.com/zpao/v8monkey
JavaScript | 10 lines | 10 code | 0 blank | 0 comment | 0 complexity | 6423ff031cb1b162d4174f752f45ed40 MD5 | raw file
 1var g = newGlobal('new-compartment');
 2var dbg = new Debugger(g);
 3dbg.onDebuggerStatement = function (frame) {
 4    var code = "assertEq(c, 'ok');\n";
 5    assertEq(frame.evalWithBindings("eval(s)", {s: code, a: 1234}).return, undefined);
 6};
 7g.eval("function first() { return second(); }");
 8g.eval("function second() { return eval('third()'); }");
 9g.eval("function third() { debugger; }");
10g.evaluate("first();");