зеркало из https://github.com/mozilla/gecko-dev.git
bug 1132212 - nshttptransction.cpp dont play with data race fire r=sworkman
--HG-- extra : rebase_source : 9c36261b9ce11598664932f2e40693eee735b498
This commit is contained in:
Родитель
ea6de563d8
Коммит
f6e7bab9dc
|
@ -59,10 +59,12 @@ protected:
|
|||
private:
|
||||
// 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
|
||||
// redundant requests on the network. The member itself is atomic, but
|
||||
// access to it from the networking thread may happen either before or
|
||||
// after the main thread modifies it. 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;
|
||||
Atomic<uint32_t> mCapsToClear;
|
||||
nsHttpRequestHead *mRequestHead;
|
||||
bool mIsDone;
|
||||
bool mClaimed;
|
||||
|
|
|
@ -102,9 +102,9 @@ nsHttpTransaction::nsHttpTransaction()
|
|||
, mPriority(0)
|
||||
, mRestartCount(0)
|
||||
, mCaps(0)
|
||||
, mCapsToClear(0)
|
||||
, mClassification(CLASS_GENERAL)
|
||||
, mPipelinePosition(0)
|
||||
, mCapsToClear(0)
|
||||
, mHttpVersion(NS_HTTP_VERSION_UNKNOWN)
|
||||
, mClosed(false)
|
||||
, mConnected(false)
|
||||
|
|
|
@ -248,16 +248,19 @@ 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;
|
||||
|
||||
// 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. The member itself is atomic, but
|
||||
// access to it from the networking thread may happen either before or
|
||||
// after the main thread modifies it. 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.
|
||||
Atomic<uint32_t> mCapsToClear;
|
||||
|
||||
nsHttpVersion mHttpVersion;
|
||||
|
||||
// state flags, all logically boolean, but not packed together into a
|
||||
|
|
Загрузка…
Ссылка в новой задаче