Sign in
webkit
/
WebKit
/
a54b3fb85d852547123f52bdb1d297fcb55bc0cb
/
.
/
JSTests
/
stress
/
string-joining-long-strings-should-not-crash.js
blob: 62afaed8412373452148f9505eeb0d6ea07333f6 [
file
] [
log
] [
blame
]
//@ runDefault
// This test should not crash.
var
error
;
let str
=
''
;
let arr
=
[{},
2
,
3
];
try
{
for
(
let z
=
0
;
z
<
30
;
z
++)
str
=
arr
.
join
(
str
);
// exponentially grow length of string.
}
catch
(
e
)
{
error
=
e
;
}
if
(!
error
)
throw
Error
(
"Failed"
);