Bug 1106396 - Fix nsHttpChannel::Suspend() in case of content is serve partially from cache and partially from network. r=honzab

--HG--
extra : rebase_source : d9be7f54828c5036f1b31b667224a3a8f97b4902
This commit is contained in:
Dragana Damjanovic 2015-01-27 00:50:00 +01:00
parent 60b56c8c37
commit b23f28369b

View File

@ -4690,12 +4690,16 @@ nsHttpChannel::Suspend()
++mSuspendCount;
if (mTransactionPump)
return mTransactionPump->Suspend();
if (mCachePump)
return mCachePump->Suspend();
nsresult rvTransaction = NS_OK;
if (mTransactionPump) {
rvTransaction = mTransactionPump->Suspend();
}
nsresult rvCache = NS_OK;
if (mCachePump) {
rvCache = mCachePump->Suspend();
}
return NS_OK;
return NS_FAILED(rvTransaction) ? rvTransaction : rvCache;
}
NS_IMETHODIMP
@ -4711,12 +4715,17 @@ nsHttpChannel::Resume()
NS_ENSURE_SUCCESS(rv, rv);
}
if (mTransactionPump)
return mTransactionPump->Resume();
if (mCachePump)
return mCachePump->Resume();
nsresult rvTransaction = NS_OK;
if (mTransactionPump) {
rvTransaction = mTransactionPump->Resume();
}
return NS_OK;
nsresult rvCache = NS_OK;
if (mCachePump) {
rvCache = mCachePump->Resume();
}
return NS_FAILED(rvTransaction) ? rvTransaction : rvCache;
}
//-----------------------------------------------------------------------------