From 4082ca9a40e27e31751367ce821a55512a7ee321 Mon Sep 17 00:00:00 2001 From: Patrick McManus Date: Mon, 7 Jul 2014 10:40:08 -0400 Subject: [PATCH] bug 1034918 - nshttptransaction dtor can be private r=sworkman --- netwerk/protocol/http/nsHttpTransaction.cpp | 6 +++--- netwerk/protocol/http/nsHttpTransaction.h | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/netwerk/protocol/http/nsHttpTransaction.cpp b/netwerk/protocol/http/nsHttpTransaction.cpp index a895dd57683c..61a1b95c320c 100644 --- a/netwerk/protocol/http/nsHttpTransaction.cpp +++ b/netwerk/protocol/http/nsHttpTransaction.cpp @@ -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 event = new nsDeleteHttpTransaction(this); + nsCOMPtr event = new DeleteHttpTransaction(this); if (NS_FAILED(mConsumerTarget->Dispatch(event, NS_DISPATCH_NORMAL))) NS_WARNING("failed to dispatch nsHttpDeleteTransaction event"); } diff --git a/netwerk/protocol/http/nsHttpTransaction.h b/netwerk/protocol/http/nsHttpTransaction.h index bea131cfc98c..9debbd2b1526 100644 --- a/netwerk/protocol/http/nsHttpTransaction.h +++ b/netwerk/protocol/http/nsHttpTransaction.h @@ -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,