Bug 1453795 - Necko - Initialize member fields in classes/ structures. r=michal
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Thu, 14 Jun 2018 11:19:07 +0300
changeset 422486 287bdf729c7985a5995900b8cee7a7a7db4f98d9
parent 422485 85ff6d02c6a76e4818d3803d1f737eec180e0b50
child 422487 44fc7d8706800cdc44612805123d60c01d5ac616
push id104277
push userbpostelnicu@mozilla.com
push dateThu, 14 Jun 2018 08:21:50 +0000
treeherdermozilla-inbound@287bdf729c79 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmichal
bugs1453795
milestone62.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 1453795 - Necko - Initialize member fields in classes/ structures. r=michal
netwerk/base/Dashboard.cpp
netwerk/base/MemoryDownloader.cpp
netwerk/base/Predictor.cpp
netwerk/base/RequestContextService.cpp
netwerk/base/TCPFastOpenLayer.cpp
netwerk/base/nsAsyncStreamCopier.cpp
netwerk/base/nsBaseChannel.cpp
netwerk/base/nsBufferedStreams.cpp
netwerk/base/nsIURIMutatorUtils.cpp
netwerk/base/nsInputStreamPump.cpp
netwerk/base/nsPACMan.cpp
netwerk/base/nsServerSocket.cpp
netwerk/base/nsSocketTransport2.cpp
netwerk/base/nsStandardURL.h
netwerk/base/nsUDPSocket.cpp
netwerk/cache/nsCacheEntry.cpp
netwerk/cache/nsCacheEntryDescriptor.h
netwerk/cache/nsCacheService.cpp
netwerk/cache/nsDiskCacheStreams.h
netwerk/cache2/CacheFileIOManager.cpp
netwerk/cache2/CacheIndex.h
netwerk/cache2/CacheStorageService.cpp
netwerk/dns/DNS.cpp
netwerk/dns/TRR.h
netwerk/dns/nsDNSService2.cpp
netwerk/dns/nsHostResolver.cpp
netwerk/dns/nsIDNService.cpp
netwerk/ipc/NeckoMessageUtils.h
netwerk/protocol/file/nsFileChannel.cpp
netwerk/protocol/ftp/nsFtpConnectionThread.cpp
netwerk/protocol/ftp/nsFtpControlConnection.cpp
netwerk/protocol/http/Http2Compression.h
netwerk/protocol/http/Http2Session.cpp
netwerk/protocol/http/HttpBaseChannel.cpp
netwerk/protocol/http/NullHttpChannel.cpp
netwerk/protocol/http/TunnelUtils.cpp
netwerk/protocol/http/nsCORSListenerProxy.cpp
netwerk/protocol/http/nsHttpAuthCache.h
netwerk/protocol/http/nsHttpAuthManager.cpp
netwerk/protocol/http/nsHttpAuthManager.h
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/protocol/http/nsHttpConnection.cpp
netwerk/protocol/http/nsHttpConnectionMgr.cpp
netwerk/protocol/http/nsHttpHandler.cpp
netwerk/protocol/http/nsHttpNTLMAuth.h
netwerk/protocol/http/nsHttpTransaction.cpp
netwerk/protocol/viewsource/nsViewSourceChannel.h
netwerk/protocol/websocket/WebSocketChannel.cpp
netwerk/socket/nsSOCKSIOLayer.cpp
netwerk/streamconv/converters/nsDirIndexParser.cpp
netwerk/streamconv/converters/nsDirIndexParser.h
netwerk/streamconv/converters/nsHTTPCompressConv.cpp
netwerk/streamconv/converters/nsHTTPCompressConv.h
netwerk/streamconv/converters/nsIndexedToHTML.cpp
netwerk/streamconv/converters/nsIndexedToHTML.h
netwerk/streamconv/converters/nsMultiMixedConv.cpp
netwerk/test/TestUDPSocket.cpp
--- a/netwerk/base/Dashboard.cpp
+++ b/netwerk/base/Dashboard.cpp
@@ -142,17 +142,20 @@ public:
       aName.AssignLiteral("net::ConnectionData");
       return NS_OK;
     }
 
 
     void StartTimer(uint32_t aTimeout);
     void StopTimer();
 
-    explicit ConnectionData(Dashboard *target)
+    explicit ConnectionData(Dashboard* target)
+        : mPort(0)
+        , mProtocol(nullptr)
+        , mTimeout(0)
     {
         mEventTarget = nullptr;
         mDashboard = target;
     }
 
     nsCOMPtr<nsISocketTransport> mSocket;
     nsCOMPtr<nsIInputStream> mStreamIn;
     nsCOMPtr<nsITimer> mTimer;
@@ -282,17 +285,21 @@ class LookupHelper final
             mCancel->Cancel(NS_ERROR_ABORT);
         }
     }
 
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIDNSLISTENER
 
-    LookupHelper() = default;
+    LookupHelper()
+        : mEventTarget{ nullptr }
+        , mStatus{ NS_ERROR_NOT_INITIALIZED }
+    {
+    }
 
     nsresult ConstructAnswer(LookupArgument *aArgument);
 public:
     nsCOMPtr<nsICancelable> mCancel;
     nsMainThreadPtrHandle<NetDashboardCallback> mCallback;
     nsIEventTarget *mEventTarget;
     nsresult mStatus;
 };
--- a/netwerk/base/MemoryDownloader.cpp
+++ b/netwerk/base/MemoryDownloader.cpp
@@ -12,16 +12,17 @@ namespace mozilla {
 namespace net {
 
 NS_IMPL_ISUPPORTS(MemoryDownloader,
 		  nsIStreamListener,
 		  nsIRequestObserver)
 
 MemoryDownloader::MemoryDownloader(IObserver* aObserver)
 : mObserver(aObserver)
+, mStatus(NS_ERROR_NOT_INITIALIZED)
 {
 }
 
 NS_IMETHODIMP
 MemoryDownloader::OnStartRequest(nsIRequest* aRequest, nsISupports* aCtxt)
 {
   MOZ_ASSERT(!mData);
   mData.reset(new FallibleTArray<uint8_t>());
--- a/netwerk/base/Predictor.cpp
+++ b/netwerk/base/Predictor.cpp
@@ -257,16 +257,19 @@ NS_IMPL_ISUPPORTS(Predictor,
                   nsIObserver,
                   nsISpeculativeConnectionOverrider,
                   nsIInterfaceRequestor,
                   nsICacheEntryMetaDataVisitor,
                   nsINetworkPredictorVerifier)
 
 Predictor::Predictor()
   :mInitialized(false)
+  ,mCleanedUp(false)
+  ,mStartupTime(0)
+  ,mLastStartupTime(0)
   ,mStartupCount(1)
 {
   MOZ_ASSERT(!sSelf, "multiple Predictor instances!");
   sSelf = this;
 }
 
 Predictor::~Predictor()
 {
--- a/netwerk/base/RequestContextService.cpp
+++ b/netwerk/base/RequestContextService.cpp
@@ -459,17 +459,18 @@ RequestContext::CancelTailPendingRequest
 }
 
 //nsIRequestContextService
 RequestContextService *RequestContextService::sSelf = nullptr;
 
 NS_IMPL_ISUPPORTS(RequestContextService, nsIRequestContextService, nsIObserver)
 
 RequestContextService::RequestContextService()
-  : mNextRCID(1)
+  : mRCIDNamespace(0)
+  , mNextRCID(1)
 {
   MOZ_ASSERT(!sSelf, "multiple rcs instances!");
   MOZ_ASSERT(NS_IsMainThread());
   sSelf = this;
 
   nsCOMPtr<nsIXULRuntime> runtime = do_GetService("@mozilla.org/xre/runtime;1");
   runtime->GetProcessID(&mRCIDNamespace);
 }
--- a/netwerk/base/TCPFastOpenLayer.cpp
+++ b/netwerk/base/TCPFastOpenLayer.cpp
@@ -53,17 +53,27 @@ static PRIOMethods   *sTCPFastOpenLayerM
 
 class TCPFastOpenSecret
 {
 public:
   TCPFastOpenSecret()
     : mState(WAITING_FOR_CONNECT)
     , mFirstPacketBufLen(0)
     , mCondition(0)
-  {}
+  {
+    this->mAddr.raw.family = 0;
+    this->mAddr.inet.family = 0;
+    this->mAddr.inet.port = 0;
+    this->mAddr.inet.ip = 0;
+    this->mAddr.ipv6.family = 0;
+    this->mAddr.ipv6.port = 0;
+    this->mAddr.ipv6.flowinfo = 0;
+    this->mAddr.ipv6.scope_id = 0;
+    this->mAddr.local.family = 0;
+  }
 
   enum {
     CONNECTED,
     WAITING_FOR_CONNECTCONTINUE,
     COLLECT_DATA_FOR_FIRST_PACKET,
     WAITING_FOR_CONNECT,
     SOCKET_ERROR_STATE
   } mState;
--- a/netwerk/base/nsAsyncStreamCopier.cpp
+++ b/netwerk/base/nsAsyncStreamCopier.cpp
@@ -69,16 +69,18 @@ private:
 //-----------------------------------------------------------------------------
 
 nsAsyncStreamCopier::nsAsyncStreamCopier()
     : mLock("nsAsyncStreamCopier.mLock")
     , mMode(NS_ASYNCCOPY_VIA_READSEGMENTS)
     , mChunkSize(nsIOService::gDefaultSegmentSize)
     , mStatus(NS_OK)
     , mIsPending(false)
+    , mCloseSource{ false }
+    , mCloseSink{ false }
     , mShouldSniffBuffering(false)
 {
     LOG(("Creating nsAsyncStreamCopier @%p\n", this));
 }
 
 nsAsyncStreamCopier::~nsAsyncStreamCopier()
 {
     LOG(("Destroying nsAsyncStreamCopier @%p\n", this));
--- a/netwerk/base/nsBaseChannel.cpp
+++ b/netwerk/base/nsBaseChannel.cpp
@@ -54,16 +54,17 @@ nsBaseChannel::nsBaseChannel()
   : NeckoTargetHolder(nullptr)
   , mPumpingData(false)
   , mLoadFlags(LOAD_NORMAL)
   , mQueriedProgressSink(true)
   , mSynthProgressEvents(false)
   , mAllowThreadRetargeting(true)
   , mWaitingOnAsyncRedirect(false)
   , mOpenRedirectChannel(false)
+  , mRedirectFlags{ 0 }
   , mStatus(NS_OK)
   , mContentDispositionHint(UINT32_MAX)
   , mContentLength(-1)
   , mWasOpened(false)
 {
   mContentType.AssignLiteral(UNKNOWN_CONTENT_TYPE);
 }
 
--- a/netwerk/base/nsBufferedStreams.cpp
+++ b/netwerk/base/nsBufferedStreams.cpp
@@ -41,17 +41,18 @@ using namespace mozilla::ipc;
 using mozilla::Maybe;
 using mozilla::Nothing;
 using mozilla::Some;
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsBufferedStream
 
 nsBufferedStream::nsBufferedStream()
-    : mBuffer(nullptr),
+    : mBufferSize(0),
+      mBuffer(nullptr),
       mBufferStartOffset(0),
       mCursor(0),
       mFillPoint(0),
       mStream(nullptr),
       mBufferDisabled(false),
       mEOF(false),
       mGetBufferCount(0)
 {
--- a/netwerk/base/nsIURIMutatorUtils.cpp
+++ b/netwerk/base/nsIURIMutatorUtils.cpp
@@ -13,12 +13,13 @@ GetURIMutator(nsIURI* aURI, nsIURIMutato
 
 NS_MutateURI::NS_MutateURI(nsIURI* aURI)
 {
   mStatus = GetURIMutator(aURI, getter_AddRefs(mMutator));
   NS_ENSURE_SUCCESS_VOID(mStatus);
 }
 
 NS_MutateURI::NS_MutateURI(const char * aContractID)
+  : mStatus(NS_ERROR_NOT_INITIALIZED)
 {
   mMutator = do_CreateInstance(aContractID, &mStatus);
   MOZ_ASSERT(NS_SUCCEEDED(mStatus), "Called with wrong aContractID");
 }
--- a/netwerk/base/nsInputStreamPump.cpp
+++ b/netwerk/base/nsInputStreamPump.cpp
@@ -33,19 +33,23 @@ static mozilla::LazyLogModule gStreamPum
 
 //-----------------------------------------------------------------------------
 // nsInputStreamPump methods
 //-----------------------------------------------------------------------------
 
 nsInputStreamPump::nsInputStreamPump()
     : mState(STATE_IDLE)
     , mStreamOffset(0)
+    , mStreamLength(0)
+    , mSegSize(0)
+    , mSegCount(0)
     , mStatus(NS_OK)
     , mSuspendCount(0)
     , mLoadFlags(LOAD_NORMAL)
+    , mIsPending(false)
     , mProcessingCallbacks(false)
     , mWaitingForInputStreamReady(false)
     , mCloseWhenDone(false)
     , mRetargeting(false)
     , mAsyncStreamIsBuffered(false)
     , mMutex("nsInputStreamPump")
 {
 }
--- a/netwerk/base/nsPACMan.cpp
+++ b/netwerk/base/nsPACMan.cpp
@@ -272,16 +272,17 @@ private:
 
 //-----------------------------------------------------------------------------
 
 PendingPACQuery::PendingPACQuery(nsPACMan* pacMan,
                                  nsIURI* uri,
                                  nsPACManCallback* callback,
                                  bool mainThreadResponse)
   : Runnable("net::PendingPACQuery")
+  , mPort(0)
   , mPACMan(pacMan)
   , mCallback(callback)
   , mOnMainThreadOnly(mainThreadResponse)
 {
   uri->GetAsciiSpec(mSpec);
   uri->GetAsciiHost(mHost);
   uri->GetScheme(mScheme);
   uri->GetPort(&mPort);
--- a/netwerk/base/nsServerSocket.cpp
+++ b/netwerk/base/nsServerSocket.cpp
@@ -39,16 +39,25 @@ PostEvent(nsServerSocket *s, nsServerSoc
 //-----------------------------------------------------------------------------
 
 nsServerSocket::nsServerSocket()
   : mFD(nullptr)
   , mLock("nsServerSocket.mLock")
   , mAttached(false)
   , mKeepWhenOffline(false)
 {
+  this->mAddr.raw.family = 0;
+  this->mAddr.inet.family = 0;
+  this->mAddr.inet.port = 0;
+  this->mAddr.inet.ip = 0;
+  this->mAddr.ipv6.family = 0;
+  this->mAddr.ipv6.port = 0;
+  this->mAddr.ipv6.flowinfo = 0;
+  this->mAddr.ipv6.scope_id = 0;
+  this->mAddr.local.family = 0;
   // we want to be able to access the STS directly, and it may not have been
   // constructed yet.  the STS constructor sets gSocketTransportService.
   if (!gSocketTransportService)
   {
     // This call can fail if we're offline, for example.
     nsCOMPtr<nsISocketTransportService> sts =
         do_GetService(NS_SOCKETTRANSPORTSERVICE_CONTRACTID);
   }
--- a/netwerk/base/nsSocketTransport2.cpp
+++ b/netwerk/base/nsSocketTransport2.cpp
@@ -789,16 +789,20 @@ nsSocketTransport::nsSocketTransport()
     , mKeepaliveRetryIntervalS(-1)
     , mKeepaliveProbeCount(-1)
     , mFastOpenCallback(nullptr)
     , mFastOpenLayerHasBufferedData(false)
     , mFastOpenStatus(TFO_NOT_SET)
     , mFirstRetryError(NS_OK)
     , mDoNotRetryToConnect(false)
 {
+    this->mNetAddr.raw.family = 0;
+    this->mNetAddr.inet = {};
+    this->mSelfAddr.raw.family = 0;
+    this->mSelfAddr.inet = {};
     SOCKET_LOG(("creating nsSocketTransport @%p\n", this));
 
     mTimeouts[TIMEOUT_CONNECT]    = UINT16_MAX; // no timeout
     mTimeouts[TIMEOUT_READ_WRITE] = UINT16_MAX; // no timeout
 }
 
 nsSocketTransport::~nsSocketTransport()
 {
--- a/netwerk/base/nsStandardURL.h
+++ b/netwerk/base/nsStandardURL.h
@@ -469,17 +469,19 @@ public:
             nsresult rv = uri->SetFile(aFile);
             if (NS_FAILED(rv)) {
                 return rv;
             }
             BaseURIMutator<T>::mURI.swap(uri);
             return NS_OK;
         }
 
-        explicit TemplatedMutator() = default;
+        explicit TemplatedMutator() : mMarkedFileURL(false)
+        {
+        }
     private:
         virtual ~TemplatedMutator() = default;
 
         bool mMarkedFileURL = false;
 
         friend T;
     };
 
--- a/netwerk/base/nsUDPSocket.cpp
+++ b/netwerk/base/nsUDPSocket.cpp
@@ -259,16 +259,17 @@ nsUDPMessage::GetDataAsTArray()
 nsUDPSocket::nsUDPSocket()
   : mLock("nsUDPSocket.mLock")
   , mFD(nullptr)
   , mOriginAttributes()
   , mAttached(false)
   , mByteReadCount(0)
   , mByteWriteCount(0)
 {
+  this->mAddr.inet = {};
   mAddr.raw.family = PR_AF_UNSPEC;
   // we want to be able to access the STS directly, and it may not have been
   // constructed yet.  the STS constructor sets gSocketTransportService.
   if (!gSocketTransportService)
   {
     // This call can fail if we're offline, for example.
     nsCOMPtr<nsISocketTransportService> sts =
         do_GetService(NS_SOCKETTRANSPORTSERVICE_CONTRACTID);
--- a/netwerk/cache/nsCacheEntry.cpp
+++ b/netwerk/cache/nsCacheEntry.cpp
@@ -22,23 +22,26 @@ using namespace mozilla;
 
 nsCacheEntry::nsCacheEntry(const nsACString &   key,
                            bool                 streamBased,
                            nsCacheStoragePolicy storagePolicy)
     : mKey(key),
       mFetchCount(0),
       mLastFetched(0),
       mLastModified(0),
+      mLastValidated(0),
       mExpirationTime(nsICache::NO_EXPIRATION_TIME),
       mFlags(0),
       mPredictedDataSize(-1),
       mDataSize(0),
       mCacheDevice(nullptr),
       mCustomDevice(nullptr),
-      mData(nullptr)
+      mData(nullptr),
+      mRequestQ{},
+      mDescriptorQ{}
 {
     MOZ_COUNT_CTOR(nsCacheEntry);
     PR_INIT_CLIST(this);
     PR_INIT_CLIST(&mRequestQ);
     PR_INIT_CLIST(&mDescriptorQ);
 
     if (streamBased) MarkStreamBased();
     SetStoragePolicy(storagePolicy);
--- a/netwerk/cache/nsCacheEntryDescriptor.h
+++ b/netwerk/cache/nsCacheEntryDescriptor.h
@@ -118,16 +118,17 @@ private:
      public:
          NS_DECL_ISUPPORTS_INHERITED
 
          nsDecompressInputStreamWrapper(nsCacheEntryDescriptor * desc,
                                       uint32_t off)
           : nsInputStreamWrapper(desc, off)
           , mReadBuffer(nullptr)
           , mReadBufferLen(0)
+          , mZstream{}
           , mStreamInitialized(false)
           , mStreamEnded(false)
          {
          }
          NS_IMETHOD Read(char* buf, uint32_t count, uint32_t * result) override;
          NS_IMETHOD Close() override;
      private:
          virtual ~nsDecompressInputStreamWrapper()
@@ -198,16 +199,17 @@ private:
      public:
          NS_DECL_ISUPPORTS_INHERITED
 
          nsCompressOutputStreamWrapper(nsCacheEntryDescriptor * desc,
                                        uint32_t off)
           : nsOutputStreamWrapper(desc, off)
           , mWriteBuffer(nullptr)
           , mWriteBufferLen(0)
+          , mZstream{}
           , mStreamInitialized(false)
           , mStreamEnded(false)
           , mUncompressedCount(0)
          {
          }
          NS_IMETHOD Write(const char* buf, uint32_t count, uint32_t * result) override;
          NS_IMETHOD Close() override;
      private:
--- a/netwerk/cache/nsCacheService.cpp
+++ b/netwerk/cache/nsCacheService.cpp
@@ -1098,19 +1098,21 @@ nsCacheService::nsCacheService()
       mLock("nsCacheService.mLock"),
       mCondVar(mLock, "nsCacheService.mCondVar"),
       mNotified(false),
       mTimeStampLock("nsCacheService.mTimeStampLock"),
       mInitialized(false),
       mClearingEntries(false),
       mEnableMemoryDevice(true),
       mEnableDiskDevice(true),
+      mEnableOfflineDevice(false),
       mMemoryDevice(nullptr),
       mDiskDevice(nullptr),
       mOfflineDevice(nullptr),
+      mDoomedEntries{},
       mTotalEntries(0),
       mCacheHits(0),
       mCacheMisses(0),
       mMaxKeyLength(0),
       mMaxDataSize(0),
       mMaxMetaSize(0),
       mDeactivateFailures(0),
       mDeactivatedUnboundEntries(0)
--- a/netwerk/cache/nsDiskCacheStreams.h
+++ b/netwerk/cache/nsDiskCacheStreams.h
@@ -38,17 +38,27 @@ public:
                     mInStreamCount--;
                     NS_ASSERTION(mInStreamCount >= 0, "mInStreamCount has gone negative");
                 }
 
     size_t     SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf);
 
     // GCC 2.95.2 requires this to be defined, although we never call it.
     // and OS/2 requires that it not be private
-    nsDiskCacheStreamIO() { NS_NOTREACHED("oops"); }
+    nsDiskCacheStreamIO()
+        : mBinding(nullptr),
+          mDevice(nullptr),
+          mFD(nullptr),
+          mStreamEnd(0),
+          mBufSize(0),
+          mBuffer(nullptr),
+          mOutputStreamIsOpen(false)
+    {
+        NS_NOTREACHED("oops");
+    }
 
 private:
     virtual ~nsDiskCacheStreamIO();
 
     nsresult    OpenCacheFile(int flags, PRFileDesc ** fd);
     nsresult    ReadCacheBlocks(uint32_t bufferSize);
     nsresult    FlushBufferToFile();
     void        UpdateFileSize();
--- a/netwerk/cache2/CacheFileIOManager.cpp
+++ b/netwerk/cache2/CacheFileIOManager.cpp
@@ -1060,16 +1060,21 @@ public:
                         const uint16_t* aOnStopTime)
     : Runnable("net::UpdateIndexEntryEvent")
     , mHandle(aHandle)
     , mHasFrecency(false)
     , mHasExpirationTime(false)
     , mHasHasAltData(false)
     , mHasOnStartTime(false)
     , mHasOnStopTime(false)
+    , mFrecency(0)
+    , mExpirationTime(0)
+    , mHasAltData(false)
+    , mOnStartTime(0)
+    , mOnStopTime(0)
   {
     if (aFrecency) {
       mHasFrecency = true;
       mFrecency = *aFrecency;
     }
     if (aExpirationTime) {
       mHasExpirationTime = true;
       mExpirationTime = *aExpirationTime;
@@ -4274,19 +4279,21 @@ namespace {
 class SizeOfHandlesRunnable : public Runnable
 {
 public:
   SizeOfHandlesRunnable(mozilla::MallocSizeOf mallocSizeOf,
                         CacheFileHandles const& handles,
                         nsTArray<CacheFileHandle*> const& specialHandles)
     : Runnable("net::SizeOfHandlesRunnable")
     , mMonitor("SizeOfHandlesRunnable.mMonitor")
+    , mMonitorNotified(false)
     , mMallocSizeOf(mallocSizeOf)
     , mHandles(handles)
     , mSpecialHandles(specialHandles)
+    , mSize(0)
   {
   }
 
   size_t Get(CacheIOThread* thread)
   {
     nsCOMPtr<nsIEventTarget> target = thread->Target();
     if (!target) {
       NS_ERROR("If we have the I/O thread we also must have the I/O target");
--- a/netwerk/cache2/CacheIndex.h
+++ b/netwerk/cache2/CacheIndex.h
@@ -1204,16 +1204,17 @@ private:
       mSize = aSize;
       NS_DispatchToMainThread(this);
     }
 
   private:
     explicit DiskConsumptionObserver(nsWeakPtr const& aWeakObserver)
       : Runnable("net::CacheIndex::DiskConsumptionObserver")
       , mObserver(aWeakObserver)
+      , mSize(0)
     {
     }
     virtual ~DiskConsumptionObserver() {
       if (mObserver && !NS_IsMainThread()) {
         NS_ReleaseOnMainThreadSystemGroup(
           "DiskConsumptionObserver::mObserver", mObserver.forget());
       }
     }
--- a/netwerk/cache2/CacheStorageService.cpp
+++ b/netwerk/cache2/CacheStorageService.cpp
@@ -363,16 +363,17 @@ class WalkDiskCacheRunnable : public Wal
 {
 public:
   WalkDiskCacheRunnable(nsILoadContextInfo *aLoadInfo,
                         bool aVisitEntries,
                         nsICacheStorageVisitor* aVisitor)
     : WalkCacheRunnable(aVisitor, aVisitEntries)
     , mLoadInfo(aLoadInfo)
     , mPass(COLLECT_STATS)
+    , mCount(0)
   {
   }
 
   nsresult Walk()
   {
     // TODO, bug 998693
     // Initial index build should be forced here so that about:cache soon
     // after startup gives some meaningfull results.
@@ -391,16 +392,21 @@ private:
   // Invokes OnCacheEntryInfo callback for each single found entry.
   // There is one instance of this class per one entry.
   class OnCacheEntryInfoRunnable : public Runnable
   {
   public:
     explicit OnCacheEntryInfoRunnable(WalkDiskCacheRunnable* aWalker)
       : Runnable("net::WalkDiskCacheRunnable::OnCacheEntryInfoRunnable")
       , mWalker(aWalker)
+      , mDataSize(0)
+      , mFetchCount(0)
+      , mLastModifiedTime(0)
+      , mExpirationTime(0)
+      , mPinned(false)
     {
     }
 
     NS_IMETHOD Run() override
     {
       MOZ_ASSERT(NS_IsMainThread());
 
       nsresult rv;
@@ -1628,17 +1634,20 @@ namespace {
 class CacheEntryDoomByKeyCallback : public CacheFileIOListener
                                   , public nsIRunnable
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
 
   explicit CacheEntryDoomByKeyCallback(nsICacheEntryDoomCallback* aCallback)
-    : mCallback(aCallback) { }
+    : mCallback(aCallback)
+    , mResult(NS_ERROR_NOT_INITIALIZED)
+  {
+  }
 
 private:
   virtual ~CacheEntryDoomByKeyCallback();
 
   NS_IMETHOD OnFileOpened(CacheFileHandle *aHandle, nsresult aResult) override { return NS_OK; }
   NS_IMETHOD OnDataWritten(CacheFileHandle *aHandle, const char *aBuf, nsresult aResult) override { return NS_OK; }
   NS_IMETHOD OnDataRead(CacheFileHandle *aHandle, char *aBuf, nsresult aResult) override { return NS_OK; }
   NS_IMETHOD OnFileDoomed(CacheFileHandle *aHandle, nsresult aResult) override;
--- a/netwerk/dns/DNS.cpp
+++ b/netwerk/dns/DNS.cpp
@@ -278,16 +278,18 @@ NetAddr::operator < (const NetAddr& othe
         }
         return this->inet6.flowinfo < other.inet6.flowinfo;
     }
     return false;
 }
 
 NetAddrElement::NetAddrElement(const PRNetAddr *prNetAddr)
 {
+  this->mAddress.raw.family = 0;
+  this->mAddress.inet = {};
   PRNetAddrToNetAddr(prNetAddr, &mAddress);
 }
 
 NetAddrElement::NetAddrElement(const NetAddrElement& netAddr)
 {
   mAddress = netAddr.mAddress;
 }
 
--- a/netwerk/dns/TRR.h
+++ b/netwerk/dns/TRR.h
@@ -103,16 +103,17 @@ public:
   {
 
   }
 
   // used on push
   explicit TRR(AHostResolver *aResolver, bool aPB)
     : mozilla::Runnable("TRR")
     , mHostResolver(aResolver)
+    , mType(TRRTYPE_A)
     , mBodySize(0)
     , mFailed(false)
     , mPB(aPB)
     , mCnameLoop(kCnameChaseMax)
     , mAllowRFC1918(false)
   { }
 
   // to verify a domain
--- a/netwerk/dns/nsDNSService2.cpp
+++ b/netwerk/dns/nsDNSService2.cpp
@@ -488,20 +488,26 @@ private:
 };
 
 //-----------------------------------------------------------------------------
 
 nsDNSService::nsDNSService()
     : mLock("nsDNSServer.mLock")
     , mDisableIPv6(false)
     , mDisablePrefetch(false)
+    , mBlockDotOnion(false)
     , mNotifyResolution(false)
     , mOfflineLocalhost(false)
     , mForceResolveOn(false)
+    , mProxyType(0)
     , mTrrService(nullptr)
+    , mResCacheEntries(0)
+    , mResCacheExpiration(0)
+    , mResCacheGrace(0)
+    , mResolverPrefsUpdated(false)
 {
 }
 
 nsDNSService::~nsDNSService() = default;
 
 NS_IMPL_ISUPPORTS(nsDNSService, nsIDNSService, nsPIDNSService, nsIObserver,
                   nsIMemoryReporter)
 
--- a/netwerk/dns/nsHostResolver.cpp
+++ b/netwerk/dns/nsHostResolver.cpp
@@ -178,16 +178,17 @@ nsHostKey::SizeOfExcludingThis(mozilla::
 
 nsHostRecord::nsHostRecord(const nsHostKey& key)
     : nsHostKey(key)
     , addr_info_lock("nsHostRecord.addr_info_lock")
     , addr_info_gencnt(0)
     , addr_info(nullptr)
     , addr(nullptr)
     , negative(false)
+    , mResolverMode(MODE_NATIVEONLY)
     , mResolving(0)
     , mTRRSuccess(0)
     , mNativeSuccess(0)
     , mNative(false)
     , mTRRUsed(false)
     , mNativeUsed(false)
     , onQueue(false)
     , usingAnyThread(false)
--- a/netwerk/dns/nsIDNService.cpp
+++ b/netwerk/dns/nsIDNService.cpp
@@ -136,16 +136,17 @@ void nsIDNService::prefsChanged(nsIPrefB
       mRestrictionProfile = eASCIIOnlyProfile;
     }
   }
 }
 
 nsIDNService::nsIDNService()
   : mLock("DNService pref value lock")
   , mShowPunycode(false)
+  , mRestrictionProfile(static_cast<restrictionProfile>(0))
   , mIDNUseWhitelist(false)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   uint32_t IDNAOptions = UIDNA_CHECK_BIDI | UIDNA_CHECK_CONTEXTJ;
   if (!kIDNA2008_TransitionalProcessing) {
     IDNAOptions |= UIDNA_NONTRANSITIONAL_TO_UNICODE;
   }
--- a/netwerk/ipc/NeckoMessageUtils.h
+++ b/netwerk/ipc/NeckoMessageUtils.h
@@ -22,17 +22,22 @@ namespace IPC {
 // nsIPermissionManager utilities
 
 struct Permission
 {
   nsCString origin, type;
   uint32_t capability, expireType;
   int64_t expireTime;
 
-  Permission() { }
+  Permission()
+    : capability(0)
+    , expireType(0)
+    , expireTime(0)
+  {}
+  
   Permission(const nsCString& aOrigin,
              const nsCString& aType,
              const uint32_t aCapability,
              const uint32_t aExpireType,
              const int64_t aExpireTime) : origin(aOrigin),
                                           type(aType),
                                           capability(aCapability),
                                           expireType(aExpireType),
--- a/netwerk/protocol/file/nsFileChannel.cpp
+++ b/netwerk/protocol/file/nsFileChannel.cpp
@@ -252,17 +252,18 @@ nsFileUploadContentStream::OnCopyComplet
   nsresult status = mCopyEvent->Status();
 
   CloseWithStatus(NS_FAILED(status) ? status : NS_BASE_STREAM_CLOSED);
 }
 
 //-----------------------------------------------------------------------------
 
 nsFileChannel::nsFileChannel(nsIURI *uri)
-  : mFileURI(uri)
+  : mUploadLength(0)
+  , mFileURI(uri)
 {
 }
 
 nsresult
 nsFileChannel::Init()
 {
   NS_ENSURE_STATE(mLoadInfo);
 
--- a/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
+++ b/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
@@ -70,16 +70,17 @@ NS_IMPL_ISUPPORTS_INHERITED(nsFtpState,
                             nsIRequestObserver,
                             nsIProtocolProxyCallback)
 
 nsFtpState::nsFtpState()
     : nsBaseContentStream(true)
     , mState(FTP_INIT)
     , mNextState(FTP_S_USER)
     , mKeepRunning(true)
+    , mResponseCode(0)
     , mReceivedControlData(false)
     , mTryingCachedControl(false)
     , mRETRFailed(false)
     , mFileSize(kJS_MAX_SAFE_UINTEGER)
     , mServerType(FTP_GENERIC_TYPE)
     , mAction(GET)
     , mAnonymous(true)
     , mRetryPass(false)
@@ -89,16 +90,18 @@ nsFtpState::nsFtpState()
     , mCacheConnection(true)
     , mPort(21)
     , mAddressChecked(false)
     , mServerIsIPv6(false)
     , mUseUTF8(false)
     , mControlStatus(NS_OK)
     , mDeferredCallbackPending(false)
 {
+    this->mServerAddress.raw.family = 0;
+    this->mServerAddress.inet = {};
     LOG_INFO(("FTP:(%p) nsFtpState created", this));
 
     // make sure handler stays around
     NS_ADDREF(gFtpHandler);
 }
 
 nsFtpState::~nsFtpState()
 {
--- a/netwerk/protocol/ftp/nsFtpControlConnection.cpp
+++ b/netwerk/protocol/ftp/nsFtpControlConnection.cpp
@@ -61,18 +61,22 @@ nsFtpControlConnection::OnInputStreamRea
         listener->OnControlDataAvailable(data, avail);
     }
 
     return NS_OK;
 }
 
 nsFtpControlConnection::nsFtpControlConnection(const nsACString& host,
                                                uint32_t port)
-    : mServerType(0), mSessionId(gFtpHandler->GetSessionId())
-    , mUseUTF8(false), mHost(host), mPort(port)
+    : mServerType(0)
+    , mSuspendedWrite(0)
+    , mSessionId(gFtpHandler->GetSessionId())
+    , mUseUTF8(false)
+    , mHost(host)
+    , mPort(port)
 {
     LOG_INFO(("FTP:CC created @%p", this));
 }
 
 nsFtpControlConnection::~nsFtpControlConnection()
 {
     LOG_INFO(("FTP:CC destroyed @%p", this));
 }
--- a/netwerk/protocol/http/Http2Compression.h
+++ b/netwerk/protocol/http/Http2Compression.h
@@ -95,16 +95,21 @@ private:
 };
 
 class Http2Compressor;
 
 class Http2Decompressor final : public Http2BaseCompressor
 {
 public:
   Http2Decompressor()
+    : mOffset(0)
+    , mData(nullptr)
+    , mDataLen(0)
+    , mSeenNonColonHeader(false)
+    , mIsPush(false)
   {
     mPeakSizeID = Telemetry::HPACK_PEAK_SIZE_DECOMPRESSOR;
     mPeakCountID = Telemetry::HPACK_PEAK_COUNT_DECOMPRESSOR;
   };
   virtual ~Http2Decompressor() = default;
 
   // NS_OK: Produces the working set of HTTP/1 formatted headers
   MOZ_MUST_USE nsresult DecodeHeaderBlock(const uint8_t *data,
--- a/netwerk/protocol/http/Http2Session.cpp
+++ b/netwerk/protocol/http/Http2Session.cpp
@@ -109,16 +109,17 @@ Http2Session::Http2Session(nsISocketTran
   , mServerSessionWindow(kDefaultRwin)
   , mInitialRwin(ASpdySession::kInitialRwin)
   , mOutputQueueSize(kDefaultQueueSize)
   , mOutputQueueUsed(0)
   , mOutputQueueSent(0)
   , mLastReadEpoch(PR_IntervalNow())
   , mPingSentEpoch(0)
   , mPreviousUsed(false)
+  , mAggregatedHeaderSize(0)
   , mWaitingForSettingsAck(false)
   , mGoAwayOnPush(false)
   , mUseH2Deps(false)
   , mAttemptingEarlyData(attemptingEarlyData)
   , mOriginFrameActivated(false)
   , mTlsHandshakeFinished(false)
   , mCheckNetworkStallsWithTFO(false)
   , mLastRequestBytesSentTime(0)
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -194,16 +194,17 @@ HttpBaseChannel::HttpBaseChannel()
   , mSuspendCount(0)
   , mInitialRwin(0)
   , mProxyResolveFlags(0)
   , mContentDispositionHint(UINT32_MAX)
   , mHttpHandler(gHttpHandler)
   , mReferrerPolicy(NS_GetDefaultReferrerPolicy())
   , mRedirectCount(0)
   , mInternalRedirectCount(0)
+  , mChannelCreationTime(0)
   , mForcePending(false)
   , mCorsIncludeCredentials(false)
   , mCorsMode(nsIHttpChannelInternal::CORS_MODE_NO_CORS)
   , mRedirectMode(nsIHttpChannelInternal::REDIRECT_MODE_FOLLOW)
   , mOnStartRequestCalled(false)
   , mOnStopRequestCalled(false)
   , mUpgradableToSecure(true)
   , mAfterOnStartRequestBegun(false)
@@ -214,20 +215,23 @@ HttpBaseChannel::HttpBaseChannel()
   , mContentWindowId(0)
   , mTopLevelOuterContentWindowId(0)
   , mRequireCORSPreflight(false)
   , mReportCollector(new ConsoleReportCollector())
   , mAltDataLength(0)
   , mAltDataForChild(false)
   , mForceMainDocumentChannel(false)
   , mIsTrackingResource(false)
+  , mChannelId(0)
   , mLastRedirectFlags(0)
   , mReqContentLength(0U)
   , mPendingInputStreamLengthOperation(false)
 {
+  this->mSelfAddr.inet = {};
+  this->mPeerAddr.inet = {};
   LOG(("Creating HttpBaseChannel @%p\n", this));
 
   // Subfields of unions cannot be targeted in an initializer list.
 #ifdef MOZ_VALGRIND
   // Zero the entire unions so that Valgrind doesn't complain when we send them
   // to another process.
   memset(&mSelfAddr, 0, sizeof(NetAddr));
   memset(&mPeerAddr, 0, sizeof(NetAddr));
--- a/netwerk/protocol/http/NullHttpChannel.cpp
+++ b/netwerk/protocol/http/NullHttpChannel.cpp
@@ -10,23 +10,27 @@
 
 namespace mozilla {
 namespace net {
 
 NS_IMPL_ISUPPORTS(NullHttpChannel, nsINullChannel,
                   nsIHttpChannel, nsITimedChannel)
 
 NullHttpChannel::NullHttpChannel()
+  : mAllRedirectsSameOrigin(false)
+  , mAllRedirectsPassTimingAllowCheck(false)
 {
   mChannelCreationTime = PR_Now();
   mChannelCreationTimestamp = TimeStamp::Now();
   mAsyncOpenTime = TimeStamp::Now();
 }
 
 NullHttpChannel::NullHttpChannel(nsIHttpChannel * chan)
+  : mAllRedirectsSameOrigin(false)
+  , mAllRedirectsPassTimingAllowCheck(false)
 {
   nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager();
   ssm->GetChannelURIPrincipal(chan, getter_AddRefs(mResourcePrincipal));
 
   Unused << chan->GetResponseHeader(NS_LITERAL_CSTRING("Timing-Allow-Origin"),
                                     mTimingAllowOriginHeader);
   chan->GetURI(getter_AddRefs(mURI));
   chan->GetOriginalURI(getter_AddRefs(mOriginalURI));
--- a/netwerk/protocol/http/TunnelUtils.cpp
+++ b/netwerk/protocol/http/TunnelUtils.cpp
@@ -38,17 +38,19 @@ TLSFilterTransaction::TLSFilterTransacti
                                            int32_t aTLSPort,
                                            nsAHttpSegmentReader *aReader,
                                            nsAHttpSegmentWriter *aWriter)
   : mTransaction(aWrapped)
   , mEncryptedTextUsed(0)
   , mEncryptedTextSize(0)
   , mSegmentReader(aReader)
   , mSegmentWriter(aWriter)
+  , mFilterReadCode(NS_ERROR_NOT_INITIALIZED)
   , mForce(false)
+  , mReadSegmentBlocked(false)
   , mNudgeCounter(0)
 {
   MOZ_ASSERT(OnSocketThread(), "not on socket thread");
   LOG(("TLSFilterTransaction ctor %p\n", this));
 
   nsCOMPtr<nsISocketProvider> provider;
   nsCOMPtr<nsISocketProviderService> spserv =
     do_GetService(NS_SOCKETPROVIDERSERVICE_CONTRACTID);
--- a/netwerk/protocol/http/nsCORSListenerProxy.cpp
+++ b/netwerk/protocol/http/nsCORSListenerProxy.cpp
@@ -414,16 +414,19 @@ nsCORSListenerProxy::nsCORSListenerProxy
                                          nsIPrincipal* aRequestingPrincipal,
                                          bool aWithCredentials)
   : mOuterListener(aOuter),
     mRequestingPrincipal(aRequestingPrincipal),
     mOriginHeaderPrincipal(aRequestingPrincipal),
     mWithCredentials(aWithCredentials && !gDisableCORSPrivateData),
     mRequestApproved(false),
     mHasBeenCrossSite(false),
+#ifdef DEBUG
+    mInited(false),
+#endif
     mMutex("nsCORSListenerProxy")
 {
 }
 
 nsresult
 nsCORSListenerProxy::Init(nsIChannel* aChannel, DataURIHandling aAllowDataURI)
 {
   aChannel->GetNotificationCallbacks(getter_AddRefs(mOuterNotificationCallbacks));
--- a/netwerk/protocol/http/nsHttpAuthCache.h
+++ b/netwerk/protocol/http/nsHttpAuthCache.h
@@ -38,16 +38,18 @@ public:
         , mPass(nullptr)
         , mDomain(nullptr)
     {
     }
     nsHttpAuthIdentity(const char16_t *domain,
                        const char16_t *user,
                        const char16_t *password)
         : mUser(nullptr)
+        , mPass{ nullptr }
+        , mDomain{ nullptr }
     {
         DebugOnly<nsresult> rv = Set(domain, user, password);
         MOZ_ASSERT(NS_SUCCEEDED(rv));
     }
    ~nsHttpAuthIdentity()
     {
         Clear();
     }
@@ -101,16 +103,18 @@ private:
                     const char *realm,
                     const char *creds,
                     const char *challenge,
                     const nsHttpAuthIdentity *ident,
                     nsISupports *metadata)
         : mRoot(nullptr)
         , mTail(nullptr)
         , mRealm(nullptr)
+        , mCreds{ nullptr }
+        , mChallenge{ nullptr }
     {
         DebugOnly<nsresult> rv = Set(path, realm, creds, challenge, ident, metadata);
         MOZ_ASSERT(NS_SUCCEEDED(rv));
     }
    ~nsHttpAuthEntry();
 
     MOZ_MUST_USE nsresult Set(const char *path,
                               const char *realm,
--- a/netwerk/protocol/http/nsHttpAuthManager.cpp
+++ b/netwerk/protocol/http/nsHttpAuthManager.cpp
@@ -11,16 +11,22 @@
 #include "nsNetUtil.h"
 #include "nsIPrincipal.h"
 
 namespace mozilla {
 namespace net {
 
 NS_IMPL_ISUPPORTS(nsHttpAuthManager, nsIHttpAuthManager)
 
+nsHttpAuthManager::nsHttpAuthManager()
+  : mAuthCache(nullptr)
+  , mPrivateAuthCache(nullptr)
+{
+}
+
 nsresult nsHttpAuthManager::Init()
 {
   // get reference to the auth cache.  we assume that we will live
   // as long as gHttpHandler.  instantiate it if necessary.
 
   if (!gHttpHandler) {
     nsresult rv;
     nsCOMPtr<nsIIOService> ios = do_GetIOService(&rv);
--- a/netwerk/protocol/http/nsHttpAuthManager.h
+++ b/netwerk/protocol/http/nsHttpAuthManager.h
@@ -14,17 +14,17 @@ namespace net {
 class nsHttpAuthCache;
 
 class nsHttpAuthManager : public nsIHttpAuthManager
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIHTTPAUTHMANAGER
 
-  nsHttpAuthManager() = default;
+  nsHttpAuthManager();
   MOZ_MUST_USE nsresult Init();
 
 protected:
   virtual ~nsHttpAuthManager() = default;
 
   nsHttpAuthCache *mAuthCache;
   nsHttpAuthCache *mPrivateAuthCache;
 };
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -299,16 +299,17 @@ AutoRedirectVetoNotifier::ReportRedirect
 
 nsHttpChannel::nsHttpChannel()
     : HttpAsyncAborter<nsHttpChannel>(this)
     , mLogicalOffset(0)
     , mPostID(0)
     , mRequestTime(0)
     , mOfflineCacheLastModifiedTime(0)
     , mSuspendTotalTime(0)
+    , mRedirectType(0)
     , mCacheOpenWithPriority(false)
     , mCacheQueueSizeWhenOpen(0)
     , mCachedContentIsValid(false)
     , mCachedContentIsPartial(false)
     , mCacheOnlyMetadata(false)
     , mTransactionReplaced(false)
     , mAuthRetryPending(false)
     , mProxyAuthPending(false)
@@ -328,16 +329,17 @@ nsHttpChannel::nsHttpChannel()
     , mIsPartialRequest(0)
     , mHasAutoRedirectVetoNotifier(0)
     , mPinCacheContent(0)
     , mIsCorsPreflightDone(0)
     , mStronglyFramed(false)
     , mUsedNetwork(0)
     , mAuthConnectionRestartable(0)
     , mPushedStream(nullptr)
+    , mLocalBlocklist(false)
     , mOnTailUnblock(nullptr)
     , mWarningReporter(nullptr)
     , mIsReadingFromCache(false)
     , mFirstResponseSource(RESPONSE_PENDING)
     , mRaceCacheWithNetwork(false)
     , mRaceDelay(0)
     , mIgnoreCacheEntry(false)
     , mRCWNLock("nsHttpChannel.mRCWNLock")
--- a/netwerk/protocol/http/nsHttpConnection.cpp
+++ b/netwerk/protocol/http/nsHttpConnection.cpp
@@ -41,40 +41,47 @@
 namespace mozilla {
 namespace net {
 
 //-----------------------------------------------------------------------------
 // nsHttpConnection <public>
 //-----------------------------------------------------------------------------
 
 nsHttpConnection::nsHttpConnection()
-    : mTransaction(nullptr)
+    : mSocketInCondition(NS_ERROR_NOT_INITIALIZED)
+    , mSocketOutCondition(NS_ERROR_NOT_INITIALIZED)
+    , mTransaction(nullptr)
     , mHttpHandler(gHttpHandler)
     , mCallbacksLock("nsHttpConnection::mCallbacksLock")
+    , mLastReadTime(0)
+    , mLastWriteTime(0)
+    , mMaxHangTime(0)
     , mConsiderReusedAfterInterval(0)
     , mConsiderReusedAfterEpoch(0)
     , mCurrentBytesRead(0)
     , mMaxBytesRead(0)
     , mTotalBytesRead(0)
     , mTotalBytesWritten(0)
     , mContentBytesWritten(0)
+    , mRtt(0)
     , mUrgentStartPreferred(false)
     , mUrgentStartPreferredKnown(false)
     , mConnectedTransport(false)
     , mKeepAlive(true) // assume to keep-alive by default
     , mKeepAliveMask(true)
     , mDontReuse(false)
     , mIsReused(false)
     , mCompletedProxyConnect(false)
     , mLastTransactionExpectedNoContent(false)
     , mIdleMonitoring(false)
     , mProxyConnectInProgress(false)
     , mExperienced(false)
     , mInSpdyTunnel(false)
     , mForcePlainText(false)
+    , mTrafficCount(0)
     , mTrafficStamp(false)
     , mHttp1xTransactionCount(0)
     , mRemainingConnectionUses(0xffffffff)
     , mNPNComplete(false)
     , mSetupSSLCalled(false)
     , mUsingSpdyVersion(SpdyVersion::NONE)
     , mPriority(nsISupportsPriority::PRIORITY_NORMAL)
     , mReportedSpdy(false)
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -459,17 +459,24 @@ nsHttpConnectionMgr::DoShiftReloadConnec
 {
     return PostEvent(&nsHttpConnectionMgr::OnMsgDoShiftReloadConnectionCleanup,
                      0, aCI);
 }
 
 class SpeculativeConnectArgs : public ARefBase
 {
 public:
-    SpeculativeConnectArgs() { mOverridesOK = false; }
+    SpeculativeConnectArgs()
+        : mParallelSpeculativeConnectLimit(0)
+        , mIgnoreIdle(false)
+        , mIsFromPredictor(false)
+        , mAllow1918(false)
+    {
+        mOverridesOK = false;
+    }
     NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SpeculativeConnectArgs, override)
 
 public: // intentional!
     RefPtr<NullHttpTransaction> mTrans;
 
     bool mOverridesOK;
     uint32_t mParallelSpeculativeConnectLimit;
     bool mIgnoreIdle;
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -221,16 +221,17 @@ nsHttpHandler::nsHttpHandler()
     , mThrottleReadInterval(500)
     , mThrottleHoldTime(600)
     , mThrottleMaxTime(3000)
     , mUrgentStartEnabled(true)
     , mTailBlockingEnabled(true)
     , mTailDelayQuantum(600)
     , mTailDelayQuantumAfterDCL(100)
     , mTailDelayMax(6000)
+    , mTailTotalMax(0)
     , mRedirectionLimit(10)
     , mPhishyUserPassLength(1)
     , mQoSBits(0x00)
     , mEnforceAssocReq(false)
     , mLastUniqueID(NowInSeconds())
     , mSessionStartTime(0)
     , mLegacyAppName("Mozilla")
     , mLegacyAppVersion("5.0")
--- a/netwerk/protocol/http/nsHttpNTLMAuth.h
+++ b/netwerk/protocol/http/nsHttpNTLMAuth.h
@@ -10,17 +10,17 @@
 namespace mozilla { namespace net {
 
 class nsHttpNTLMAuth : public nsIHttpAuthenticator
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIHTTPAUTHENTICATOR
 
-    nsHttpNTLMAuth() = default;
+    nsHttpNTLMAuth() : mUseNative(false) {}
 
 private:
     virtual ~nsHttpNTLMAuth() = default;
 
     // This flag indicates whether we are using the native NTLM implementation
     // or the internal one.
     bool  mUseNative;
 };
--- a/netwerk/protocol/http/nsHttpTransaction.cpp
+++ b/netwerk/protocol/http/nsHttpTransaction.cpp
@@ -141,16 +141,18 @@ nsHttpTransaction::nsHttpTransaction()
     , mPassedRatePacing(false)
     , mSynchronousRatePaceRequest(false)
     , mClassOfService(0)
     , m0RTTInProgress(false)
     , mDoNotTryEarlyData(false)
     , mEarlyDataDisposition(EARLY_NONE)
     , mFastOpenStatus(TFO_NOT_TRIED)
 {
+    this->mSelfAddr.inet = {};
+    this->mPeerAddr.inet = {};
     LOG(("Creating nsHttpTransaction @%p\n", this));
 
 #ifdef MOZ_VALGRIND
     memset(&mSelfAddr, 0, sizeof(NetAddr));
     memset(&mPeerAddr, 0, sizeof(NetAddr));
 #endif
     mSelfAddr.raw.family = PR_AF_UNSPEC;
     mPeerAddr.raw.family = PR_AF_UNSPEC;
--- a/netwerk/protocol/viewsource/nsViewSourceChannel.h
+++ b/netwerk/protocol/viewsource/nsViewSourceChannel.h
@@ -41,17 +41,18 @@ public:
     NS_FORWARD_SAFE_NSIAPPLICATIONCACHECONTAINER(mApplicationCacheChannel)
     NS_FORWARD_SAFE_NSIUPLOADCHANNEL(mUploadChannel)
     NS_FORWARD_SAFE_NSIFORMPOSTACTIONCHANNEL(mPostChannel)
     NS_FORWARD_SAFE_NSIHTTPCHANNELINTERNAL(mHttpChannelInternal)
 
     // nsViewSourceChannel methods:
     nsViewSourceChannel()
         : mIsDocument(false)
-        , mOpened(false) {}
+        , mOpened(false)
+        , mIsSrcdocChannel(false) {}
 
     MOZ_MUST_USE nsresult Init(nsIURI* uri);
 
     MOZ_MUST_USE nsresult InitSrcdoc(nsIURI* aURI,
                                      nsIURI* aBaseURI,
                                      const nsAString &aSrcdoc,
                                      nsILoadInfo* aLoadInfo);
 
--- a/netwerk/protocol/websocket/WebSocketChannel.cpp
+++ b/netwerk/protocol/websocket/WebSocketChannel.cpp
@@ -782,16 +782,38 @@ public:
   PMCECompression(bool aNoContextTakeover,
                   int32_t aLocalMaxWindowBits,
                   int32_t aRemoteMaxWindowBits)
     : mActive(false)
     , mNoContextTakeover(aNoContextTakeover)
     , mResetDeflater(false)
     , mMessageDeflated(false)
   {
+    this->mDeflater.next_in = nullptr;
+    this->mDeflater.avail_in = 0;
+    this->mDeflater.total_in = 0;
+    this->mDeflater.next_out = nullptr;
+    this->mDeflater.avail_out = 0;
+    this->mDeflater.total_out = 0;
+    this->mDeflater.msg = nullptr;
+    this->mDeflater.state = nullptr;
+    this->mDeflater.data_type = 0;
+    this->mDeflater.adler = 0;
+    this->mDeflater.reserved = 0;
+    this->mInflater.next_in = nullptr;
+    this->mInflater.avail_in = 0;
+    this->mInflater.total_in = 0;
+    this->mInflater.next_out = nullptr;
+    this->mInflater.avail_out = 0;
+    this->mInflater.total_out = 0;
+    this->mInflater.msg = nullptr;
+    this->mInflater.state = nullptr;
+    this->mInflater.data_type = 0;
+    this->mInflater.adler = 0;
+    this->mInflater.reserved = 0;
     MOZ_COUNT_CTOR(PMCECompression);
 
     mDeflater.zalloc = mInflater.zalloc = Z_NULL;
     mDeflater.zfree  = mInflater.zfree  = Z_NULL;
     mDeflater.opaque = mInflater.opaque = Z_NULL;
 
     if (deflateInit2(&mDeflater, Z_DEFAULT_COMPRESSION, Z_DEFLATED,
                      -aLocalMaxWindowBits, 8, Z_DEFAULT_STRATEGY) == Z_OK) {
@@ -1153,16 +1175,17 @@ NS_IMPL_ISUPPORTS(OutboundEnqueuer, nsIR
 //-----------------------------------------------------------------------------
 
 WebSocketChannel::WebSocketChannel() :
   mPort(0),
   mCloseTimeout(20000),
   mOpenTimeout(20000),
   mConnecting(NOT_CONNECTING),
   mMaxConcurrentConnections(200),
+  mInnerWindowID(0),
   mGotUpgradeOK(0),
   mRecvdHttpUpgradeTransport(0),
   mAutoFollowRedirects(0),
   mAllowPMCE(1),
   mPingOutstanding(0),
   mReleaseOnTransmit(0),
   mDataStarted(false),
   mRequestedClose(false),
@@ -1179,16 +1202,18 @@ WebSocketChannel::WebSocketChannel() :
   mServerCloseCode(CLOSE_ABNORMAL),
   mScriptCloseCode(0),
   mFragmentOpcode(nsIWebSocketFrame::OPCODE_CONTINUATION),
   mFragmentAccumulator(0),
   mBuffered(0),
   mBufferSize(kIncomingBufferInitialSize),
   mCurrentOut(nullptr),
   mCurrentOutSent(0),
+  mHdrOutToSend(0),
+  mHdrOut(nullptr),
   mDynamicOutputSize(0),
   mDynamicOutput(nullptr),
   mPrivateBrowsing(false),
   mConnectionLogService(nullptr)
 {
   MOZ_ASSERT(NS_IsMainThread(), "not main thread");
 
   LOG(("WebSocketChannel::WebSocketChannel() %p\n", this));
--- a/netwerk/socket/nsSOCKSIOLayer.cpp
+++ b/netwerk/socket/nsSOCKSIOLayer.cpp
@@ -226,23 +226,42 @@ private:
 };
 
 nsSOCKSSocketInfo::nsSOCKSSocketInfo()
     : mState(SOCKS_INITIAL)
     , mDataIoPtr(nullptr)
     , mDataLength(0)
     , mReadOffset(0)
     , mAmountToRead(0)
+    , mLookupStatus(NS_ERROR_NOT_INITIALIZED)
     , mFD(nullptr)
     , mVersion(-1)
     , mDestinationFamily(AF_INET)
     , mFlags(0)
     , mTlsFlags(0)
     , mTimeout(PR_INTERVAL_NO_TIMEOUT)
 {
+    this->mInternalProxyAddr.inet.family = 0;
+    this->mInternalProxyAddr.inet6.family = 0;
+    this->mInternalProxyAddr.inet6.port = 0;
+    this->mInternalProxyAddr.inet6.flowinfo = 0;
+    this->mInternalProxyAddr.inet6.scope_id = 0;
+    this->mInternalProxyAddr.local.family = 0;
+    this->mExternalProxyAddr.inet.family = 0;
+    this->mExternalProxyAddr.inet6.family = 0;
+    this->mExternalProxyAddr.inet6.port = 0;
+    this->mExternalProxyAddr.inet6.flowinfo = 0;
+    this->mExternalProxyAddr.inet6.scope_id = 0;
+    this->mExternalProxyAddr.local.family = 0;
+    this->mDestinationAddr.inet.family = 0;
+    this->mDestinationAddr.inet6.family = 0;
+    this->mDestinationAddr.inet6.port = 0;
+    this->mDestinationAddr.inet6.flowinfo = 0;
+    this->mDestinationAddr.inet6.scope_id = 0;
+    this->mDestinationAddr.local.family = 0;
     mData = new uint8_t[BUFFER_SIZE];
 
     mInternalProxyAddr.raw.family = AF_INET;
     mInternalProxyAddr.inet.ip = htonl(INADDR_ANY);
     mInternalProxyAddr.inet.port = htons(0);
 
     mExternalProxyAddr.raw.family = AF_INET;
     mExternalProxyAddr.inet.ip = htonl(INADDR_ANY);
--- a/netwerk/streamconv/converters/nsDirIndexParser.cpp
+++ b/netwerk/streamconv/converters/nsDirIndexParser.cpp
@@ -20,16 +20,21 @@
 
 using namespace mozilla;
 
 NS_IMPL_ISUPPORTS(nsDirIndexParser,
                   nsIRequestObserver,
                   nsIStreamListener,
                   nsIDirIndexParser)
 
+nsDirIndexParser::nsDirIndexParser()
+  : mLineStart(0)
+  , mHasDescription(false) {
+}
+
 nsresult
 nsDirIndexParser::Init() {
   mLineStart = 0;
   mHasDescription = false;
   mFormat[0] = -1;
   auto encoding = mozilla::dom::FallbackEncoding::FromLocale();
   encoding->Name(mEncoding);
 
--- a/netwerk/streamconv/converters/nsDirIndexParser.h
+++ b/netwerk/streamconv/converters/nsDirIndexParser.h
@@ -21,17 +21,17 @@ private:
     virtual ~nsDirIndexParser();
 
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSISTREAMLISTENER
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSIDIRINDEXPARSER
 
-    nsDirIndexParser() = default;
+    nsDirIndexParser();
     nsresult Init();
 
     enum fieldType {
         FIELD_UNKNOWN = 0, // MUST be 0
         FIELD_FILENAME,
         FIELD_DESCRIPTION,
         FIELD_CONTENTLENGTH,
         FIELD_LASTMODIFIED,
--- a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
+++ b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
@@ -41,16 +41,18 @@ nsHTTPCompressConv::nsHTTPCompressConv()
   : mMode(HTTP_COMPRESS_IDENTITY)
   , mOutBuffer(nullptr)
   , mInpBuffer(nullptr)
   , mOutBufferLen(0)
   , mInpBufferLen(0)
   , mCheckHeaderDone(false)
   , mStreamEnded(false)
   , mStreamInitialized(false)
+  , mDummyStreamInitialised(false)
+  , d_stream{}
   , mLen(0)
   , hMode(0)
   , mSkipCount(0)
   , mFlags(0)
   , mDecodedDataLength(0)
   , mMutex("nsHTTPCompressConv")
 {
   LOG(("nsHttpCompresssConv %p ctor\n", this));
--- a/netwerk/streamconv/converters/nsHTTPCompressConv.h
+++ b/netwerk/streamconv/converters/nsHTTPCompressConv.h
@@ -56,16 +56,19 @@ typedef enum    {
 
 class BrotliWrapper
 {
 public:
   BrotliWrapper()
     : mTotalOut(0)
     , mStatus(NS_OK)
     , mBrotliStateIsStreamEnd(false)
+    , mRequest(nullptr)
+    , mContext(nullptr)
+    , mSourceOffset(0)
   {
     BrotliDecoderStateInit(&mState, 0, 0, 0);
   }
   ~BrotliWrapper()
   {
     BrotliDecoderStateCleanup(&mState);
   }
 
--- a/netwerk/streamconv/converters/nsIndexedToHTML.cpp
+++ b/netwerk/streamconv/converters/nsIndexedToHTML.cpp
@@ -49,16 +49,21 @@ static void AppendNonAsciiToNCR(const ns
     } else {
       out.AppendLiteral("&#x");
       out.AppendInt(*start++, 16);
       out.Append(';');
     }
   }
 }
 
+nsIndexedToHTML::nsIndexedToHTML()
+    : mExpectAbsLoc(false)
+{
+}
+
 nsresult
 nsIndexedToHTML::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) {
     nsresult rv;
     if (aOuter)
         return NS_ERROR_NO_AGGREGATION;
 
     nsIndexedToHTML* _s = new nsIndexedToHTML();
     if (_s == nullptr)
--- a/netwerk/streamconv/converters/nsIndexedToHTML.h
+++ b/netwerk/streamconv/converters/nsIndexedToHTML.h
@@ -22,17 +22,17 @@ class nsIndexedToHTML : public nsIStream
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSISTREAMCONVERTER
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSISTREAMLISTENER
     NS_DECL_NSIDIRINDEXLISTENER
 
-    nsIndexedToHTML() = default;
+    nsIndexedToHTML();
 
     nsresult Init(nsIStreamListener *aListener);
 
     static nsresult
     Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
 
 protected:
 
--- a/netwerk/streamconv/converters/nsMultiMixedConv.cpp
+++ b/netwerk/streamconv/converters/nsMultiMixedConv.cpp
@@ -22,16 +22,18 @@
 #include "nsHttpHeaderArray.h"
 #include "mozilla/AutoRestore.h"
 
 nsPartChannel::nsPartChannel(nsIChannel *aMultipartChannel, uint32_t aPartID,
                              nsIStreamListener* aListener) :
   mMultipartChannel(aMultipartChannel),
   mListener(aListener),
   mStatus(NS_OK),
+  mLoadFlags(0),
+  mContentDisposition(0),
   mContentLength(UINT64_MAX),
   mIsByteRangeRequest(false),
   mByteRangeStart(0),
   mByteRangeEnd(0),
   mPartID(aPartID),
   mIsLastPart(false)
 {
     // Inherit the load flags from the original channel...
@@ -808,16 +810,17 @@ nsMultiMixedConv::SwitchToControlParsing
     mTokenizer.EnableCustomToken(mBoundaryTokenWithDashes, false);
     mTokenizer.EnableCustomToken(mBoundaryToken, false);
 }
 
 // nsMultiMixedConv methods
 nsMultiMixedConv::nsMultiMixedConv() :
     mCurrentPartID(0),
     mInOnDataAvailable(false),
+    mResponseHeader(HEADER_UNKNOWN),
     // XXX: This is a hack to bypass the raw pointer to refcounted object in
     // lambda analysis. It should be removed and replaced when the
     // IncrementalTokenizer API is improved to avoid the need for such
     // workarounds.
     //
     // This is safe because `mTokenizer` will not outlive `this`, meaning that
     // this std::bind object will be destroyed before `this` dies.
     mTokenizer(std::bind(&nsMultiMixedConv::ConsumeToken, this, std::placeholders::_1))
--- a/netwerk/test/TestUDPSocket.cpp
+++ b/netwerk/test/TestUDPSocket.cpp
@@ -208,17 +208,18 @@ UDPServerListener::OnStopListening(nsIUD
  */
 class MulticastTimerCallback : public nsITimerCallback
 {
 protected:
   virtual ~MulticastTimerCallback();
 
 public:
   explicit MulticastTimerCallback(WaitForCondition* waiter)
-    : mWaiter(waiter)
+    : mResult(NS_ERROR_NOT_INITIALIZED)
+    , mWaiter(waiter)
   { }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSITIMERCALLBACK
 
   nsresult mResult;
   RefPtr<WaitForCondition> mWaiter;
 };