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.

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

mercurial