js/src/jit-test/tests/asm.js/testBug952022.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 g(f) {
     2     for (var j = 0; j < 9; ++j) {
     3         try {
     4             f()
     5         } catch (e) {}
     6     }
     7 }
     8 function h(code) {
     9     Function(code)();
    10 }
    11 g([]);
    12 g([]);
    13 g([]);
    14 g([]);
    15 g([]);
    16 g([]);
    17 g([]);
    18 g([]);
    19 g([]);
    20 g([]);
    21 g([]);
    22 g([]);
    23 g([]);
    24 g([]);
    25 g([]);
    26 g([]);
    27 g([]);
    28 g([]);
    29 g([]);
    30 g([]);
    31 g([]);
    32 g([]);
    33 g([]);
    34 g([]);
    35 g([]);
    36 g([]);
    37 g([]);
    38 g([]);
    39 g([]);
    40 g([]);
    41 h("\
    42     m = (function(stdlib, foreign) { \
    43         \"use asm\";\
    44         var ff=foreign.ff;\
    45         function f(){\
    46             ff(0);\
    47         } \
    48         return f \
    49     })(this , { \
    50         ff: arguments.callee.caller\
    51     });\
    52     g(m , []);\
    53 ");
    54 h("\
    55     m = undefined;\
    56     gc();\
    57 ")

mercurial