michael@0: function run() { michael@0: var obj = { michael@0: toJSON: function() { michael@0: return { michael@0: key: { michael@0: toJSON: function() { michael@0: for (i=0; i!=1<<10; ++i) michael@0: new Object(); michael@0: var big = unescape("%udddd"); michael@0: while (big.length != 0x100000) michael@0: big += big; michael@0: for (i=0; i!=32; ++i) michael@0: new String(big+i); michael@0: return "whatever"; michael@0: } michael@0: }, michael@0: __iterator__: function() { michael@0: return { michael@0: next: function() { michael@0: return "key"; michael@0: } michael@0: } michael@0: } michael@0: } michael@0: } michael@0: }; michael@0: michael@0: var repl = function(id, val) { michael@0: this[0]++; michael@0: return val; michael@0: }; michael@0: michael@0: JSON.stringify(obj, repl); michael@0: } michael@0: run();