bug 667387 - make nshttppipeline::taketransport() work with websockets r=honzab

This commit is contained in:
Patrick McManus 2012-01-06 08:46:15 -05:00
parent 21f809c119
commit 7c3af0bd18

View File

@ -113,6 +113,8 @@ nsHttpPipeline::~nsHttpPipeline()
// make sure we aren't still holding onto any transactions!
Close(NS_ERROR_ABORT);
NS_IF_RELEASE(mConnection);
if (mPushBackBuf)
free(mPushBackBuf);
}
@ -125,7 +127,7 @@ nsHttpPipeline::AddTransaction(nsAHttpTransaction *trans)
NS_ADDREF(trans);
mRequestQ.AppendElement(trans);
if (mConnection) {
if (mConnection && !mClosed) {
trans->SetConnection(this);
if (mRequestQ.Length() == 1)
@ -700,10 +702,6 @@ nsHttpPipeline::Close(nsresult reason)
mResponseQ.Clear();
}
// we must no longer reference the connection! This needs to come
// after we've closed all our transactions, since they might want
// connection info as they close.
NS_IF_RELEASE(mConnection);
}
nsresult