michael@0: // Any copyright is dedicated to the Public Domain. michael@0: // http://creativecommons.org/licenses/publicdomain/ michael@0: michael@0: var gTestfile = "parse-array-gc.js"; michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 852563; michael@0: var summary = michael@0: "IdValuePair::value should be initialized to avoid GC sequence-point issues"; michael@0: michael@0: print(BUGNUMBER + ": " + summary); michael@0: michael@0: print("Note: You must run this test under valgrind to be certain it passes"); michael@0: michael@0: /************** michael@0: * BEGIN TEST * michael@0: **************/ michael@0: michael@0: var x; michael@0: michael@0: if (typeof gczeal === "function") michael@0: gczeal(2, 1); michael@0: x = JSON.parse('{"foo":[]}'); michael@0: Object.getPrototypeOf(x.foo) == Array.prototype; michael@0: x = JSON.parse('{"foo":[], "bar":[]}'); michael@0: michael@0: /******************************************************************************/ michael@0: michael@0: if (typeof reportCompare === "function") michael@0: reportCompare(true, true); michael@0: michael@0: print("Tests complete");