Sign in
webkit
/
WebKit
/
36168652e4948b4e847a9c1caf1fabcf1810968f
/
.
/
JSTests
/
stress
/
frozen-array-length-should-throw-strict.js
blob: e6dfd326bb99c15f8d398b30409130de72ff9dfe [
file
] [
log
] [
blame
]
const
a
=
Object
.
freeze
([
'a'
]);
function
test
(
a
)
{
"use strict"
;
try
{
a
.
length
=
2
;
}
catch
(
e
)
{
if
(
e instanceof
TypeError
)
return
;
}
throw
new
Error
(
"didn't throw the right exception"
);
}
noInline
(
test
);
for
(
let i
=
0
;
i
<
10000
;
i
++)
test
(
a
);