Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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");