js/src/jit-test/tests/ion/bug719774.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 Date.prototype.format1 = function() {
     2     return "" + this.getMonth() + this.getFullYear();
     3 }
     4 function f(d) {
     5     for (var i=0; i<60; i++) {
     6         assertEq(d.format1(), "91987");
     7     }
     8 }
     9 f(new Date("10/10/1987 1:11:11"));
    11 var global = 0;
    12 function f1() {
    13     return global++;
    14 }
    15 function g1() {
    16     return f1() + f1();
    17 }
    18 var result = 0;
    19 for (var i=0; i<100; i++)
    20     result += g1();
    21 assertEq(result, 19900);
    23 function g2() {
    24     var a = [];
    25     var b = [];
    26     a.push(1);
    27     return a.length + b.length;
    28 }
    29 for (var i=0; i<100; i++)
    30     assertEq(g2(), 1);

mercurial