bug 378637 part 1 - add leak detection macros to http classes r=hurley

--HG--
extra : rebase_source : c846cba060509be22a2a3387929ffa724dba7f40
This commit is contained in:
Patrick McManus 2014-04-21 08:54:07 -04:00
parent 32ca40302b
commit adcb4acc71
4 changed files with 10 additions and 4 deletions

View File

@ -2468,10 +2468,9 @@ nsHttpConnectionMgr::OnMsgUpdateParam(int32_t, void *param)
// nsHttpConnectionMgr::nsConnectionEntry
nsHttpConnectionMgr::nsConnectionEntry::~nsConnectionEntry()
{
MOZ_COUNT_DTOR(nsConnectionEntry);
if (mSpdyPreferred)
gHttpHandler->ConnMgr()->RemoveSpdyPreferredEnt(mCoalescingKey);
NS_RELEASE(mConnInfo);
}
void
@ -3254,7 +3253,7 @@ nsConnectionEntry::nsConnectionEntry(nsHttpConnectionInfo *ci)
, mPreferIPv4(false)
, mPreferIPv6(false)
{
NS_ADDREF(mConnInfo);
MOZ_COUNT_CTOR(nsConnectionEntry);
if (gHttpHandler->GetPipelineAggressive()) {
mGreenDepth = kPipelineUnlimited;
mPipelineState = PS_GREEN;

View File

@ -265,7 +265,7 @@ private:
nsConnectionEntry(nsHttpConnectionInfo *ci);
~nsConnectionEntry();
nsHttpConnectionInfo *mConnInfo;
nsRefPtr<nsHttpConnectionInfo> mConnInfo;
nsTArray<nsHttpTransaction*> mPendingQ; // pending transaction queue
nsTArray<nsHttpConnection*> mActiveConns; // active connections
nsTArray<nsHttpConnection*> mIdleConns; // idle persistent connections

View File

@ -20,6 +20,12 @@ nsHttpRequestHead::nsHttpRequestHead()
, mVersion(NS_HTTP_VERSION_1_1)
, mParsedMethod(kMethod_Get)
{
MOZ_COUNT_CTOR(nsHttpRequestHead);
}
nsHttpRequestHead::~nsHttpRequestHead()
{
MOZ_COUNT_DTOR(nsHttpRequestHead);
}
void

View File

@ -21,6 +21,7 @@ class nsHttpRequestHead
{
public:
nsHttpRequestHead();
~nsHttpRequestHead();
void SetMethod(const nsACString &method);
void SetVersion(nsHttpVersion version) { mVersion = version; }