bug 1034918 - nshttptransaction dtor can be private r=sworkman

This commit is contained in:
Patrick McManus 2014-07-07 10:40:08 -04:00
parent 11ad7352b3
commit 4082ca9a40
2 changed files with 6 additions and 4 deletions

View File

@ -1741,9 +1741,9 @@ nsHttpTransaction::ReleaseBlockingTransaction()
// nsHttpTransaction deletion event
//-----------------------------------------------------------------------------
class nsDeleteHttpTransaction : public nsRunnable {
class DeleteHttpTransaction : public nsRunnable {
public:
nsDeleteHttpTransaction(nsHttpTransaction *trans)
DeleteHttpTransaction(nsHttpTransaction *trans)
: mTrans(trans)
{}
@ -1767,7 +1767,7 @@ nsHttpTransaction::DeleteSelfOnConsumerThread()
delete this;
} else {
LOG(("proxying delete to consumer thread...\n"));
nsCOMPtr<nsIRunnable> event = new nsDeleteHttpTransaction(this);
nsCOMPtr<nsIRunnable> event = new DeleteHttpTransaction(this);
if (NS_FAILED(mConsumerTarget->Dispatch(event, NS_DISPATCH_NORMAL)))
NS_WARNING("failed to dispatch nsHttpDeleteTransaction event");
}

View File

@ -64,7 +64,6 @@ public:
NS_DECL_NSIOUTPUTSTREAMCALLBACK
nsHttpTransaction();
virtual ~nsHttpTransaction();
//
// called to initialize the transaction
@ -147,6 +146,9 @@ public:
nsHttpTransaction *QueryHttpTransaction() MOZ_OVERRIDE { return this; }
private:
friend class DeleteHttpTransaction;
virtual ~nsHttpTransaction();
nsresult Restart();
nsresult RestartInProgress();
char *LocateHttpStart(char *buf, uint32_t len,