js/src/jit-test/tests/ion/bug789420.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 g1(x, y) {
     2     return 0 & y;
     3 }
     4 var c1 = 0;
     5 function f1() {
     6     for (var i=0; i<100; i++) {
     7         g1(i, i);
     8         g1(i, {valueOf: function() { c1++; return 0; }});
     9     }
    10 }
    11 f1();
    12 assertEq(c1, 100);
    14 function g2(x, y) {
    15     ~y;
    16 }
    17 var c2 = 0;
    18 function f2() {
    19     for (var i=0; i<100; i++) {
    20         g2(i, i);
    21         g2(i, {valueOf: function() { c2++; return 0; }});
    22     }
    23 }
    24 f2();
    25 assertEq(c2, 100);
    27 function g3(x, y) {
    28     return 0 >>> y;
    29 }
    30 var c3 = 0;
    31 function f3() {
    32     for (var i=0; i<100; i++) {
    33         g3(i, i);
    34         g3(i, {valueOf: function() { c3++; return 0; }});
    35     }
    36 }
    37 f3();
    38 assertEq(c3, 100);

mercurial