bug 788001 - incorrect spdy assert conditions r=honzab

--HG--
extra : rebase_source : 9e5bc856e2075dc5b497d165e328f6f8667e5493
This commit is contained in:
Patrick McManus 2013-03-12 15:41:56 -04:00
parent 277390be58
commit c9bebb501e
2 changed files with 2 additions and 12 deletions

View File

@ -283,13 +283,11 @@ SpdySession2::AddStream(nsAHttpTransaction *aHttpTransaction,
int32_t aPriority)
{
NS_ABORT_IF_FALSE(PR_GetCurrentThread() == gSocketThread, "wrong thread");
NS_ABORT_IF_FALSE(!mStreamTransactionHash.Get(aHttpTransaction),
"AddStream duplicate transaction pointer");
// integrity check
if (mStreamTransactionHash.Get(aHttpTransaction)) {
LOG3((" New transaction already present\n"));
NS_ABORT_IF_FALSE(false, "New transaction already present in hash");
NS_ABORT_IF_FALSE(false, "AddStream duplicate transaction pointer");
return false;
}
@ -1824,9 +1822,6 @@ SpdySession2::Close(nsresult aReason)
mClosed = true;
NS_ABORT_IF_FALSE(mStreamTransactionHash.Count() ==
mStreamIDHash.Count(),
"index corruption");
mStreamTransactionHash.Enumerate(ShutdownEnumerator, this);
mStreamIDHash.Clear();
mStreamTransactionHash.Clear();

View File

@ -284,13 +284,11 @@ SpdySession3::AddStream(nsAHttpTransaction *aHttpTransaction,
int32_t aPriority)
{
NS_ABORT_IF_FALSE(PR_GetCurrentThread() == gSocketThread, "wrong thread");
NS_ABORT_IF_FALSE(!mStreamTransactionHash.Get(aHttpTransaction),
"AddStream duplicate transaction pointer");
// integrity check
if (mStreamTransactionHash.Get(aHttpTransaction)) {
LOG3((" New transaction already present\n"));
NS_ABORT_IF_FALSE(false, "New transaction already present in hash");
NS_ABORT_IF_FALSE(false, "AddStream duplicate transaction pointer");
return false;
}
@ -1920,9 +1918,6 @@ SpdySession3::Close(nsresult aReason)
mClosed = true;
NS_ABORT_IF_FALSE(mStreamTransactionHash.Count() ==
mStreamIDHash.Count(),
"index corruption");
mStreamTransactionHash.Enumerate(ShutdownEnumerator, this);
mStreamIDHash.Clear();
mStreamTransactionHash.Clear();