Bug 1413867 - Remove StopIteration object. r=evilpie

This commit is contained in:
Jan de Mooij
2017-11-05 19:01:04 +01:00
parent 57cd5740a8
commit 37b8f5c8c3
20 changed files with 31 additions and 251 deletions

View File

@@ -95,10 +95,6 @@ struct ReturnSuccess
{
};
struct ReturnStopIteration
{
};
struct ReturnDeadCPOW
{
};
@@ -116,7 +112,6 @@ struct ReturnObjectOpResult
union ReturnStatus
{
ReturnSuccess;
ReturnStopIteration;
ReturnDeadCPOW;
ReturnException;
ReturnObjectOpResult;

View File

@@ -62,11 +62,6 @@ WrapperAnswer::fail(AutoJSAPI& jsapi, ReturnStatus* rs)
if (!jsapi.StealException(&exn))
return true;
if (JS_IsStopIteration(exn)) {
*rs = ReturnStatus(ReturnStopIteration());
return true;
}
// If this fails, we still don't want to exit. Just return an invalid
// exception.
(void) toVariant(cx, exn, &rs->get_ReturnException().exn());

View File

@@ -1076,9 +1076,6 @@ WrapperOwner::ok(JSContext* cx, const ReturnStatus& status)
if (status.type() == ReturnStatus::TReturnSuccess)
return true;
if (status.type() == ReturnStatus::TReturnStopIteration)
return JS_ThrowStopIteration(cx);
if (status.type() == ReturnStatus::TReturnDeadCPOW) {
JS_ReportErrorASCII(cx, "operation not possible on dead CPOW");
return false;