js/src/jit-test/tests/basic/testBug762105.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 escapeme() {}
     3 function f1(x) {
     4     escapeme(arguments);
     5     var y = ++x;
     6     return x + y;
     7 }
     8 for (var i = 0; i < 100; ++i)
     9     assertEq(f1(2), 6);
    11 function f2(x) {
    12     escapeme(arguments);
    13     var y = --x;
    14     return x + y;
    15 }
    16 for (var i = 0; i < 100; ++i)
    17     assertEq(f2(2), 2);
    19 function f3(x) {
    20     escapeme(arguments);
    21     var y = x++;
    22     return x + y;
    23 }
    24 for (var i = 0; i < 100; ++i)
    25     assertEq(f3(2), 5);
    27 function f4(x) {
    28     escapeme(arguments);
    29     var y = x--;
    30     return x + y;
    31 }
    32 for (var i = 0; i < 100; ++i)
    33     assertEq(f4(2), 3);

mercurial