зеркало из https://github.com/mozilla/gecko-dev.git
bug 1034918 - nshttptransaction dtor can be private r=sworkman
This commit is contained in:
Родитель
2ac35a8e4a
Коммит
c8edfaeab1
|
@ -1741,9 +1741,9 @@ nsHttpTransaction::ReleaseBlockingTransaction()
|
||||||
// nsHttpTransaction deletion event
|
// nsHttpTransaction deletion event
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
class nsDeleteHttpTransaction : public nsRunnable {
|
class DeleteHttpTransaction : public nsRunnable {
|
||||||
public:
|
public:
|
||||||
nsDeleteHttpTransaction(nsHttpTransaction *trans)
|
DeleteHttpTransaction(nsHttpTransaction *trans)
|
||||||
: mTrans(trans)
|
: mTrans(trans)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@ -1767,7 +1767,7 @@ nsHttpTransaction::DeleteSelfOnConsumerThread()
|
||||||
delete this;
|
delete this;
|
||||||
} else {
|
} else {
|
||||||
LOG(("proxying delete to consumer thread...\n"));
|
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)))
|
if (NS_FAILED(mConsumerTarget->Dispatch(event, NS_DISPATCH_NORMAL)))
|
||||||
NS_WARNING("failed to dispatch nsHttpDeleteTransaction event");
|
NS_WARNING("failed to dispatch nsHttpDeleteTransaction event");
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,24 +28,11 @@ class nsIEventTarget;
|
||||||
class nsIInputStream;
|
class nsIInputStream;
|
||||||
class nsIOutputStream;
|
class nsIOutputStream;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla { namespace net {
|
||||||
|
|
||||||
namespace net {
|
|
||||||
|
|
||||||
class nsHttpChunkedDecoder;
|
class nsHttpChunkedDecoder;
|
||||||
class nsHttpRequestHead;
|
class nsHttpRequestHead;
|
||||||
class nsHttpResponseHead;
|
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,
|
// nsHttpTransaction represents a single HTTP transaction. It is thread-safe,
|
||||||
|
@ -64,7 +51,6 @@ public:
|
||||||
NS_DECL_NSIOUTPUTSTREAMCALLBACK
|
NS_DECL_NSIOUTPUTSTREAMCALLBACK
|
||||||
|
|
||||||
nsHttpTransaction();
|
nsHttpTransaction();
|
||||||
virtual ~nsHttpTransaction();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// called to initialize the transaction
|
// called to initialize the transaction
|
||||||
|
@ -147,6 +133,9 @@ public:
|
||||||
nsHttpTransaction *QueryHttpTransaction() MOZ_OVERRIDE { return this; }
|
nsHttpTransaction *QueryHttpTransaction() MOZ_OVERRIDE { return this; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
friend class DeleteHttpTransaction;
|
||||||
|
virtual ~nsHttpTransaction();
|
||||||
|
|
||||||
nsresult Restart();
|
nsresult Restart();
|
||||||
nsresult RestartInProgress();
|
nsresult RestartInProgress();
|
||||||
char *LocateHttpStart(char *buf, uint32_t len,
|
char *LocateHttpStart(char *buf, uint32_t len,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче