Bug 1240985 - Fix cancel during timeout (r=dvander)

This commit is contained in:
Bill McCloskey 2016-01-19 17:25:39 -08:00
parent eddd3a1616
commit 227fa04346

View File

@ -598,9 +598,21 @@ MessageChannel::MaybeInterceptSpecialIOMessage(const Message& aMsg)
}
return true;
} else if (CANCEL_MESSAGE_TYPE == aMsg.type()) {
CancelCurrentTransactionInternal();
NotifyWorkerThread();
return true;
IPC_LOG("Cancel from message");
if (aMsg.transaction_id() == mTimedOutMessageSeqno) {
// An unusual case: We timed out a transaction which the other
// side then cancelled. In this case we just leave the timedout
// state and try to forget this ever happened.
mTimedOutMessageSeqno = 0;
return true;
} else {
MOZ_RELEASE_ASSERT(mCurrentTransaction == aMsg.transaction_id());
CancelCurrentTransactionInternal();
NotifyWorkerThread();
IPC_LOG("Notified");
return true;
}
}
}
return false;