js/src/jit-test/tests/ion/bug824473.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 dumpArgs(i) { if (i == 90) return funapply.arguments.length; return [i]; }
     2 function funapply() { return dumpArgs.apply({}, arguments); }
     3 function test(i) { return funapply(i); }
     5 assertEq(test(89)[0], 89);
     6 assertEq(test(90), 1);
     8 function dumpArgs2(i,b) { if (i == 90) return funapply2.arguments.length; return [i]; }
     9 function funapply2() { return dumpArgs2.apply({}, arguments); }
    10 function test2(i,b) { return funapply2(i,b); }
    12 assertEq(test2(89, 10)[0], 89);
    13 assertEq(test2(90, 10), 2);
    15 function dumpArgs3(i,b) { if (i == 90) return funapply3.arguments.length; return [i]; }
    16 function funapply3() { return dumpArgs3.apply({}, arguments); }
    17 function test3(i,b, c) { return funapply3(i,b,c); }
    19 assertEq(test3(89, 10, 11)[0], 89);
    20 assertEq(test3(90, 10, 11), 3);
    22 function dumpArgs4(i) { if (i == 90) return funapply4.arguments.length; return [i]; }
    23 function funapply4() { return dumpArgs4.apply({}, arguments); }
    24 function test4(i,b) { return funapply4(i,b,1,2); }
    26 assertEq(test4(89,10)[0], 89);
    27 assertEq(test4(90,10), 4);
    29 function dumpArgs5(i,j,k,l) { if (i == 90) return funapply5.arguments.length*10 + l; return [i]; }
    30 function funapply5() { return dumpArgs5.apply({}, arguments); }
    31 function test5(i,b) { return funapply5(i,b,1,2); }
    33 assertEq(test5(89,10)[0], 89);
    34 assertEq(test5(90,10), 42);
    36 function dumpArgs6(i) { if (i == 90) return funapply6.arguments.length; return [i]; }
    37 function funapply6() { return dumpArgs6.apply({}, arguments); }
    38 function test6(i) { return funapply6(i,1,2,3); }
    40 assertEq(test6(89)[0], 89);
    41 assertEq(test6(90), 4);

mercurial