624374 - remove unused nsHttpConnection::mLock. r=honzab.moz@firemni.cz, a=jst@mozilla.com
authorPatrick McManus <mcmanus@ducksong.com>
Wed, 02 Feb 2011 10:53:06 -0800
changeset 61790 4753f5a91e75c9bfed45c35e7b699853d1784582
parent 61789 800b80b291939f9d08f0b89cf076d49e6ed4f0be
child 61791 5947cd7a6ca2af3febf77c63f8cd1d68ffa0eca8
push idunknown
push userunknown
push dateunknown
reviewershonzab.moz, jst
bugs624374
milestone2.0b12pre
624374 - remove unused nsHttpConnection::mLock. r=honzab.moz@firemni.cz, a=jst@mozilla.com
netwerk/protocol/http/nsHttpConnection.cpp
netwerk/protocol/http/nsHttpConnection.h
--- a/netwerk/protocol/http/nsHttpConnection.cpp
+++ b/netwerk/protocol/http/nsHttpConnection.cpp
@@ -62,17 +62,16 @@ static NS_DEFINE_CID(kSocketTransportSer
 
 //-----------------------------------------------------------------------------
 // nsHttpConnection <public>
 //-----------------------------------------------------------------------------
 
 nsHttpConnection::nsHttpConnection()
     : mTransaction(nsnull)
     , mConnInfo(nsnull)
-    , mLock(nsnull)
     , mLastReadTime(0)
     , mIdleTimeout(0)
     , mKeepAlive(PR_TRUE) // assume to keep-alive by default
     , mKeepAliveMask(PR_TRUE)
     , mSupportsPipelining(PR_FALSE) // assume low-grade server
     , mIsReused(PR_FALSE)
     , mCompletedSSLConnect(PR_FALSE)
     , mLastTransactionExpectedNoContent(PR_FALSE)
@@ -86,38 +85,29 @@ nsHttpConnection::nsHttpConnection()
 
 nsHttpConnection::~nsHttpConnection()
 {
     LOG(("Destroying nsHttpConnection @%x\n", this));
  
     NS_IF_RELEASE(mConnInfo);
     NS_IF_RELEASE(mTransaction);
 
-    if (mLock) {
-        PR_DestroyLock(mLock);
-        mLock = nsnull;
-    }
-
     // release our reference to the handler
     nsHttpHandler *handler = gHttpHandler;
     NS_RELEASE(handler);
 }
 
 nsresult
 nsHttpConnection::Init(nsHttpConnectionInfo *info, PRUint16 maxHangTime)
 {
     LOG(("nsHttpConnection::Init [this=%x]\n", this));
 
     NS_ENSURE_ARG_POINTER(info);
     NS_ENSURE_TRUE(!mConnInfo, NS_ERROR_ALREADY_INITIALIZED);
 
-    mLock = PR_NewLock();
-    if (!mLock)
-        return NS_ERROR_OUT_OF_MEMORY;
-
     mConnInfo = info;
     NS_ADDREF(mConnInfo);
 
     mMaxHangTime = maxHangTime;
     mLastReadTime = NowInSeconds();
     return NS_OK;
 }
 
--- a/netwerk/protocol/http/nsHttpConnection.h
+++ b/netwerk/protocol/http/nsHttpConnection.h
@@ -159,18 +159,16 @@ private:
     nsresult                        mSocketOutCondition;
 
     nsCOMPtr<nsIInputStream>        mSSLProxyConnectStream;
     nsCOMPtr<nsIInputStream>        mRequestStream;
 
     nsAHttpTransaction             *mTransaction; // hard ref
     nsHttpConnectionInfo           *mConnInfo;    // hard ref
 
-    PRLock                         *mLock;
-
     PRUint32                        mLastReadTime;
     PRUint16                        mMaxHangTime;    // max download time before dropping keep-alive status
     PRUint16                        mIdleTimeout;    // value of keep-alive: timeout=
 
     PRPackedBool                    mKeepAlive;
     PRPackedBool                    mKeepAliveMask;
     PRPackedBool                    mSupportsPipelining;
     PRPackedBool                    mIsReused;