js/src/jit-test/tests/debug/Frame-eval-09.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 // assigning to local variables in frame.eval code
     3 var g = newGlobal();
     4 var dbg = new Debugger(g);
     5 dbg.onDebuggerStatement = function (frame) {
     6     frame.eval("outerarg = 1; outervar = 2; innerarg = 3; innervar = 4;");
     7 };
     9 var result = g.eval("(" + function outer(outerarg) {
    10         var outervar = 200;
    11         function inner(innerarg) {
    12             var innervar = 400;
    13             debugger;
    14             return innerarg + innervar;
    15         }
    16         var innersum = inner(300);
    17         return outerarg + outervar + innersum;
    18     } + ")(100)");
    20 assertEq(result, 10);

mercurial