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-array-gc.js";
5 //-----------------------------------------------------------------------------
6 var BUGNUMBER = 852563;
7 var summary =
8 "IdValuePair::value should be initialized to avoid GC sequence-point issues";
10 print(BUGNUMBER + ": " + summary);
12 print("Note: You must run this test under valgrind to be certain it passes");
14 /**************
15 * BEGIN TEST *
16 **************/
18 var x;
20 if (typeof gczeal === "function")
21 gczeal(2, 1);
22 x = JSON.parse('{"foo":[]}');
23 Object.getPrototypeOf(x.foo) == Array.prototype;
24 x = JSON.parse('{"foo":[], "bar":[]}');
26 /******************************************************************************/
28 if (typeof reportCompare === "function")
29 reportCompare(true, true);
31 print("Tests complete");