js/src/jit-test/tests/debug/onEnterFrame-03.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 // frame.eval works in the enterFrame hook.
     2 // It triggers the enterFrame hook again, recursively. (!)
     4 var g = newGlobal();
     5 g.a = ".";
     7 var dbg = Debugger(g);
     8 var nestCount = 0, N = 9;
     9 var log = "";
    10 dbg.onEnterFrame = function (frame) {
    11     assertEq(frame.type, "eval");
    12     if (nestCount < N) {
    13         log += '(';
    14         nestCount++;
    15         var a = frame.eval("a").return;
    16         log += a;
    17         nestCount--;
    18         log += ')';
    19     }
    20 };
    22 assertEq(g.eval("a"), ".");
    23 assertEq(log, Array(N + 1).join("(") + Array(N + 1).join(".)"));

mercurial