|
1 // |reftest| skip-if(!xulRuntime.shell||xulRuntime.shell&&xulRuntime.XPCOMABI.match(/x86_64/)) slow |
|
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
3 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
4 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
6 |
|
7 //----------------------------------------------------------------------------- |
|
8 var BUGNUMBER = 458679; |
|
9 var summary = 'Do not assert: nbytes != 0'; |
|
10 var actual = ''; |
|
11 var expect = ''; |
|
12 |
|
13 printBugNumber(BUGNUMBER); |
|
14 printStatus (summary); |
|
15 |
|
16 function f() |
|
17 { |
|
18 for (var i = 1; i < dps.length; ++i) { |
|
19 var a = ""; |
|
20 var b = ""; |
|
21 var c = ""; |
|
22 } |
|
23 } |
|
24 |
|
25 function stringOfLength(n) |
|
26 { |
|
27 if (n == 0) { |
|
28 return ""; |
|
29 } else if (n == 1) { |
|
30 return "\""; |
|
31 } else { |
|
32 var r = n % 2; |
|
33 var d = (n - r) / 2; |
|
34 var y = stringOfLength(d); |
|
35 return y + y + stringOfLength(r); |
|
36 } |
|
37 } |
|
38 |
|
39 try |
|
40 { |
|
41 this.__defineGetter__('x', this.toSource); |
|
42 while (x.length < 12000000) { |
|
43 let q = x; |
|
44 s = q + q; |
|
45 } |
|
46 print(x.length); |
|
47 } |
|
48 catch(ex) |
|
49 { |
|
50 } |
|
51 |
|
52 reportCompare(expect, actual, summary); |