js/src/jit-test/tests/debug/Frame-onPop-10.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 // Setting onPop handlers from an onStep handler works.
     2 var g = newGlobal();
     3 var dbg = new Debugger(g);
     4 var log;
     6 dbg.onDebuggerStatement = function handleDebugger(frame) {
     7     log += 'd';
     8     assertEq(frame.type, "eval");
     9     frame.onStep = function handleStep() {
    10         log += 's';
    11         this.onStep = undefined;
    12         this.onPop = function handlePop() {
    13             log += ')';
    14         };
    15     };
    16 };
    18 log = "";
    19 g.flag = false;
    20 g.eval('debugger; flag = true');
    21 assertEq(log, 'ds)');
    22 assertEq(g.flag, true);

mercurial