PageRenderTime 22ms CodeModel.GetById 13ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/js/src/jit-test/tests/debug/Object-02.js

http://github.com/zpao/v8monkey
JavaScript | 13 lines | 11 code | 1 blank | 1 comment | 0 complexity | 0cf14b73a58b3e4bf33d5c2b06ebd2f3 MD5 | raw file
 1// Debugger.Object referents can be transparent wrappers of objects in the debugger compartment.
 2
 3var g = newGlobal('new-compartment');
 4g.f = function (a, b) { return a + "/" + b; };
 5var dbg = Debugger(g);
 6var hits = 0;
 7dbg.onDebuggerStatement = function (frame) {
 8    var f = frame.eval("f").return;
 9    assertEq(f.call(null, "a", "b").return, "a/b");
10    hits++;
11};
12g.eval("debugger;");
13assertEq(hits, 1);