bug 1034918 - nshttptransaction dtor can be private r=sworkman

This commit is contained in:
Patrick McManus 2014-07-08 12:43:04 -04:00
Родитель 2ac35a8e4a
Коммит c8edfaeab1
2 изменённых файлов: 7 добавлений и 18 удалений

Просмотреть файл

@ -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");
}

Просмотреть файл

@ -28,24 +28,11 @@ class nsIEventTarget;
class nsIInputStream;
class nsIOutputStream;
namespace mozilla {
namespace net {
namespace mozilla { namespace net {
class nsHttpChunkedDecoder;
class nsHttpRequestHead;
class nsHttpResponseHead;
class nsHttpTransaction;
}
template<>
struct HasDangerousPublicDestructor<net::nsHttpTransaction>
{
static const bool value = true;
};
namespace net {
//-----------------------------------------------------------------------------
// nsHttpTransaction represents a single HTTP transaction. It is thread-safe,
@ -64,7 +51,6 @@ public:
NS_DECL_NSIOUTPUTSTREAMCALLBACK
nsHttpTransaction();
virtual ~nsHttpTransaction();
//
// called to initialize the transaction
@ -147,6 +133,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,