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

This commit is contained in:
Bill McCloskey 2016-01-19 17:25:39 -08:00
parent c51323e75d
commit 2de94a9236

View File

@ -602,9 +602,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;