js/src/jit-test/tests/basic/bug651966.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.

     2 function f(code) {
     3     g = eval("(function(){" + code + "})");
     4     g()
     5 }
     6 f();
     7 f();
     8 f();
     9 f();
    10 f();
    11 f();
    12 f();
    13 f();
    14 f();
    15 f();
    16 f();
    17 f();
    18 f();
    19 f();
    20 f();
    21 f();
    22 try { f("function x(){}(x())"); } catch (e) {}
    24 function f2() {
    25     a = {
    26         x
    27     } = x, (x._)
    28     function
    29     x()({})
    30 }
    31 try { f2(); } catch (e) {}
    33 function f3() {
    34   var x = 0;
    35   with ({}) { x = 'three'; }
    36   return x;
    37 }
    38 f3();

mercurial