js/src/jit-test/tests/auto-regress/bug557946.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 // Binary: cache/js-dbg-64-6f1a38b94754-linux
     2 // Flags: -j
     3 //
     4 /* vim: set ts=8 sts=4 et sw=4 tw=99: */
     6 var x = 0;
     7 var y = 0;
     9 function h() {
    10     if (x == 1)
    11         y++;
    12     else
    13         y--;
    14 }
    16 function F() {
    17     var m = null;
    19     function g(i) {
    20         /* Force outgoing typemaps to have a string. */
    21         m = "badness";
    23         /* Loop a bit. */
    24         for (var i = 0; i < 10; i++) {
    25             h();
    26         }
    27     }
    29     /* Spin for a while so trees build. */
    30     for (var i = 0; i < 100; i++) {
    31         /* Capture m == TT_NULL in outgoing fi for rp[0] */
    32         g();
    34         /* Flip the switch to bail out with deep nested frames. */
    35         if (i > 50)
    36             x = 1;
    38         /* Set m = null on the loop tail to get better traces. */
    39         m = null;
    40     }
    41 }
    43 F();

mercurial