Bug 1504512 - Do not delete mTrailers explicitly, r=valentin
authorKershaw Chang <kershaw@mozilla.com>
Fri, 09 Nov 2018 02:53:00 +0200
changeset 503197 e6604d308037fe4b42170840a12e9e3cc795cb55
parent 503196 c44903823d66dac1b9e1310951ce7095710d2afc
child 503198 2ea6c6932f6e45bb6f472dd8d5271d53a22788ac
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1504512
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1504512 - Do not delete mTrailers explicitly, r=valentin Since mTrailers is nsAutoPtr, there is no need to delete it explicitly.
netwerk/protocol/http/nsHttpChunkedDecoder.h
--- a/netwerk/protocol/http/nsHttpChunkedDecoder.h
+++ b/netwerk/protocol/http/nsHttpChunkedDecoder.h
@@ -15,17 +15,17 @@ namespace mozilla { namespace net {
 
 class nsHttpChunkedDecoder
 {
 public:
     nsHttpChunkedDecoder() : mTrailers(nullptr)
                            , mChunkRemaining(0)
                            , mReachedEOF(false)
                            , mWaitEOF(false) {}
-   ~nsHttpChunkedDecoder() { delete mTrailers; }
+   ~nsHttpChunkedDecoder() = default;
 
     bool ReachedEOF() { return mReachedEOF; }
 
     // called by the transaction to handle chunked content.
     MOZ_MUST_USE nsresult HandleChunkedContent(char *buf,
                                                uint32_t count,
                                                uint32_t *contentRead,
                                                uint32_t *contentRemaining);