michael@0: // |reftest| skip-if(!xulRuntime.shell||xulRuntime.shell&&xulRuntime.XPCOMABI.match(/x86_64/)) slow michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 458679; michael@0: var summary = 'Do not assert: nbytes != 0'; michael@0: var actual = ''; michael@0: var expect = ''; michael@0: michael@0: printBugNumber(BUGNUMBER); michael@0: printStatus (summary); michael@0: michael@0: function f() michael@0: { michael@0: for (var i = 1; i < dps.length; ++i) { michael@0: var a = ""; michael@0: var b = ""; michael@0: var c = ""; michael@0: } michael@0: } michael@0: michael@0: function stringOfLength(n) michael@0: { michael@0: if (n == 0) { michael@0: return ""; michael@0: } else if (n == 1) { michael@0: return "\""; michael@0: } else { michael@0: var r = n % 2; michael@0: var d = (n - r) / 2; michael@0: var y = stringOfLength(d); michael@0: return y + y + stringOfLength(r); michael@0: } michael@0: } michael@0: michael@0: try michael@0: { michael@0: this.__defineGetter__('x', this.toSource); michael@0: while (x.length < 12000000) { michael@0: let q = x; michael@0: s = q + q; michael@0: } michael@0: print(x.length); michael@0: } michael@0: catch(ex) michael@0: { michael@0: } michael@0: michael@0: reportCompare(expect, actual, summary);