Bug 560579 - bitfield-induced race in class nsHttpTransaction; r=biesi

This commit is contained in:
Julian Seward 2011-03-24 15:51:00 -04:00
parent 3d2d67c401
commit 0ac527c26e

View File

@ -197,21 +197,22 @@ private:
PRUint16 mRestartCount; // the number of times this transaction has been restarted
PRUint8 mCaps;
// state flags
PRUint32 mClosed : 1;
PRUint32 mConnected : 1;
PRUint32 mHaveStatusLine : 1;
PRUint32 mHaveAllHeaders : 1;
PRUint32 mTransactionDone : 1;
PRUint32 mResponseIsComplete : 1;
PRUint32 mDidContentStart : 1;
PRUint32 mNoContent : 1; // expecting an empty entity body
PRUint32 mSentData : 1;
PRUint32 mReceivedData : 1;
PRUint32 mStatusEventPending : 1;
PRUint32 mHasRequestBody : 1;
PRUint32 mSSLConnectFailed : 1;
PRUint32 mHttpResponseMatched: 1;
// state flags, all logically boolean, but not packed together into a
// bitfield so as to avoid bitfield-induced races. See bug 560579.
PRPackedBool mClosed;
PRPackedBool mConnected;
PRPackedBool mHaveStatusLine;
PRPackedBool mHaveAllHeaders;
PRPackedBool mTransactionDone;
PRPackedBool mResponseIsComplete;
PRPackedBool mDidContentStart;
PRPackedBool mNoContent; // expecting an empty entity body
PRPackedBool mSentData;
PRPackedBool mReceivedData;
PRPackedBool mStatusEventPending;
PRPackedBool mHasRequestBody;
PRPackedBool mSSLConnectFailed;
PRPackedBool mHttpResponseMatched;
// mClosed := transaction has been explicitly closed
// mTransactionDone := transaction ran to completion or was interrupted