|
1 // |reftest| skip-if(!xulRuntime.shell&&(Android||xulRuntime.OS=="WINNT"||xulRuntime.OS=="Linux")) silentfail slow -- bug 528464 |
|
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 = 342960; |
|
9 var summary = 'Do not crash on large string toSource'; |
|
10 var actual = 'No Crash'; |
|
11 var expect = 'No Crash'; |
|
12 |
|
13 |
|
14 //----------------------------------------------------------------------------- |
|
15 test(); |
|
16 //----------------------------------------------------------------------------- |
|
17 |
|
18 function test() |
|
19 { |
|
20 enterFunc ('test'); |
|
21 printBugNumber(BUGNUMBER); |
|
22 printStatus (summary); |
|
23 |
|
24 expectExitCode(0); |
|
25 expectExitCode(5); |
|
26 |
|
27 function v() |
|
28 { |
|
29 var meg=""; |
|
30 var r=""; |
|
31 var i; |
|
32 print("don't interrupt the script. let it go."); |
|
33 for(i=0;i<1024*1024;i++) meg += "v"; |
|
34 for(i=0;i<1024/8;i++) r += meg; |
|
35 var o={f1: r, f2: r, f3: r,f4: r,f5: r, f6: r, f7: r, f8: r,f9: r}; |
|
36 print('done obj'); |
|
37 var rr=r.toSource(); |
|
38 print('done toSource()'); |
|
39 } |
|
40 |
|
41 v(); |
|
42 |
|
43 reportCompare(expect, actual, summary); |
|
44 |
|
45 exitFunc ('test'); |
|
46 } |