Sign in
chromium
/
external
/
github.com
/
WebKit
/
webkit
/
refs/heads/main
/
.
/
JSTests
/
microbenchmarks
/
destructuring-array-default-value-can-throw.js
blob: a1572010b6b71ad1c2492fca93bb57faf869f6e2 [
file
] [
log
] [
blame
] [
edit
]
(
function
()
{
var
arr
=
[
1
,
2
];
var
c
=
0
;
for
(
var
i
=
0
;
i
<
1e7
;
i
++)
{
var
[
a
,
b
=
thrower
()]
=
arr
;
c
+=
a
+
b
;
}
if
(
c
!==
3e7
)
throw
new
Error
(
"Bad value!"
);
function
thrower
()
{
throw
new
Error
(
"foo"
);
}
})();