OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
| 5 // Flags: --max-old-space-size=400 |
| 6 |
5 s1 = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; | 7 s1 = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; |
6 s1 += s1; | 8 s1 += s1; |
7 s1 += s1; | 9 s1 += s1; |
8 s1 += s1; | 10 s1 += s1; |
9 s1 += s1; | 11 s1 += s1; |
10 | 12 |
11 s0 = 'a'; | 13 s0 = 'a'; |
12 | 14 |
13 function g() { | 15 function g() { |
14 for (var j = 0; j < 1000000; j++) { | 16 for (var j = 0; j < 1000000; j++) { |
15 s0 += s1; | 17 s0 += s1; |
16 } | 18 } |
17 } | 19 } |
18 | 20 |
19 try { | 21 try { |
20 g(); | 22 g(); |
21 } catch (e) { | 23 } catch (e) { |
22 } | 24 } |
23 | 25 |
24 assertEquals('x', s0[10]); | 26 assertEquals('x', s0[10]); |
OLD | NEW |