Bug 722034 - Part 3 - Convert HttpBaseChannel::mRedirectedCachekeys to nsAutoPtr<nsTArray<nsCString> >, r=biesi

This commit is contained in:
Brian Smith 2012-05-31 15:20:05 -07:00
parent 135a3b988c
commit 1b457f2f45
2 changed files with 3 additions and 8 deletions

View File

@ -50,7 +50,6 @@ HttpBaseChannel::HttpBaseChannel()
, mTimingEnabled(false)
, mAllowSpdy(true)
, mSuspendCount(0)
, mRedirectedCachekeys(nsnull)
{
LOG(("Creating HttpBaseChannel @%x\n", this));
@ -1626,8 +1625,7 @@ HttpBaseChannel::SetupReplacementChannel(nsIURI *newURI,
if (mRedirectedCachekeys) {
LOG(("HttpBaseChannel::SetupReplacementChannel "
"[this=%p] transferring chain of redirect cache-keys", this));
httpInternal->SetCacheKeysRedirectChain(mRedirectedCachekeys);
mRedirectedCachekeys = nsnull;
httpInternal->SetCacheKeysRedirectChain(mRedirectedCachekeys.forget());
}
}

View File

@ -140,10 +140,7 @@ public:
inline void CleanRedirectCacheChainIfNecessary()
{
if (mRedirectedCachekeys) {
delete mRedirectedCachekeys;
mRedirectedCachekeys = nsnull;
}
mRedirectedCachekeys = nsnull;
}
NS_IMETHOD HTTPUpgrade(const nsACString & aProtocolName,
nsIHttpUpgradeListener *aListener);
@ -272,7 +269,7 @@ protected:
// Current suspension depth for this channel object
PRUint32 mSuspendCount;
nsTArray<nsCString> *mRedirectedCachekeys;
nsAutoPtr<nsTArray<nsCString> > mRedirectedCachekeys;
};
// Share some code while working around C++'s absurd inability to handle casting