1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/js1_7/extensions/regress-458679.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,52 @@ 1.4 +// |reftest| skip-if(!xulRuntime.shell||xulRuntime.shell&&xulRuntime.XPCOMABI.match(/x86_64/)) slow 1.5 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +//----------------------------------------------------------------------------- 1.11 +var BUGNUMBER = 458679; 1.12 +var summary = 'Do not assert: nbytes != 0'; 1.13 +var actual = ''; 1.14 +var expect = ''; 1.15 + 1.16 +printBugNumber(BUGNUMBER); 1.17 +printStatus (summary); 1.18 + 1.19 +function f() 1.20 +{ 1.21 + for (var i = 1; i < dps.length; ++i) { 1.22 + var a = ""; 1.23 + var b = ""; 1.24 + var c = ""; 1.25 + } 1.26 +} 1.27 + 1.28 +function stringOfLength(n) 1.29 +{ 1.30 + if (n == 0) { 1.31 + return ""; 1.32 + } else if (n == 1) { 1.33 + return "\""; 1.34 + } else { 1.35 + var r = n % 2; 1.36 + var d = (n - r) / 2; 1.37 + var y = stringOfLength(d); 1.38 + return y + y + stringOfLength(r); 1.39 + } 1.40 +} 1.41 + 1.42 +try 1.43 +{ 1.44 + this.__defineGetter__('x', this.toSource); 1.45 + while (x.length < 12000000) { 1.46 + let q = x; 1.47 + s = q + q; 1.48 + } 1.49 + print(x.length); 1.50 +} 1.51 +catch(ex) 1.52 +{ 1.53 +} 1.54 + 1.55 +reportCompare(expect, actual, summary);