js/src/jit-test/tests/debug/Frame-onStep-07.js

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 // The tracejit does not interfere with frame.onStep.
     2 //
     3 // The function f() writes 'L' to the log in a loop. If we enable stepping and
     4 // write an 's' each time frame.onStep is called, any two Ls should have at
     5 // least one 's' between them.
     7 var g = newGlobal();
     8 g.N = 11;
     9 g.log = '';
    10 g.eval("function f() {\n" +
    11        "    for (var i = 0; i <= N; i++)\n" +
    12        "        log += 'L';\n" +
    13        "}\n");
    14 g.f();
    15 assertEq(/LL/.exec(g.log) !== null, true);
    17 var dbg = Debugger(g);
    18 dbg.onEnterFrame = function (frame) {
    19     frame.onStep = function () { g.log += 's'; };
    20 };
    21 g.log = '';
    22 g.f();
    23 assertEq(/LL/.exec(g.log), null);

mercurial