Sat, 03 Jan 2015 20:18:00 +0100
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 // Any copyright is dedicated to the Public Domain.
2 // http://creativecommons.org/licenses/publicdomain/
4 var gTestfile = 'parse-mega-huge-array.js';
5 //-----------------------------------------------------------------------------
6 var BUGNUMBER = 667527;
7 var summary = "JSON.parse should parse arrays of essentially unlimited size";
9 print(BUGNUMBER + ": " + summary);
11 /**************
12 * BEGIN TEST *
13 **************/
15 var str = '[';
16 for (var i = 0, sz = Math.pow(2, 21); i < sz; i++)
17 str += '0,';
18 str += '0]';
20 var arr = JSON.parse(str);
21 assertEq(arr.length, Math.pow(2, 21) + 1);
23 /******************************************************************************/
25 if (typeof reportCompare === "function")
26 reportCompare(true, true);
28 print("Tests complete");