Sign in
webkit
/
WebKit
/
6ada3cd2e0d9b9e450b5e021e0e5526f55f59df8
/
.
/
JSTests
/
stress
/
generator-throw-before-first-call.js
blob: e46cb4f97ee10c38506e18eac0d9a3e41879edde [
file
] [
log
] [
blame
]
function
unreachable
()
{
throw
new
Error
(
"NG"
);
}
function
*
gen
()
{
unreachable
();
}
var
g
=
gen
();
var
error
=
new
Error
(
"OK"
);
var
thrown
=
null
;
try
{
g
.
throw
(
error
);
}
catch
(
e
)
{
thrown
=
e
;
}
if
(
thrown
!==
error
)
unreachable
();