js/src/jit-test/tests/ion/bug734383.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 function foo(a, b) {
     2     var s = "foo";
     3     for (var j = 0; j < 5; j++)
     4         s += a[b[j]];
     5     return s;
     6 }
     8 var a = {a:"zero", b:"one", c:"two", d:"three", e:"four"};
     9 var b = ["a", "b", "c", "d", "e"];
    11 for (var i=0; i<9; i++)
    12     assertEq(foo(a, b), "foozeroonetwothreefour");
    14 a.e = 4;
    15 assertEq(foo(a, b), "foozeroonetwothree4");

mercurial