js/src/jit-test/tests/basic/testBug552248.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 // |jit-test| debug
     2 setDebug(true);
     3 var a = new Array();
     5 function i(save) {
     6     var x = 9;
     7     evalInFrame(0, "a.push(x)", save);
     8     evalInFrame(1, "a.push(z)", save);
     9     evalInFrame(2, "a.push(z)", save);
    10     evalInFrame(3, "a.push(y)", save);
    11     evalInFrame(4, "a.push(x)", save);
    12 }
    14 function h() {
    15     var z = 5;
    16     evalInFrame(0, "a.push(z)");
    17     evalInFrame(1, "a.push(y)");
    18     evalInFrame(2, "a.push(x)");
    19     evalInFrame(0, "i(false)");
    20     evalInFrame(0, "a.push(z)", true);
    21     evalInFrame(1, "a.push(y)", true);
    22     evalInFrame(2, "a.push(x)", true);
    23     evalInFrame(0, "i(true)", true);
    24 }
    26 function g() {
    27     var y = 4;
    28     h();
    29 }
    31 function f() {
    32     var x = 3;
    33     g();
    34 }
    36 f();
    37 assertEq(a+'', [5, 4, 3, 9, 5, 5, 4, 3, 5, 4, 3, 9, 5, 5, 4, 3]+'');

mercurial