js/src/jit-test/tests/ion/bug731820.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 BigInteger(a, b, c) {
     2     this.array = new Array();
     3     if (a != null) {
     4 	var this_array = this.array;
     5 	this.t = 0;
     6 	var i = a.length;
     7 	while (--i >= 0) {
     8 	    this_array[this.t++] = 0;
     9 	}
    10     }
    11 }
    12 function bnpCopyTo(r, g) {
    13     var this_array = g.array;
    14     for (var i = g.t - 1; i >= 0; --i) 
    15 	r.array[i] = g.array[i];
    16     r.t = g.t;
    17 }
    18 function montConvert(x) {
    19     var r = new BigInteger(null);
    20     r.t = 56;
    21     return r;
    22 }
    23 var ba = new Array();
    24 a = new BigInteger(ba);
    25 new BigInteger("afdsafdsafdsaafdsafdsafdsafdsafdsafdsafdsafdsafdsafdsfds");
    26 g = montConvert(a);
    27 var r = new BigInteger(null);
    28 bnpCopyTo(r, g);

mercurial