/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
- // Debugger.Object referents can be transparent wrappers of objects in the debugger compartment.
- var g = newGlobal('new-compartment');
- g.f = function (a, b) { return a + "/" + b; };
- var dbg = Debugger(g);
- var hits = 0;
- dbg.onDebuggerStatement = function (frame) {
- var f = frame.eval("f").return;
- assertEq(f.call(null, "a", "b").return, "a/b");
- hits++;
- };
- g.eval("debugger;");
- assertEq(hits, 1);