|
1 // |reftest| skip |
|
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
3 /* |
|
4 * Any copyright is dedicated to the Public Domain. |
|
5 * http://creativecommons.org/licenses/publicdomain/ |
|
6 * Contributor: Jason Orendorff |
|
7 */ |
|
8 |
|
9 //----------------------------------------------------------------------------- |
|
10 var BUGNUMBER = 479381; |
|
11 var summary = 'Do not crash @ js_FinalizeStringRT with multi-threads.'; |
|
12 var actual = ''; |
|
13 var expect = ''; |
|
14 |
|
15 |
|
16 //----------------------------------------------------------------------------- |
|
17 test(); |
|
18 //----------------------------------------------------------------------------- |
|
19 |
|
20 function test() |
|
21 { |
|
22 enterFunc ('test'); |
|
23 printBugNumber(BUGNUMBER); |
|
24 printStatus (summary); |
|
25 |
|
26 if (typeof gczeal != 'function' || typeof scatter != 'function') |
|
27 { |
|
28 print(expect = actual = 'Test skipped: requires mulithreads'); |
|
29 } |
|
30 else |
|
31 { |
|
32 expect = actual = 'No Crash'; |
|
33 |
|
34 gczeal(2); |
|
35 |
|
36 function f() { |
|
37 var s; |
|
38 for (var i = 0; i < 9999; i++) |
|
39 s = 'a' + String(i)[3] + 'b'; |
|
40 return s; |
|
41 } |
|
42 |
|
43 print(scatter([f, f, f, f])); |
|
44 |
|
45 gczeal(0); |
|
46 } |
|
47 |
|
48 reportCompare(expect, actual, summary); |
|
49 |
|
50 exitFunc ('test'); |
|
51 } |