michael@0: // The tracejit does not interfere with frame.onStep. michael@0: // michael@0: // The function f() writes 'L' to the log in a loop. If we enable stepping and michael@0: // write an 's' each time frame.onStep is called, any two Ls should have at michael@0: // least one 's' between them. michael@0: michael@0: var g = newGlobal(); michael@0: g.N = 11; michael@0: g.log = ''; michael@0: g.eval("function f() {\n" + michael@0: " for (var i = 0; i <= N; i++)\n" + michael@0: " log += 'L';\n" + michael@0: "}\n"); michael@0: g.f(); michael@0: assertEq(/LL/.exec(g.log) !== null, true); michael@0: michael@0: var dbg = Debugger(g); michael@0: dbg.onEnterFrame = function (frame) { michael@0: frame.onStep = function () { g.log += 's'; }; michael@0: }; michael@0: g.log = ''; michael@0: g.f(); michael@0: assertEq(/LL/.exec(g.log), null);