js/src/jit-test/tests/jaeger/bug587431.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() {
     2   var UPPER_MASK = 2147483648
     3   var mt = new Array
     4   function f1(n1) {
     5     return n1 < 0 ? (n1 ^ UPPER_MASK) + UPPER_MASK: n1
     6   }
     7   function f2(n1, n2) {
     8     return f1(n1 + n2 & 4294967295)
     9   }
    10   function f3(n1, n2) {
    11     var sum
    12     for (var i = 0; i < 32; ++i) {
    13       sum = f2(sum, f1(n2 << i))
    14     }
    15     return sum
    16   }
    17   this.init_genrand = function(s) {
    18     mt[0] = f1(s & 96295)
    19     for (mti = 1; mti < 6; mti++) {
    20       mt[mti] = f2(f3(3, f1(mt[mti - 1] ^ mt[1] > 0)), mti)
    21     }
    22   }
    23 } (function() {
    24   var fuzzMT = new g;
    25   fuzzMT.init_genrand(54)
    26 } ())
    28 /* Don't assert. */

mercurial