Sign in
webkit
/
WebKit
/
63c63479e42d5d7cd9e5c20fa3c0adb62aed122e
/
.
/
JSTests
/
stress
/
number-prototype-to-string-exception.js
blob: 74459075dedcd2991311eca5f8ae87f95b73434f [
file
] [
log
] [
blame
]
function
assert
(
a
)
{
if
(!
a
)
throw
new
Error
(
"Bad assertion"
);
}
let o
=
{
valueOf
:
()
=>
{
throw
new
Error
(
"Bad"
);
return
2
;
}
}
let a
=
2
;
try
{
a
.
toString
(
o
);
assert
(
false
);
}
catch
(
e
)
{
assert
(
e
.
message
==
"Bad"
);
}