Bug 1504512 - Do not delete mTrailers explicitly. r=valentin, a=jcristau
authorKershaw Chang <kershaw@mozilla.com>
Fri, 09 Nov 2018 02:53:00 +0200
changeset 501284 af979f77c8384b56c66ba142d7f50e1c2675dfaf
parent 501283 f6a1e485be9a28e08d4eb1b22140a900d1676e8b
child 501285 467e62db7b1435dbcdb6b9033b2fc9484587c618
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin, jcristau
bugs1504512
milestone64.0
Bug 1504512 - Do not delete mTrailers explicitly. r=valentin, a=jcristau 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);