зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 8a25ee567449 (bug 938803)
This commit is contained in:
Родитель
12db2a480c
Коммит
6c5b337fd8
|
@ -22,7 +22,6 @@ NullHttpTransaction::NullHttpTransaction(nsHttpConnectionInfo *ci,
|
|||
uint32_t caps)
|
||||
: mStatus(NS_OK)
|
||||
, mCaps(caps | NS_HTTP_ALLOW_KEEPALIVE)
|
||||
, mCapsToClear(0)
|
||||
, mCallbacks(callbacks)
|
||||
, mConnectionInfo(ci)
|
||||
, mRequestHead(nullptr)
|
||||
|
@ -77,14 +76,7 @@ NullHttpTransaction::Status()
|
|||
uint32_t
|
||||
NullHttpTransaction::Caps()
|
||||
{
|
||||
return mCaps & ~mCapsToClear;
|
||||
}
|
||||
|
||||
void
|
||||
NullHttpTransaction::SetDNSWasRefreshed()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread(), "SetDNSWasRefreshed on main thread only!");
|
||||
mCapsToClear |= NS_HTTP_REFRESH_DNS;
|
||||
return mCaps;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
|
|
|
@ -41,12 +41,6 @@ private:
|
|||
|
||||
nsresult mStatus;
|
||||
uint32_t mCaps;
|
||||
// mCapsToClear holds flags that should be cleared in mCaps, e.g. unset
|
||||
// NS_HTTP_REFRESH_DNS when DNS refresh request has completed to avoid
|
||||
// redundant requests on the network. To deal with raciness, only unsetting
|
||||
// bitfields should be allowed: 'lost races' will thus err on the
|
||||
// conservative side, e.g. by going ahead with a 2nd DNS refresh.
|
||||
uint32_t mCapsToClear;
|
||||
nsRefPtr<nsAHttpConnection> mConnection;
|
||||
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
|
||||
nsRefPtr<nsHttpConnectionInfo> mConnectionInfo;
|
||||
|
|
|
@ -227,11 +227,6 @@ SpdyPush3TransactionBuffer::Caps()
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
SpdyPush3TransactionBuffer::SetDNSWasRefreshed()
|
||||
{
|
||||
}
|
||||
|
||||
uint64_t
|
||||
SpdyPush3TransactionBuffer::Available()
|
||||
{
|
||||
|
|
|
@ -225,11 +225,6 @@ SpdyPush31TransactionBuffer::Caps()
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
SpdyPush31TransactionBuffer::SetDNSWasRefreshed()
|
||||
{
|
||||
}
|
||||
|
||||
uint64_t
|
||||
SpdyPush31TransactionBuffer::Available()
|
||||
{
|
||||
|
|
|
@ -2578,11 +2578,6 @@ SpdySession3::Caps()
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
SpdySession3::SetDNSWasRefreshed()
|
||||
{
|
||||
}
|
||||
|
||||
uint64_t
|
||||
SpdySession3::Available()
|
||||
{
|
||||
|
|
|
@ -2702,11 +2702,6 @@ SpdySession31::Caps()
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
SpdySession31::SetDNSWasRefreshed()
|
||||
{
|
||||
}
|
||||
|
||||
uint64_t
|
||||
SpdySession31::Available()
|
||||
{
|
||||
|
|
|
@ -50,9 +50,6 @@ public:
|
|||
virtual nsresult Status() = 0;
|
||||
virtual uint32_t Caps() = 0;
|
||||
|
||||
// called to notify that a requested DNS cache entry was refreshed.
|
||||
virtual void SetDNSWasRefreshed() = 0;
|
||||
|
||||
// called to find out how much request data is available for writing.
|
||||
virtual uint64_t Available() = 0;
|
||||
|
||||
|
@ -157,7 +154,6 @@ public:
|
|||
bool IsDone(); \
|
||||
nsresult Status(); \
|
||||
uint32_t Caps(); \
|
||||
void SetDNSWasRefreshed(); \
|
||||
uint64_t Available(); \
|
||||
nsresult ReadSegments(nsAHttpSegmentReader *, uint32_t, uint32_t *); \
|
||||
nsresult WriteSegments(nsAHttpSegmentWriter *, uint32_t, uint32_t *); \
|
||||
|
|
|
@ -5950,9 +5950,6 @@ nsHttpChannel::OnLookupComplete(nsICancelable *request,
|
|||
// Unset DNS cache refresh if it was requested,
|
||||
if (mCaps & NS_HTTP_REFRESH_DNS) {
|
||||
mCaps &= ~NS_HTTP_REFRESH_DNS;
|
||||
if (mTransaction) {
|
||||
mTransaction->SetDNSWasRefreshed();
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -558,17 +558,6 @@ nsHttpPipeline::Caps()
|
|||
return trans ? trans->Caps() : 0;
|
||||
}
|
||||
|
||||
void
|
||||
nsHttpPipeline::SetDNSWasRefreshed()
|
||||
{
|
||||
nsAHttpTransaction *trans = Request(0);
|
||||
if (!trans)
|
||||
trans = Response(0);
|
||||
|
||||
if (trans)
|
||||
trans->SetDNSWasRefreshed();
|
||||
}
|
||||
|
||||
uint64_t
|
||||
nsHttpPipeline::Available()
|
||||
{
|
||||
|
|
|
@ -98,7 +98,6 @@ nsHttpTransaction::nsHttpTransaction()
|
|||
, mPriority(0)
|
||||
, mRestartCount(0)
|
||||
, mCaps(0)
|
||||
, mCapsToClear(0)
|
||||
, mClassification(CLASS_GENERAL)
|
||||
, mPipelinePosition(0)
|
||||
, mHttpVersion(NS_HTTP_VERSION_UNKNOWN)
|
||||
|
@ -553,14 +552,7 @@ nsHttpTransaction::Status()
|
|||
uint32_t
|
||||
nsHttpTransaction::Caps()
|
||||
{
|
||||
return mCaps & ~mCapsToClear;
|
||||
}
|
||||
|
||||
void
|
||||
nsHttpTransaction::SetDNSWasRefreshed()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread(), "SetDNSWasRefreshed on main thread only!");
|
||||
mCapsToClear |= NS_HTTP_REFRESH_DNS;
|
||||
return mCaps;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
|
|
|
@ -210,12 +210,6 @@ private:
|
|||
|
||||
uint16_t mRestartCount; // the number of times this transaction has been restarted
|
||||
uint32_t mCaps;
|
||||
// mCapsToClear holds flags that should be cleared in mCaps, e.g. unset
|
||||
// NS_HTTP_REFRESH_DNS when DNS refresh request has completed to avoid
|
||||
// redundant requests on the network. To deal with raciness, only unsetting
|
||||
// bitfields should be allowed: 'lost races' will thus err on the
|
||||
// conservative side, e.g. by going ahead with a 2nd DNS refresh.
|
||||
uint32_t mCapsToClear;
|
||||
enum Classifier mClassification;
|
||||
int32_t mPipelinePosition;
|
||||
int64_t mMaxPipelineObjectSize;
|
||||
|
|
Загрузка…
Ссылка в новой задаче