Backed out changeset 6e00f8bd2acc (bug 1714307) for causing hazard bustage. CLOSED TREE
authorCsoregi Natalia <ncsoregi@mozilla.com>
Wed, 09 Jun 2021 21:50:03 +0300
changeset 582498 f9a898a9f06620d243eb67cb952f89f162a39b0b
parent 582497 fde692ed0ff1025232dbbd7e46a4169846fc8180
child 582499 f4c6e39c5f6bd1eb76abce8d43468f32f342752d
push id38527
push userncsoregi@mozilla.com
push dateThu, 10 Jun 2021 03:46:06 +0000
treeherdermozilla-central@52f82029a1e5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1714307
milestone91.0a1
backs out6e00f8bd2acce363c60e022eedb43421382edd57
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
Backed out changeset 6e00f8bd2acc (bug 1714307) for causing hazard bustage. CLOSED TREE
netwerk/base/ArrayBufferInputStream.cpp
netwerk/base/ArrayBufferInputStream.h
netwerk/base/BackgroundFileSaver.cpp
netwerk/base/BackgroundFileSaver.h
netwerk/base/Dashboard.cpp
netwerk/base/LoadInfo.cpp
netwerk/base/PollableEvent.cpp
netwerk/base/PollableEvent.h
netwerk/base/Predictor.cpp
netwerk/base/Predictor.h
netwerk/base/ProxyAutoConfig.cpp
netwerk/base/ProxyAutoConfig.h
netwerk/base/RequestContextService.cpp
netwerk/base/RequestContextService.h
netwerk/base/SSLTokensCache.cpp
netwerk/base/SSLTokensCache.h
netwerk/base/SimpleBuffer.cpp
netwerk/base/SimpleBuffer.h
netwerk/base/TLSServerSocket.cpp
netwerk/base/TLSServerSocket.h
netwerk/base/ThrottleQueue.cpp
netwerk/base/ThrottleQueue.h
netwerk/base/nsASocketHandler.h
netwerk/base/nsAsyncRedirectVerifyHelper.cpp
netwerk/base/nsAsyncRedirectVerifyHelper.h
netwerk/base/nsAsyncStreamCopier.cpp
netwerk/base/nsAsyncStreamCopier.h
netwerk/base/nsBaseChannel.cpp
netwerk/base/nsBaseChannel.h
netwerk/base/nsBufferedStreams.cpp
netwerk/base/nsBufferedStreams.h
netwerk/base/nsDirectoryIndexStream.cpp
netwerk/base/nsDirectoryIndexStream.h
netwerk/base/nsDownloader.h
netwerk/base/nsFileStreams.cpp
netwerk/base/nsFileStreams.h
netwerk/base/nsIOService.cpp
netwerk/base/nsIOService.h
netwerk/base/nsIncrementalDownload.cpp
netwerk/base/nsInputStreamChannel.h
netwerk/base/nsInputStreamPump.cpp
netwerk/base/nsInputStreamPump.h
netwerk/base/nsLoadGroup.cpp
netwerk/base/nsLoadGroup.h
netwerk/base/nsMIMEInputStream.cpp
netwerk/base/nsProtocolProxyService.cpp
netwerk/base/nsProtocolProxyService.h
netwerk/base/nsProxyInfo.h
netwerk/base/nsServerSocket.cpp
netwerk/base/nsServerSocket.h
netwerk/base/nsSimpleURI.cpp
netwerk/base/nsSimpleURI.h
netwerk/base/nsSocketTransport2.cpp
netwerk/base/nsSocketTransport2.h
netwerk/base/nsSocketTransportService2.cpp
netwerk/base/nsSocketTransportService2.h
netwerk/base/nsStandardURL.cpp
netwerk/base/nsStandardURL.h
netwerk/base/nsStreamTransportService.cpp
netwerk/base/nsStreamTransportService.h
netwerk/base/nsSyncStreamListener.h
netwerk/base/nsUDPSocket.cpp
netwerk/base/nsUDPSocket.h
netwerk/cache/nsDeleteDir.cpp
netwerk/cache/nsDeleteDir.h
netwerk/cache2/CacheEntry.cpp
netwerk/cache2/CacheEntry.h
netwerk/cache2/CacheFile.cpp
netwerk/cache2/CacheFile.h
netwerk/cache2/CacheFileContextEvictor.cpp
netwerk/cache2/CacheFileContextEvictor.h
netwerk/cache2/CacheFileIOManager.cpp
netwerk/cache2/CacheFileIOManager.h
netwerk/cache2/CacheFileMetadata.cpp
netwerk/cache2/CacheFileMetadata.h
netwerk/cache2/CacheHashUtils.cpp
netwerk/cache2/CacheHashUtils.h
netwerk/cache2/CacheIOThread.cpp
netwerk/cache2/CacheIOThread.h
netwerk/cache2/CacheIndex.cpp
netwerk/cache2/CacheIndex.h
netwerk/cache2/CacheStorageService.h
netwerk/cookie/CookieStorage.cpp
netwerk/cookie/CookieStorage.h
netwerk/dns/TRR.cpp
netwerk/ipc/InputChannelThrottleQueueParent.cpp
netwerk/ipc/InputChannelThrottleQueueParent.h
netwerk/ipc/SocketProcessChild.cpp
netwerk/ipc/SocketProcessChild.h
netwerk/protocol/about/nsAboutCacheEntry.h
netwerk/protocol/gio/GIOChannelChild.cpp
netwerk/protocol/gio/GIOChannelChild.h
netwerk/protocol/http/AlternateServices.h
netwerk/protocol/http/ClassifierDummyChannelChild.cpp
netwerk/protocol/http/ClassifierDummyChannelChild.h
netwerk/protocol/http/ClassifierDummyChannelParent.cpp
netwerk/protocol/http/ClassifierDummyChannelParent.h
netwerk/protocol/http/Http2Compression.cpp
netwerk/protocol/http/Http2Compression.h
netwerk/protocol/http/Http2Push.cpp
netwerk/protocol/http/Http2Push.h
netwerk/protocol/http/Http3Session.cpp
netwerk/protocol/http/Http3Session.h
netwerk/protocol/http/Http3Stream.cpp
netwerk/protocol/http/Http3Stream.h
netwerk/protocol/http/HttpChannelChild.cpp
netwerk/protocol/http/HttpChannelChild.h
netwerk/protocol/http/HttpConnectionBase.cpp
netwerk/protocol/http/HttpConnectionBase.h
netwerk/protocol/http/HttpConnectionMgrParent.cpp
netwerk/protocol/http/HttpConnectionMgrParent.h
netwerk/protocol/http/HttpTransactionChild.cpp
netwerk/protocol/http/HttpTransactionChild.h
netwerk/protocol/http/HttpTransactionParent.cpp
netwerk/protocol/http/HttpTransactionParent.h
netwerk/protocol/http/NullHttpChannel.cpp
netwerk/protocol/http/NullHttpChannel.h
netwerk/protocol/http/SpeculativeTransaction.cpp
netwerk/protocol/http/TRRServiceChannel.cpp
netwerk/protocol/http/TRRServiceChannel.h
netwerk/protocol/http/nsCORSListenerProxy.cpp
netwerk/protocol/http/nsHttpActivityDistributor.cpp
netwerk/protocol/http/nsHttpActivityDistributor.h
netwerk/protocol/http/nsHttpAuthCache.cpp
netwerk/protocol/http/nsHttpAuthCache.h
netwerk/protocol/http/nsHttpAuthManager.cpp
netwerk/protocol/http/nsHttpAuthManager.h
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/protocol/http/nsHttpChannel.h
netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
netwerk/protocol/http/nsHttpChannelAuthProvider.h
netwerk/protocol/http/nsHttpChunkedDecoder.h
netwerk/protocol/http/nsHttpConnection.cpp
netwerk/protocol/http/nsHttpConnection.h
netwerk/protocol/http/nsHttpConnectionMgr.cpp
netwerk/protocol/http/nsHttpConnectionMgr.h
netwerk/protocol/http/nsHttpDigestAuth.cpp
netwerk/protocol/http/nsHttpDigestAuth.h
netwerk/protocol/http/nsHttpHandler.cpp
netwerk/protocol/http/nsHttpHandler.h
netwerk/protocol/http/nsHttpHeaderArray.cpp
netwerk/protocol/http/nsHttpHeaderArray.h
netwerk/protocol/http/nsHttpNTLMAuth.cpp
netwerk/protocol/http/nsHttpNTLMAuth.h
netwerk/protocol/http/nsHttpRequestHead.cpp
netwerk/protocol/http/nsHttpRequestHead.h
netwerk/protocol/http/nsHttpResponseHead.cpp
netwerk/protocol/http/nsHttpResponseHead.h
netwerk/protocol/http/nsHttpTransaction.cpp
netwerk/protocol/http/nsHttpTransaction.h
netwerk/protocol/res/ExtensionProtocolHandler.cpp
netwerk/protocol/res/ExtensionProtocolHandler.h
netwerk/protocol/viewsource/nsViewSourceChannel.h
netwerk/protocol/websocket/WebSocketFrame.cpp
netwerk/protocol/websocket/WebSocketFrame.h
netwerk/socket/nsSOCKSIOLayer.cpp
netwerk/streamconv/converters/nsDirIndex.cpp
netwerk/streamconv/converters/nsDirIndex.h
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/streamconv/converters/nsMultiMixedConv.h
netwerk/system/netlink/NetlinkService.cpp
netwerk/system/netlink/NetlinkService.h
netwerk/url-classifier/AsyncUrlChannelClassifier.cpp
netwerk/wifi/nsWifiScannerDBus.cpp
--- a/netwerk/base/ArrayBufferInputStream.cpp
+++ b/netwerk/base/ArrayBufferInputStream.cpp
@@ -12,16 +12,19 @@
 #include "mozilla/UniquePtrExtensions.h"
 #include "mozilla/dom/ScriptSettings.h"
 
 using mozilla::dom::RootingCx;
 
 NS_IMPL_ISUPPORTS(ArrayBufferInputStream, nsIArrayBufferInputStream,
                   nsIInputStream);
 
+ArrayBufferInputStream::ArrayBufferInputStream()
+    : mBufferLength(0), mPos(0), mClosed(false) {}
+
 NS_IMETHODIMP
 ArrayBufferInputStream::SetData(JS::Handle<JS::Value> aBuffer,
                                 uint64_t aByteOffset, uint64_t aLength) {
   NS_ASSERT_OWNINGTHREAD(ArrayBufferInputStream);
 
   if (!aBuffer.isObject()) {
     return NS_ERROR_FAILURE;
   }
--- a/netwerk/base/ArrayBufferInputStream.h
+++ b/netwerk/base/ArrayBufferInputStream.h
@@ -18,23 +18,23 @@
   { /* 3014dde6-aa1c-41db-87d0-48764a3710f6 */       \
     0x3014dde6, 0xaa1c, 0x41db, {                    \
       0x87, 0xd0, 0x48, 0x76, 0x4a, 0x37, 0x10, 0xf6 \
     }                                                \
   }
 
 class ArrayBufferInputStream : public nsIArrayBufferInputStream {
  public:
-  ArrayBufferInputStream() = default;
+  ArrayBufferInputStream();
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIARRAYBUFFERINPUTSTREAM
   NS_DECL_NSIINPUTSTREAM
 
  private:
   virtual ~ArrayBufferInputStream() = default;
   mozilla::UniquePtr<char[]> mArrayBuffer;
-  uint32_t mBufferLength{0};
-  uint32_t mPos{0};
-  bool mClosed{false};
+  uint32_t mBufferLength;
+  uint32_t mPos;
+  bool mClosed;
 };
 
 #endif  // ArrayBufferInputStream_h
--- a/netwerk/base/BackgroundFileSaver.cpp
+++ b/netwerk/base/BackgroundFileSaver.cpp
@@ -77,17 +77,37 @@ class NotifyTargetChangeRunnable final :
 };
 
 ////////////////////////////////////////////////////////////////////////////////
 //// BackgroundFileSaver
 
 uint32_t BackgroundFileSaver::sThreadCount = 0;
 uint32_t BackgroundFileSaver::sTelemetryMaxThreadCount = 0;
 
-BackgroundFileSaver::BackgroundFileSaver() {
+BackgroundFileSaver::BackgroundFileSaver()
+    : mControlEventTarget(nullptr),
+      mBackgroundET(nullptr),
+      mPipeOutputStream(nullptr),
+      mPipeInputStream(nullptr),
+      mObserver(nullptr),
+      mLock("BackgroundFileSaver.mLock"),
+      mWorkerThreadAttentionRequested(false),
+      mFinishRequested(false),
+      mComplete(false),
+      mStatus(NS_OK),
+      mAppend(false),
+      mInitialTarget(nullptr),
+      mInitialTargetKeepPartial(false),
+      mRenamedTarget(nullptr),
+      mRenamedTargetKeepPartial(false),
+      mAsyncCopyContext(nullptr),
+      mSha256Enabled(false),
+      mSignatureInfoEnabled(false),
+      mActualTarget(nullptr),
+      mActualTargetKeepPartial(false) {
   LOG(("Created BackgroundFileSaver [this = %p]", this));
 }
 
 BackgroundFileSaver::~BackgroundFileSaver() {
   LOG(("Destroying BackgroundFileSaver [this = %p]", this));
 }
 
 // Called on the control thread.
@@ -906,16 +926,23 @@ BackgroundFileSaverOutputStream::OnOutpu
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 //// BackgroundFileSaverStreamListener
 
 NS_IMPL_ISUPPORTS(BackgroundFileSaverStreamListener, nsIBackgroundFileSaver,
                   nsIRequestObserver, nsIStreamListener)
 
+BackgroundFileSaverStreamListener::BackgroundFileSaverStreamListener()
+    : BackgroundFileSaver(),
+      mSuspensionLock("BackgroundFileSaverStreamListener.mSuspensionLock"),
+      mReceivedTooMuchData(false),
+      mRequest(nullptr),
+      mRequestSuspended(false) {}
+
 bool BackgroundFileSaverStreamListener::HasInfiniteBuffer() { return true; }
 
 nsAsyncCopyProgressFun
 BackgroundFileSaverStreamListener::GetProgressCallback() {
   return AsyncCopyProgressCallback;
 }
 
 NS_IMETHODIMP
--- a/netwerk/base/BackgroundFileSaver.h
+++ b/netwerk/base/BackgroundFileSaver.h
@@ -112,61 +112,61 @@ class BackgroundFileSaver : public nsIBa
 
   //////////////////////////////////////////////////////////////////////////////
   //// Shared state between control and worker threads
 
   /**
    * Protects the shared state between control and worker threads.  This mutex
    * is always locked for a very short time, never during input/output.
    */
-  mozilla::Mutex mLock{"BackgroundFileSaver.mLock"};
+  mozilla::Mutex mLock;
 
   /**
    * True if the worker thread is already waiting to process a change in state.
    */
-  bool mWorkerThreadAttentionRequested{false};
+  bool mWorkerThreadAttentionRequested;
 
   /**
    * True if the operation should finish as soon as possibile.
    */
-  bool mFinishRequested{false};
+  bool mFinishRequested;
 
   /**
    * True if the operation completed, with either success or failure.
    */
-  bool mComplete{false};
+  bool mComplete;
 
   /**
    * Holds the current file saver status.  This is a success status while the
    * object is working correctly, and remains such if the operation completes
    * successfully.  This becomes an error status when an error occurs on the
    * worker thread, or when the operation is canceled.
    */
-  nsresult mStatus{NS_OK};
+  nsresult mStatus;
 
   /**
    * True if we should append data to the initial target file, instead of
    * overwriting it.
    */
-  bool mAppend{false};
+  bool mAppend;
 
   /**
    * This is set by the first SetTarget call on the control thread, and contains
    * the target file name that will be used by the worker thread, as soon as it
    * is possible to update mActualTarget and open the file.  This is null if no
    * target was ever assigned to this object.
    */
   nsCOMPtr<nsIFile> mInitialTarget;
 
   /**
    * This is set by the first SetTarget call on the control thread, and
    * indicates whether mInitialTarget should be kept as partially completed,
    * rather than deleted, if the operation fails or is canceled.
    */
-  bool mInitialTargetKeepPartial{false};
+  bool mInitialTargetKeepPartial;
 
   /**
    * This is set by subsequent SetTarget calls on the control thread, and
    * contains the new target file name to which the worker thread will move the
    * target file, as soon as it can be done.  This is null if SetTarget was
    * called only once, or no target was ever assigned to this object.
    *
    * The target file can be renamed multiple times, though only the most recent
@@ -174,17 +174,17 @@ class BackgroundFileSaver : public nsIBa
    */
   nsCOMPtr<nsIFile> mRenamedTarget;
 
   /**
    * This is set by subsequent SetTarget calls on the control thread, and
    * indicates whether mRenamedTarget should be kept as partially completed,
    * rather than deleted, if the operation fails or is canceled.
    */
-  bool mRenamedTargetKeepPartial{false};
+  bool mRenamedTargetKeepPartial;
 
   /**
    * While NS_AsyncCopy is in progress, allows canceling it.  Null otherwise.
    * This is read by both threads but only written by the worker thread.
    */
   nsCOMPtr<nsISupports> mAsyncCopyContext;
 
   /**
@@ -192,42 +192,42 @@ class BackgroundFileSaver : public nsIBa
    * by the worker thread but can be read on the main thread.
    */
   nsCString mSha256;
 
   /**
    * Whether or not to compute the hash. Must be set on the main thread before
    * setTarget is called.
    */
-  bool mSha256Enabled{false};
+  bool mSha256Enabled;
 
   /**
    * Store the signature info.
    */
   nsTArray<nsTArray<nsTArray<uint8_t>>> mSignatureInfo;
 
   /**
    * Whether or not to extract the signature. Must be set on the main thread
    * before setTarget is called.
    */
-  bool mSignatureInfoEnabled{false};
+  bool mSignatureInfoEnabled;
 
   //////////////////////////////////////////////////////////////////////////////
   //// State handled exclusively by the worker thread
 
   /**
    * Current target file associated to the input and output streams.
    */
   nsCOMPtr<nsIFile> mActualTarget;
 
   /**
    * Indicates whether mActualTarget should be kept as partially completed,
    * rather than deleted, if the operation fails or is canceled.
    */
-  bool mActualTargetKeepPartial{false};
+  bool mActualTargetKeepPartial;
 
   /**
    * Used to calculate the file hash. This keeps state across file renames and
    * is lazily initialized in ProcessStateChange.
    */
   Maybe<Digest> mDigest;
 
   //////////////////////////////////////////////////////////////////////////////
@@ -322,46 +322,45 @@ class BackgroundFileSaverOutputStream : 
 
 class BackgroundFileSaverStreamListener final : public BackgroundFileSaver,
                                                 public nsIStreamListener {
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
 
-  BackgroundFileSaverStreamListener() = default;
+  BackgroundFileSaverStreamListener();
 
  protected:
   virtual bool HasInfiniteBuffer() override;
   virtual nsAsyncCopyProgressFun GetProgressCallback() override;
 
  private:
   ~BackgroundFileSaverStreamListener() = default;
 
   /**
    * Protects the state related to whether the request should be suspended.
    */
-  mozilla::Mutex mSuspensionLock{
-      "BackgroundFileSaverStreamListener.mSuspensionLock"};
+  mozilla::Mutex mSuspensionLock;
 
   /**
    * Whether we should suspend the request because we received too much data.
    */
-  bool mReceivedTooMuchData{false};
+  bool mReceivedTooMuchData;
 
   /**
    * Request for which we received too much data.  This is populated when
    * mReceivedTooMuchData becomes true for the first time.
    */
   nsCOMPtr<nsIRequest> mRequest;
 
   /**
    * Whether mRequest is currently suspended.
    */
-  bool mRequestSuspended{false};
+  bool mRequestSuspended;
 
   /**
    * Called while NS_AsyncCopy is copying data.
    */
   static void AsyncCopyProgressCallback(void* aClosure, uint32_t aCount);
 
   /**
    * Called on the control thread to suspend or resume the request.
--- a/netwerk/base/Dashboard.cpp
+++ b/netwerk/base/Dashboard.cpp
@@ -33,72 +33,76 @@ using mozilla::dom::ToJSValue;
 
 namespace mozilla {
 namespace net {
 
 class SocketData : public nsISupports {
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
-  SocketData() = default;
+  SocketData() {
+    mTotalSent = 0;
+    mTotalRecv = 0;
+    mEventTarget = nullptr;
+  }
 
-  uint64_t mTotalSent{0};
-  uint64_t mTotalRecv{0};
+  uint64_t mTotalSent;
+  uint64_t mTotalRecv;
   nsTArray<SocketInfo> mData;
   nsMainThreadPtrHandle<nsINetDashboardCallback> mCallback;
-  nsIEventTarget* mEventTarget{nullptr};
+  nsIEventTarget* mEventTarget;
 
  private:
   virtual ~SocketData() = default;
 };
 
 static void GetErrorString(nsresult rv, nsAString& errorString);
 
 NS_IMPL_ISUPPORTS0(SocketData)
 
 class HttpData : public nsISupports {
   virtual ~HttpData() = default;
 
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
-  HttpData() = default;
+  HttpData() { mEventTarget = nullptr; }
 
   nsTArray<HttpRetParams> mData;
   nsMainThreadPtrHandle<nsINetDashboardCallback> mCallback;
-  nsIEventTarget* mEventTarget{nullptr};
+  nsIEventTarget* mEventTarget;
 };
 
 NS_IMPL_ISUPPORTS0(HttpData)
 
 class WebSocketRequest : public nsISupports {
   virtual ~WebSocketRequest() = default;
 
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
-  WebSocketRequest() = default;
+  WebSocketRequest() { mEventTarget = nullptr; }
 
   nsMainThreadPtrHandle<nsINetDashboardCallback> mCallback;
-  nsIEventTarget* mEventTarget{nullptr};
+  nsIEventTarget* mEventTarget;
 };
 
 NS_IMPL_ISUPPORTS0(WebSocketRequest)
 
 class DnsData : public nsISupports {
   virtual ~DnsData() = default;
 
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
-  DnsData() = default;
+  DnsData() { mEventTarget = nullptr; }
 
   nsTArray<DNSCacheEntries> mData;
   nsMainThreadPtrHandle<nsINetDashboardCallback> mCallback;
-  nsIEventTarget* mEventTarget{nullptr};
+  nsIEventTarget* mEventTarget;
 };
 
 NS_IMPL_ISUPPORTS0(DnsData)
 
 class ConnectionData : public nsITransportEventSink,
                        public nsITimerCallback,
                        public nsINamed {
   virtual ~ConnectionData() {
@@ -115,46 +119,49 @@ class ConnectionData : public nsITranspo
   NS_IMETHOD GetName(nsACString& aName) override {
     aName.AssignLiteral("net::ConnectionData");
     return NS_OK;
   }
 
   void StartTimer(uint32_t aTimeout);
   void StopTimer();
 
-  explicit ConnectionData(Dashboard* target) { mDashboard = target; }
+  explicit ConnectionData(Dashboard* target) : mPort(0), mTimeout(0) {
+    mEventTarget = nullptr;
+    mDashboard = target;
+  }
 
   nsCOMPtr<nsISocketTransport> mSocket;
   nsCOMPtr<nsIInputStream> mStreamIn;
   nsCOMPtr<nsITimer> mTimer;
   nsMainThreadPtrHandle<nsINetDashboardCallback> mCallback;
-  nsIEventTarget* mEventTarget{nullptr};
+  nsIEventTarget* mEventTarget;
   Dashboard* mDashboard;
 
   nsCString mHost;
-  uint32_t mPort{0};
+  uint32_t mPort;
   nsCString mProtocol;
-  uint32_t mTimeout{0};
+  uint32_t mTimeout;
 
   nsString mStatus;
 };
 
 NS_IMPL_ISUPPORTS(ConnectionData, nsITransportEventSink, nsITimerCallback,
                   nsINamed)
 
 class RcwnData : public nsISupports {
   virtual ~RcwnData() = default;
 
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
-  RcwnData() = default;
+  RcwnData() { mEventTarget = nullptr; }
 
   nsMainThreadPtrHandle<nsINetDashboardCallback> mCallback;
-  nsIEventTarget* mEventTarget{nullptr};
+  nsIEventTarget* mEventTarget;
 };
 
 NS_IMPL_ISUPPORTS0(RcwnData)
 
 NS_IMETHODIMP
 ConnectionData::OnTransportStatus(nsITransport* aTransport, nsresult aStatus,
                                   int64_t aProgress, int64_t aProgressMax) {
   if (aStatus == NS_NET_STATUS_CONNECTED_TO) {
@@ -231,26 +238,26 @@ class LookupHelper final : public nsIDNS
       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);
   nsresult ConstructHTTPSRRAnswer(LookupArgument* aArgument);
 
  public:
   nsCOMPtr<nsICancelable> mCancel;
   nsMainThreadPtrHandle<nsINetDashboardCallback> mCallback;
-  nsIEventTarget* mEventTarget{nullptr};
-  nsresult mStatus{NS_ERROR_NOT_INITIALIZED};
+  nsIEventTarget* mEventTarget;
+  nsresult mStatus;
 };
 
 NS_IMPL_ISUPPORTS(LookupHelper, nsIDNSListener)
 
 NS_IMETHODIMP
 LookupHelper::OnLookupComplete(nsICancelable* aRequest, nsIDNSRecord* aRecord,
                                nsresult aStatus) {
   MOZ_ASSERT(aRequest == mCancel);
--- a/netwerk/base/LoadInfo.cpp
+++ b/netwerk/base/LoadInfo.cpp
@@ -99,17 +99,17 @@ LoadInfo::LoadInfo(
                                         : aLoadingPrincipal),
       mTriggeringPrincipal(aTriggeringPrincipal ? aTriggeringPrincipal
                                                 : mLoadingPrincipal.get()),
       mClientInfo(aLoadingClientInfo),
       mController(aController),
       mLoadingContext(do_GetWeakReference(aLoadingContext)),
       mSecurityFlags(aSecurityFlags),
       mSandboxFlags(aSandboxFlags),
-
+      mTriggeringSandboxFlags(0),
       mInternalContentPolicyType(aContentPolicyType) {
   MOZ_ASSERT(mLoadingPrincipal);
   MOZ_ASSERT(mTriggeringPrincipal);
 
 #ifdef DEBUG
   // TYPE_DOCUMENT loads initiated by javascript tests will go through
   // nsIOService and use the wrong constructor.  Don't enforce the
   // !TYPE_DOCUMENT check in those cases
@@ -315,17 +315,17 @@ LoadInfo::LoadInfo(
 LoadInfo::LoadInfo(nsPIDOMWindowOuter* aOuterWindow,
                    nsIPrincipal* aTriggeringPrincipal,
                    nsISupports* aContextForTopLevelLoad,
                    nsSecurityFlags aSecurityFlags, uint32_t aSandboxFlags)
     : mTriggeringPrincipal(aTriggeringPrincipal),
       mContextForTopLevelLoad(do_GetWeakReference(aContextForTopLevelLoad)),
       mSecurityFlags(aSecurityFlags),
       mSandboxFlags(aSandboxFlags),
-
+      mTriggeringSandboxFlags(0),
       mInternalContentPolicyType(nsIContentPolicy::TYPE_DOCUMENT) {
   // Top-level loads are never third-party
   // Grab the information we can out of the window.
   MOZ_ASSERT(aOuterWindow);
   MOZ_ASSERT(mTriggeringPrincipal);
 
   // if the load is sandboxed, we can not also inherit the principal
   if (mSandboxFlags & SANDBOXED_ORIGIN) {
@@ -374,17 +374,17 @@ LoadInfo::LoadInfo(nsPIDOMWindowOuter* a
 
 LoadInfo::LoadInfo(dom::CanonicalBrowsingContext* aBrowsingContext,
                    nsIPrincipal* aTriggeringPrincipal,
                    const OriginAttributes& aOriginAttributes,
                    nsSecurityFlags aSecurityFlags, uint32_t aSandboxFlags)
     : mTriggeringPrincipal(aTriggeringPrincipal),
       mSecurityFlags(aSecurityFlags),
       mSandboxFlags(aSandboxFlags),
-
+      mTriggeringSandboxFlags(0),
       mInternalContentPolicyType(nsIContentPolicy::TYPE_DOCUMENT) {
   // Top-level loads are never third-party
   // Grab the information we can out of the window.
   MOZ_ASSERT(aBrowsingContext);
   MOZ_ASSERT(mTriggeringPrincipal);
   MOZ_ASSERT(aSecurityFlags !=
              nsILoadInfo::SEC_ONLY_FOR_EXPLICIT_CONTENTSEC_CHECK);
 
@@ -570,17 +570,19 @@ LoadInfo::LoadInfo(const LoadInfo& rhs)
       mRedirectChain(rhs.mRedirectChain.Clone()),
       mAncestorPrincipals(rhs.mAncestorPrincipals.Clone()),
       mAncestorBrowsingContextIDs(rhs.mAncestorBrowsingContextIDs.Clone()),
       mCorsUnsafeHeaders(rhs.mCorsUnsafeHeaders.Clone()),
       mRequestBlockingReason(rhs.mRequestBlockingReason),
       mForcePreflight(rhs.mForcePreflight),
       mIsPreflight(rhs.mIsPreflight),
       mLoadTriggeredFromExternal(rhs.mLoadTriggeredFromExternal),
-
+      // mServiceWorkerTaintingSynthesized must be handled specially during
+      // redirect
+      mServiceWorkerTaintingSynthesized(false),
       mDocumentHasUserInteracted(rhs.mDocumentHasUserInteracted),
       mAllowListFutureDocumentsCreatedFromThisRedirectChain(
           rhs.mAllowListFutureDocumentsCreatedFromThisRedirectChain),
       mNeedForCheckingAntiTrackingHeuristic(
           rhs.mNeedForCheckingAntiTrackingHeuristic),
       mCspNonce(rhs.mCspNonce),
       mSkipContentSniffing(rhs.mSkipContentSniffing),
       mHttpsOnlyStatus(rhs.mHttpsOnlyStatus),
@@ -695,17 +697,19 @@ LoadInfo::LoadInfo(
       mSkipContentSniffing(aSkipContentSniffing),
       mHttpsOnlyStatus(aHttpsOnlyStatus),
       mHasValidUserGestureActivation(aHasValidUserGestureActivation),
       mAllowDeprecatedSystemRequests(aAllowDeprecatedSystemRequests),
       mIsInDevToolsContext(aIsInDevToolsContext),
       mParserCreatedScript(aParserCreatedScript),
       mHasStoragePermission(aHasStoragePermission),
       mIsMetaRefresh(aIsMetaRefresh),
-
+      mIsFromProcessingFrameAttributes(false),
+      mIsMediaRequest(false),
+      mIsMediaInitialRequest(false),
       mLoadingEmbedderPolicy(aLoadingEmbedderPolicy),
       mUnstrippedURI(aUnstrippedURI) {
   // Only top level TYPE_DOCUMENT loads can have a null loadingPrincipal
   MOZ_ASSERT(mLoadingPrincipal ||
              aContentPolicyType == nsIContentPolicy::TYPE_DOCUMENT);
   MOZ_ASSERT(mTriggeringPrincipal);
 }
 
--- a/netwerk/base/PollableEvent.cpp
+++ b/netwerk/base/PollableEvent.cpp
@@ -133,18 +133,21 @@ failed:
     PR_Close(writer);
   }
   return false;
 }
 
 #endif
 
 PollableEvent::PollableEvent()
-
-{
+    : mWriteFD(nullptr),
+      mReadFD(nullptr),
+      mSignaled(false),
+      mWriteFailed(false),
+      mSignalTimestampAdjusted(false) {
   MOZ_COUNT_CTOR(PollableEvent);
   MOZ_ASSERT(OnSocketThread(), "not on socket thread");
   // create pair of prfiledesc that can be used as a poll()ble
   // signal. on windows use a localhost socket pair, and on
   // unix use a pipe.
 #ifdef USEPIPE
   SOCKET_LOG(("PollableEvent() using pipe\n"));
   if (PR_CreatePipe(&mReadFD, &mWriteFD) == PR_SUCCESS) {
--- a/netwerk/base/PollableEvent.h
+++ b/netwerk/base/PollableEvent.h
@@ -41,26 +41,26 @@ class PollableEvent {
   // - PR_Write has failed
   // - no out_flags were signalled on the socket pair for too long after
   //   the earliest Signal()
   bool IsSignallingAlive(TimeDuration const& timeout);
 
   PRFileDesc* PollableFD() { return mReadFD; }
 
  private:
-  PRFileDesc* mWriteFD{nullptr};
-  PRFileDesc* mReadFD{nullptr};
-  bool mSignaled{false};
+  PRFileDesc* mWriteFD;
+  PRFileDesc* mReadFD;
+  bool mSignaled;
   // true when PR_Write to the socket pair has failed (status < 1)
-  bool mWriteFailed{false};
+  bool mWriteFailed;
   // Set true after AdjustFirstSignalTimestamp() was called
   // Set false after Clear() was called
   // Ensures shifting the timestamp before entering poll() only once
   // between Clear()'ings.
-  bool mSignalTimestampAdjusted{false};
+  bool mSignalTimestampAdjusted;
   // Timestamp of the first call to Signal() (or time we enter poll())
   // that happened after the last Clear() call
   TimeStamp mFirstSignalAfterClear;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
--- a/netwerk/base/Predictor.cpp
+++ b/netwerk/base/Predictor.cpp
@@ -224,18 +224,20 @@ Predictor::Action::OnCacheEntryAvailable
   return NS_OK;
 }
 
 NS_IMPL_ISUPPORTS(Predictor, nsINetworkPredictor, nsIObserver,
                   nsISpeculativeConnectionOverrider, nsIInterfaceRequestor,
                   nsICacheEntryMetaDataVisitor, nsINetworkPredictorVerifier)
 
 Predictor::Predictor()
-
-{
+    : mInitialized(false),
+      mStartupTime(0),
+      mLastStartupTime(0),
+      mStartupCount(1) {
   MOZ_ASSERT(!sSelf, "multiple Predictor instances!");
   sSelf = this;
 }
 
 Predictor::~Predictor() {
   if (mInitialized) Shutdown();
 
   sSelf = nullptr;
--- a/netwerk/base/Predictor.h
+++ b/netwerk/base/Predictor.h
@@ -422,29 +422,29 @@ class Predictor final : public nsINetwor
                                   const OriginAttributes& originAttributes,
                                   bool isTracking, bool couldVary,
                                   bool isNoStore);
 
   // Gets the pref value and clamps it within the acceptable range.
   uint32_t ClampedPrefetchRollingLoadCount();
 
   // Our state
-  bool mInitialized{false};
+  bool mInitialized;
 
   nsTArray<nsCString> mKeysToOperateOn;
   nsTArray<nsCString> mValuesToOperateOn;
 
   nsCOMPtr<nsICacheStorageService> mCacheStorageService;
 
   nsCOMPtr<nsISpeculativeConnect> mSpeculativeService;
 
   nsCOMPtr<nsIURI> mStartupURI;
-  uint32_t mStartupTime{0};
-  uint32_t mLastStartupTime{0};
-  int32_t mStartupCount{1};
+  uint32_t mStartupTime;
+  uint32_t mLastStartupTime;
+  int32_t mStartupCount;
 
   nsCOMPtr<nsIDNSService> mDnsService;
 
   RefPtr<DNSListener> mDNSListener;
 
   nsTArray<nsCOMPtr<nsIURI>> mPrefetches;
   nsTArray<nsCOMPtr<nsIURI>> mPreconnects;
   nsTArray<nsCOMPtr<nsIURI>> mPreresolves;
--- a/netwerk/base/ProxyAutoConfig.cpp
+++ b/netwerk/base/ProxyAutoConfig.cpp
@@ -425,18 +425,21 @@ static bool PACResolve(const nsCString& 
     NS_WARNING("PACResolve without a running ProxyAutoConfig object");
     return false;
   }
 
   return GetRunning()->ResolveAddress(aHostName, aNetAddr, aTimeout);
 }
 
 ProxyAutoConfig::ProxyAutoConfig()
-
-{
+    : mJSContext(nullptr),
+      mJSNeedsSetup(false),
+      mShutdown(true),
+      mIncludePath(false),
+      mExtraHeapSize(0) {
   MOZ_COUNT_CTOR(ProxyAutoConfig);
 }
 
 bool ProxyAutoConfig::ResolveAddress(const nsCString& aHostName,
                                      NetAddr* aNetAddr, unsigned int aTimeout) {
   nsCOMPtr<nsIDNSService> dns = do_GetService(NS_DNSSERVICE_CONTRACTID);
   if (!dns) return false;
 
--- a/netwerk/base/ProxyAutoConfig.h
+++ b/netwerk/base/ProxyAutoConfig.h
@@ -84,23 +84,23 @@ class ProxyAutoConfig {
 
   // used to compile the PAC file and setup the execution context
   nsresult SetupJS();
 
   bool SrcAddress(const NetAddr* remoteAddress, nsCString& localAddress);
   bool MyIPAddressTryHost(const nsCString& hostName, unsigned int timeout,
                           const JS::CallArgs& aArgs, bool* aResult);
 
-  JSContextWrapper* mJSContext{nullptr};
-  bool mJSNeedsSetup{false};
-  bool mShutdown{true};
+  JSContextWrapper* mJSContext;
+  bool mJSNeedsSetup;
+  bool mShutdown;
   nsCString mConcatenatedPACData;
   nsCString mPACURI;
-  bool mIncludePath{false};
-  uint32_t mExtraHeapSize{0};
+  bool mIncludePath;
+  uint32_t mExtraHeapSize;
   nsCString mRunningHost;
   nsCOMPtr<nsITimer> mTimer;
   nsCOMPtr<nsIEventTarget> mMainThreadEventTarget;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
--- a/netwerk/base/RequestContextService.cpp
+++ b/netwerk/base/RequestContextService.cpp
@@ -418,17 +418,18 @@ RequestContext::CancelTailPendingRequest
   return NS_OK;
 }
 
 // nsIRequestContextService
 RequestContextService* RequestContextService::sSelf = nullptr;
 
 NS_IMPL_ISUPPORTS(RequestContextService, nsIRequestContextService, nsIObserver)
 
-RequestContextService::RequestContextService() {
+RequestContextService::RequestContextService()
+    : 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/RequestContextService.h
+++ b/netwerk/base/RequestContextService.h
@@ -29,16 +29,16 @@ class RequestContextService final : publ
   virtual ~RequestContextService();
 
   nsresult Init();
   void Shutdown();
 
   static RequestContextService* sSelf;
 
   nsInterfaceHashtable<nsUint64HashKey, nsIRequestContext> mTable;
-  uint32_t mRCIDNamespace{0};
-  uint32_t mNextRCID{1};
+  uint32_t mRCIDNamespace;
+  uint32_t mNextRCID;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // mozilla__net__RequestContextService_h
--- a/netwerk/base/SSLTokensCache.cpp
+++ b/netwerk/base/SSLTokensCache.cpp
@@ -105,17 +105,19 @@ nsresult SSLTokensCache::Shutdown() {
 
   UnregisterWeakMemoryReporter(gInstance);
 
   gInstance = nullptr;
 
   return NS_OK;
 }
 
-SSLTokensCache::SSLTokensCache() { LOG(("SSLTokensCache::SSLTokensCache")); }
+SSLTokensCache::SSLTokensCache() : mCacheSize(0) {
+  LOG(("SSLTokensCache::SSLTokensCache"));
+}
 
 SSLTokensCache::~SSLTokensCache() { LOG(("SSLTokensCache::~SSLTokensCache")); }
 
 // static
 nsresult SSLTokensCache::Put(const nsACString& aKey, const uint8_t* aToken,
                              uint32_t aTokenLen,
                              nsITransportSecurityInfo* aSecInfo) {
   PRUint32 expirationTime;
--- a/netwerk/base/SSLTokensCache.h
+++ b/netwerk/base/SSLTokensCache.h
@@ -60,17 +60,17 @@ class SSLTokensCache : public nsIMemoryR
   void EvictIfNecessary();
   void LogStats();
 
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
 
   static mozilla::StaticRefPtr<SSLTokensCache> gInstance;
   static StaticMutex sLock;
 
-  uint32_t mCacheSize{0};  // Actual cache size in bytes
+  uint32_t mCacheSize;  // Actual cache size in bytes
 
   class TokenCacheRecord {
    public:
     uint32_t Size() const;
     void Reset();
 
     nsCString mKey;
     PRUint32 mExpirationTime = 0;
--- a/netwerk/base/SimpleBuffer.cpp
+++ b/netwerk/base/SimpleBuffer.cpp
@@ -5,16 +5,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "SimpleBuffer.h"
 #include <algorithm>
 
 namespace mozilla {
 namespace net {
 
+SimpleBuffer::SimpleBuffer() : mStatus(NS_OK), mAvailable(0) {}
+
 nsresult SimpleBuffer::Write(char* src, size_t len) {
   NS_ASSERT_OWNINGTHREAD(SimpleBuffer);
   if (NS_FAILED(mStatus)) {
     return mStatus;
   }
 
   while (len > 0) {
     SimpleBufferPage* p = mBufferList.getLast();
--- a/netwerk/base/SimpleBuffer.h
+++ b/netwerk/base/SimpleBuffer.h
@@ -16,40 +16,40 @@
 #include "prtypes.h"
 #include "mozilla/LinkedList.h"
 
 namespace mozilla {
 namespace net {
 
 class SimpleBufferPage : public LinkedListElement<SimpleBufferPage> {
  public:
-  SimpleBufferPage() = default;
+  SimpleBufferPage() : mReadOffset(0), mWriteOffset(0) {}
   static const size_t kSimpleBufferPageSize = 32000;
 
  private:
   friend class SimpleBuffer;
   char mBuffer[kSimpleBufferPageSize]{0};
-  size_t mReadOffset{0};
-  size_t mWriteOffset{0};
+  size_t mReadOffset;
+  size_t mWriteOffset;
 };
 
 class SimpleBuffer {
  public:
-  SimpleBuffer() = default;
+  SimpleBuffer();
   ~SimpleBuffer() = default;
 
   nsresult Write(char* src, size_t len);   // return OK or OUT_OF_MEMORY
   size_t Read(char* dest, size_t maxLen);  // return bytes read
   size_t Available();
   void Clear();
 
  private:
   NS_DECL_OWNINGTHREAD
 
-  nsresult mStatus{NS_OK};
+  nsresult mStatus;
   AutoCleanLinkedList<SimpleBufferPage> mBufferList;
-  size_t mAvailable{0};
+  size_t mAvailable;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif
--- a/netwerk/base/TLSServerSocket.cpp
+++ b/netwerk/base/TLSServerSocket.cpp
@@ -21,16 +21,18 @@
 
 namespace mozilla {
 namespace net {
 
 //-----------------------------------------------------------------------------
 // TLSServerSocket
 //-----------------------------------------------------------------------------
 
+TLSServerSocket::TLSServerSocket() : mServerCert(nullptr) {}
+
 NS_IMPL_ISUPPORTS_INHERITED(TLSServerSocket, nsServerSocket, nsITLSServerSocket)
 
 nsresult TLSServerSocket::SetSocketDefaults() {
   // Set TLS options on the listening socket
   mFD = SSL_ImportFD(nullptr, mFD);
   if (NS_WARN_IF(!mFD)) {
     return mozilla::psm::GetXPCOMFromNSSError(PR_GetError());
   }
@@ -260,16 +262,26 @@ TLSServerSecurityObserverProxy::OnHandsh
   return NS_OK;
 }
 
 }  // namespace
 
 NS_IMPL_ISUPPORTS(TLSServerConnectionInfo, nsITLSServerConnectionInfo,
                   nsITLSClientStatus)
 
+TLSServerConnectionInfo::TLSServerConnectionInfo()
+    : mServerSocket(nullptr),
+      mTransport(nullptr),
+      mPeerCert(nullptr),
+      mTlsVersionUsed(TLS_VERSION_UNKNOWN),
+      mKeyLength(0),
+      mMacLength(0),
+      mLock("TLSServerConnectionInfo.mLock"),
+      mSecurityObserver(nullptr) {}
+
 TLSServerConnectionInfo::~TLSServerConnectionInfo() {
   RefPtr<nsITLSServerSecurityObserver> observer;
   {
     MutexAutoLock lock(mLock);
     observer = ToRefPtr(std::move(mSecurityObserver));
   }
 
   if (observer) {
--- a/netwerk/base/TLSServerSocket.h
+++ b/netwerk/base/TLSServerSocket.h
@@ -22,17 +22,17 @@ class TLSServerSocket final : public nsS
   NS_DECL_NSITLSSERVERSOCKET
 
   // Override methods from nsServerSocket
   virtual void CreateClientTransport(PRFileDesc* clientFD,
                                      const NetAddr& clientAddr) override;
   virtual nsresult SetSocketDefaults() override;
   virtual nsresult OnSocketListen() override;
 
-  TLSServerSocket() = default;
+  TLSServerSocket();
 
  private:
   virtual ~TLSServerSocket() = default;
 
   static SECStatus AuthCertificateHook(void* arg, PRFileDesc* fd,
                                        PRBool checksig, PRBool isServer);
 
   nsCOMPtr<nsIX509Cert> mServerCert;
@@ -42,36 +42,36 @@ class TLSServerConnectionInfo : public n
                                 public nsITLSClientStatus {
   friend class TLSServerSocket;
 
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSITLSSERVERCONNECTIONINFO
   NS_DECL_NSITLSCLIENTSTATUS
 
-  TLSServerConnectionInfo() = default;
+  TLSServerConnectionInfo();
 
  private:
   virtual ~TLSServerConnectionInfo();
 
   static void HandshakeCallback(PRFileDesc* aFD, void* aArg);
   nsresult HandshakeCallback(PRFileDesc* aFD);
 
   RefPtr<TLSServerSocket> mServerSocket;
   // Weak ref to the transport, to avoid cycles since the transport holds a
   // reference to the TLSServerConnectionInfo object.  This is not handed out to
   // anyone, and is only used in HandshakeCallback to close the transport in
   // case of an error.  After this, it's set to nullptr.
-  nsISocketTransport* mTransport{nullptr};
+  nsISocketTransport* mTransport;
   nsCOMPtr<nsIX509Cert> mPeerCert;
-  int16_t mTlsVersionUsed{TLS_VERSION_UNKNOWN};
+  int16_t mTlsVersionUsed;
   nsCString mCipherName;
-  uint32_t mKeyLength{0};
-  uint32_t mMacLength{0};
+  uint32_t mKeyLength;
+  uint32_t mMacLength;
   // lock protects access to mSecurityObserver
-  mozilla::Mutex mLock{"TLSServerConnectionInfo.mLock"};
+  mozilla::Mutex mLock;
   nsCOMPtr<nsITLSServerSecurityObserver> mSecurityObserver;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // mozilla_net_TLSServerSocket_h
--- a/netwerk/base/ThrottleQueue.cpp
+++ b/netwerk/base/ThrottleQueue.cpp
@@ -229,18 +229,20 @@ already_AddRefed<nsIInputChannelThrottle
 
   return tq.forget();
 }
 
 NS_IMPL_ISUPPORTS(ThrottleQueue, nsIInputChannelThrottleQueue, nsITimerCallback,
                   nsINamed)
 
 ThrottleQueue::ThrottleQueue()
-
-{
+    : mMeanBytesPerSecond(0),
+      mMaxBytesPerSecond(0),
+      mBytesProcessed(0),
+      mTimerArmed(false) {
   nsresult rv;
   nsCOMPtr<nsIEventTarget> sts;
   nsCOMPtr<nsIIOService> ioService = do_GetIOService(&rv);
   if (NS_SUCCEEDED(rv)) {
     sts = do_GetService(NS_SOCKETTRANSPORTSERVICE_CONTRACTID, &rv);
   }
   if (NS_SUCCEEDED(rv)) mTimer = NS_NewTimer(sts);
 }
--- a/netwerk/base/ThrottleQueue.h
+++ b/netwerk/base/ThrottleQueue.h
@@ -45,21 +45,21 @@ class ThrottleQueue : public nsIInputCha
   virtual ~ThrottleQueue();
 
   struct ThrottleEntry {
     TimeStamp mTime;
     uint32_t mBytesRead = 0;
   };
 
   nsTArray<ThrottleEntry> mReadEvents;
-  uint32_t mMeanBytesPerSecond{0};
-  uint32_t mMaxBytesPerSecond{0};
-  uint64_t mBytesProcessed{0};
+  uint32_t mMeanBytesPerSecond;
+  uint32_t mMaxBytesPerSecond;
+  uint64_t mBytesProcessed;
 
   nsTArray<RefPtr<ThrottleInputStream>> mAsyncEvents;
   nsCOMPtr<nsITimer> mTimer;
-  bool mTimerArmed{false};
+  bool mTimerArmed;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  //  mozilla_net_ThrottleQueue_h
--- a/netwerk/base/nsASocketHandler.h
+++ b/netwerk/base/nsASocketHandler.h
@@ -9,44 +9,48 @@
 #include "nsISupports.h"
 #include "prio.h"
 
 // socket handler used by nsISocketTransportService.
 // methods are only called on the socket thread.
 
 class nsASocketHandler : public nsISupports {
  public:
-  nsASocketHandler() = default;
+  nsASocketHandler()
+      : mCondition(NS_OK),
+        mPollFlags(0),
+        mPollTimeout(UINT16_MAX),
+        mIsPrivate(false) {}
 
   //
   // this condition variable will be checked to determine if the socket
   // handler should be detached.  it must only be accessed on the socket
   // thread.
   //
-  nsresult mCondition{NS_OK};
+  nsresult mCondition;
 
   //
   // these flags can only be modified on the socket transport thread.
   // the socket transport service will check these flags before calling
   // PR_Poll.
   //
-  uint16_t mPollFlags{0};
+  uint16_t mPollFlags;
 
   //
   // this value specifies the maximum amount of time in seconds that may be
   // spent waiting for activity on this socket.  if this timeout is reached,
   // then OnSocketReady will be called with outFlags = -1.
   //
   // the default value for this member is UINT16_MAX, which disables the
   // timeout error checking.  (i.e., a timeout value of UINT16_MAX is
   // never reached.)
   //
-  uint16_t mPollTimeout{UINT16_MAX};
+  uint16_t mPollTimeout;
 
-  bool mIsPrivate{false};
+  bool mIsPrivate;
 
   //
   // called to service a socket
   //
   // params:
   //   socketRef - socket identifier
   //   fd        - socket file descriptor
   //   outFlags  - value of PR_PollDesc::out_flags after PR_Poll returns
--- a/netwerk/base/nsAsyncRedirectVerifyHelper.cpp
+++ b/netwerk/base/nsAsyncRedirectVerifyHelper.cpp
@@ -42,16 +42,23 @@ class nsAsyncVerifyRedirectCallbackEvent
     return NS_OK;
   }
 
  private:
   nsCOMPtr<nsIAsyncVerifyRedirectCallback> mCallback;
   nsresult mResult;
 };
 
+nsAsyncRedirectVerifyHelper::nsAsyncRedirectVerifyHelper()
+    : mFlags(0),
+      mWaitingForRedirectCallback(false),
+      mCallbackInitiated(false),
+      mExpectedCallbacks(0),
+      mResult(NS_OK) {}
+
 nsAsyncRedirectVerifyHelper::~nsAsyncRedirectVerifyHelper() {
   NS_ASSERTION(NS_FAILED(mResult) || mExpectedCallbacks == 0,
                "Did not receive all required callbacks!");
 }
 
 nsresult nsAsyncRedirectVerifyHelper::Init(
     nsIChannel* oldChan, nsIChannel* newChan, uint32_t flags,
     nsIEventTarget* mainThreadEventTarget, bool synchronize) {
--- a/netwerk/base/nsAsyncRedirectVerifyHelper.h
+++ b/netwerk/base/nsAsyncRedirectVerifyHelper.h
@@ -29,17 +29,17 @@ class nsAsyncRedirectVerifyHelper final
       public nsINamed,
       public nsIAsyncVerifyRedirectCallback {
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
   NS_DECL_NSINAMED
   NS_DECL_NSIASYNCVERIFYREDIRECTCALLBACK
 
  public:
-  nsAsyncRedirectVerifyHelper() = default;
+  nsAsyncRedirectVerifyHelper();
 
   /*
    * Calls AsyncOnChannelRedirect() on the given sink with the given
    * channels and flags. Keeps track of number of async callbacks to expect.
    */
   nsresult DelegateOnChannelRedirect(nsIChannelEventSink* sink,
                                      nsIChannel* oldChannel,
                                      nsIChannel* newChannel, uint32_t flags);
@@ -64,22 +64,22 @@ class nsAsyncRedirectVerifyHelper final
    */
   nsresult Init(nsIChannel* oldChan, nsIChannel* newChan, uint32_t flags,
                 nsIEventTarget* mainThreadEventTarget,
                 bool synchronize = false);
 
  protected:
   nsCOMPtr<nsIChannel> mOldChan;
   nsCOMPtr<nsIChannel> mNewChan;
-  uint32_t mFlags{0};
-  bool mWaitingForRedirectCallback{false};
+  uint32_t mFlags;
+  bool mWaitingForRedirectCallback;
   nsCOMPtr<nsIEventTarget> mCallbackEventTarget;
-  bool mCallbackInitiated{false};
-  int32_t mExpectedCallbacks{0};
-  nsresult mResult{NS_OK};  // value passed to callback
+  bool mCallbackInitiated;
+  int32_t mExpectedCallbacks;
+  nsresult mResult;  // value passed to callback
 
   void InitCallback();
 
   /**
    * Calls back to |oldChan| as described in Init()
    */
   void ExplicitCallback(nsresult result);
 
--- a/netwerk/base/nsAsyncStreamCopier.cpp
+++ b/netwerk/base/nsAsyncStreamCopier.cpp
@@ -59,17 +59,24 @@ class AsyncApplyBufferingPolicyEvent fin
  private:
   RefPtr<nsAsyncStreamCopier> mCopier;
   nsCOMPtr<nsIEventTarget> mTarget;
 };
 
 //-----------------------------------------------------------------------------
 
 nsAsyncStreamCopier::nsAsyncStreamCopier()
-    : mChunkSize(nsIOService::gDefaultSegmentSize) {
+    : 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));
 }
 
 bool nsAsyncStreamCopier::IsComplete(nsresult* status) {
--- a/netwerk/base/nsAsyncStreamCopier.h
+++ b/netwerk/base/nsAsyncStreamCopier.h
@@ -54,23 +54,23 @@ class nsAsyncStreamCopier final : public
   nsCOMPtr<nsIOutputStream> mSink;
 
   nsCOMPtr<nsIRequestObserver> mObserver;
 
   nsCOMPtr<nsIEventTarget> mTarget;
 
   nsCOMPtr<nsISupports> mCopierCtx;
 
-  mozilla::Mutex mLock{"nsAsyncStreamCopier.mLock"};
+  mozilla::Mutex mLock;
 
-  nsAsyncCopyMode mMode{NS_ASYNCCOPY_VIA_READSEGMENTS};
+  nsAsyncCopyMode mMode;
   uint32_t mChunkSize;
-  nsresult mStatus{NS_OK};
-  bool mIsPending{false};
-  bool mCloseSource{false};
-  bool mCloseSink{false};
-  bool mShouldSniffBuffering{false};
+  nsresult mStatus;
+  bool mIsPending;
+  bool mCloseSource;
+  bool mCloseSink;
+  bool mShouldSniffBuffering;
 
   friend class ProceedWithAsyncCopy;
   friend class AsyncApplyBufferingPolicyEvent;
 };
 
 #endif  // !nsAsyncStreamCopier_h__
--- a/netwerk/base/nsBaseChannel.cpp
+++ b/netwerk/base/nsBaseChannel.cpp
@@ -47,17 +47,31 @@ class ScopedRequestSuspender {
 // Used to suspend data events from mRequest within a function scope.  This is
 // usually needed when a function makes callbacks that could process events.
 #define SUSPEND_PUMP_FOR_SCOPE() \
   ScopedRequestSuspender pump_suspender__(mRequest)
 
 //-----------------------------------------------------------------------------
 // nsBaseChannel
 
-nsBaseChannel::nsBaseChannel() : NeckoTargetHolder(nullptr) {
+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),
+      mCanceled(false) {
   mContentType.AssignLiteral(UNKNOWN_CONTENT_TYPE);
 }
 
 nsBaseChannel::~nsBaseChannel() {
   NS_ReleaseOnMainThread("nsBaseChannel::mLoadInfo", mLoadInfo.forget());
 }
 
 nsresult nsBaseChannel::Redirect(nsIChannel* newChannel, uint32_t redirectFlags,
--- a/netwerk/base/nsBaseChannel.h
+++ b/netwerk/base/nsBaseChannel.h
@@ -266,41 +266,41 @@ class nsBaseChannel
    private:
     RefPtr<nsBaseChannel> mChannel;
     nsCOMPtr<nsIChannel> mNewChannel;
   };
   friend class RedirectRunnable;
 
   RefPtr<nsInputStreamPump> mPump;
   RefPtr<nsIRequest> mRequest;
-  bool mPumpingData{false};
+  bool mPumpingData;
   nsCOMPtr<nsIProgressEventSink> mProgressSink;
   nsCOMPtr<nsIURI> mOriginalURI;
   nsCOMPtr<nsISupports> mOwner;
   nsCOMPtr<nsISupports> mSecurityInfo;
   nsCOMPtr<nsIChannel> mRedirectChannel;
   nsCString mContentType;
   nsCString mContentCharset;
-  uint32_t mLoadFlags{LOAD_NORMAL};
-  bool mQueriedProgressSink{true};
-  bool mSynthProgressEvents{false};
-  bool mAllowThreadRetargeting{true};
-  bool mWaitingOnAsyncRedirect{false};
-  bool mOpenRedirectChannel{false};
-  uint32_t mRedirectFlags{0};
+  uint32_t mLoadFlags;
+  bool mQueriedProgressSink;
+  bool mSynthProgressEvents;
+  bool mAllowThreadRetargeting;
+  bool mWaitingOnAsyncRedirect;
+  bool mOpenRedirectChannel;
+  uint32_t mRedirectFlags;
 
  protected:
   nsCOMPtr<nsIURI> mURI;
   nsCOMPtr<nsILoadGroup> mLoadGroup;
   nsCOMPtr<nsILoadInfo> mLoadInfo;
   nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
   nsCOMPtr<nsIStreamListener> mListener;
-  nsresult mStatus{NS_OK};
-  uint32_t mContentDispositionHint{UINT32_MAX};
+  nsresult mStatus;
+  uint32_t mContentDispositionHint;
   mozilla::UniquePtr<nsString> mContentDispositionFilename;
-  int64_t mContentLength{-1};
-  bool mWasOpened{false};
-  bool mCanceled{false};
+  int64_t mContentLength;
+  bool mWasOpened;
+  bool mCanceled;
 
   friend class mozilla::net::PrivateBrowsingChannel<nsBaseChannel>;
 };
 
 #endif  // !nsBaseChannel_h__
--- a/netwerk/base/nsBufferedStreams.cpp
+++ b/netwerk/base/nsBufferedStreams.cpp
@@ -43,16 +43,27 @@ using mozilla::DebugOnly;
 using mozilla::Maybe;
 using mozilla::MutexAutoLock;
 using mozilla::Nothing;
 using mozilla::Some;
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsBufferedStream
 
+nsBufferedStream::nsBufferedStream()
+    : mBufferSize(0),
+      mBuffer(nullptr),
+      mBufferStartOffset(0),
+      mCursor(0),
+      mFillPoint(0),
+      mStream(nullptr),
+      mBufferDisabled(false),
+      mEOF(false),
+      mGetBufferCount(0) {}
+
 nsBufferedStream::~nsBufferedStream() { Close(); }
 
 NS_IMPL_ISUPPORTS(nsBufferedStream, nsITellableStream, nsISeekableStream)
 
 nsresult nsBufferedStream::Init(nsISupports* aStream, uint32_t bufferSize) {
   NS_ASSERTION(aStream, "need to supply a stream");
   NS_ASSERTION(mStream == nullptr, "already inited");
   mStream = aStream;  // we keep a reference until nsBufferedStream::Close
@@ -297,16 +308,25 @@ NS_INTERFACE_MAP_BEGIN(nsBufferedInputSt
                                      mIsAsyncInputStreamLength)
   NS_IMPL_QUERY_CLASSINFO(nsBufferedInputStream)
 NS_INTERFACE_MAP_END_INHERITING(nsBufferedStream)
 
 NS_IMPL_CI_INTERFACE_GETTER(nsBufferedInputStream, nsIInputStream,
                             nsIBufferedInputStream, nsISeekableStream,
                             nsITellableStream, nsIStreamBufferAccess)
 
+nsBufferedInputStream::nsBufferedInputStream()
+    : nsBufferedStream(),
+      mMutex("nsBufferedInputStream::mMutex"),
+      mIsIPCSerializable(true),
+      mIsAsyncInputStream(false),
+      mIsCloneableInputStream(false),
+      mIsInputStreamLength(false),
+      mIsAsyncInputStreamLength(false) {}
+
 nsresult nsBufferedInputStream::Create(nsISupports* aOuter, REFNSIID aIID,
                                        void** aResult) {
   NS_ENSURE_NO_AGGREGATION(aOuter);
 
   RefPtr<nsBufferedInputStream> stream = new nsBufferedInputStream();
   return stream->QueryInterface(aIID, aResult);
 }
 
--- a/netwerk/base/nsBufferedStreams.h
+++ b/netwerk/base/nsBufferedStreams.h
@@ -22,48 +22,48 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 class nsBufferedStream : public nsISeekableStream {
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSISEEKABLESTREAM
   NS_DECL_NSITELLABLESTREAM
 
-  nsBufferedStream() = default;
+  nsBufferedStream();
 
   void Close();
 
  protected:
   virtual ~nsBufferedStream();
 
   nsresult Init(nsISupports* stream, uint32_t bufferSize);
   nsresult GetData(nsISupports** aResult);
   NS_IMETHOD Fill() = 0;
   NS_IMETHOD Flush() = 0;
 
-  uint32_t mBufferSize{0};
-  char* mBuffer{nullptr};
+  uint32_t mBufferSize;
+  char* mBuffer;
 
   // mBufferStartOffset is the offset relative to the start of mStream.
-  int64_t mBufferStartOffset{0};
+  int64_t mBufferStartOffset;
 
   // mCursor is the read cursor for input streams, or write cursor for
   // output streams, and is relative to mBufferStartOffset.
-  uint32_t mCursor{0};
+  uint32_t mCursor;
 
   // mFillPoint is the amount available in the buffer for input streams,
   // or the high watermark of bytes written into the buffer, and therefore
   // is relative to mBufferStartOffset.
-  uint32_t mFillPoint{0};
+  uint32_t mFillPoint;
 
   nsCOMPtr<nsISupports> mStream;  // cast to appropriate subclass
 
-  bool mBufferDisabled{false};
-  bool mEOF{false};  // True if mStream is at EOF
-  uint8_t mGetBufferCount{0};
+  bool mBufferDisabled;
+  bool mEOF;  // True if mStream is at EOF
+  uint8_t mGetBufferCount;
 };
 
 ////////////////////////////////////////////////////////////////////////////////
 
 class nsBufferedInputStream final : public nsBufferedStream,
                                     public nsIBufferedInputStream,
                                     public nsIStreamBufferAccess,
                                     public nsIIPCSerializableInputStream,
@@ -81,17 +81,17 @@ class nsBufferedInputStream final : publ
   NS_DECL_NSIIPCSERIALIZABLEINPUTSTREAM
   NS_DECL_NSIASYNCINPUTSTREAM
   NS_DECL_NSIINPUTSTREAMCALLBACK
   NS_DECL_NSICLONEABLEINPUTSTREAM
   NS_DECL_NSIINPUTSTREAMLENGTH
   NS_DECL_NSIASYNCINPUTSTREAMLENGTH
   NS_DECL_NSIINPUTSTREAMLENGTHCALLBACK
 
-  nsBufferedInputStream() : nsBufferedStream() {}
+  nsBufferedInputStream();
 
   static nsresult Create(nsISupports* aOuter, REFNSIID aIID, void** aResult);
 
   nsIInputStream* Source() { return (nsIInputStream*)mStream.get(); }
 
   /**
    * If there's a reference/pointer to an nsBufferedInputStream BEFORE calling
    * Init() AND the intent is to ultimately convert/assign that
@@ -115,29 +115,29 @@ class nsBufferedInputStream final : publ
   void SerializeInternal(mozilla::ipc::InputStreamParams& aParams,
                          FileDescriptorArray& aFileDescriptors,
                          bool aDelayedStart, uint32_t aMaxSize,
                          uint32_t* aSizeUsed, M* aManager);
 
   NS_IMETHOD Fill() override;
   NS_IMETHOD Flush() override { return NS_OK; }  // no-op for input streams
 
-  mozilla::Mutex mMutex{"nsBufferedInputStream::mMutex"};
+  mozilla::Mutex mMutex;
 
   // This value is protected by mutex.
   nsCOMPtr<nsIInputStreamCallback> mAsyncWaitCallback;
 
   // This value is protected by mutex.
   nsCOMPtr<nsIInputStreamLengthCallback> mAsyncInputStreamLengthCallback;
 
-  bool mIsIPCSerializable{true};
-  bool mIsAsyncInputStream{false};
-  bool mIsCloneableInputStream{false};
-  bool mIsInputStreamLength{false};
-  bool mIsAsyncInputStreamLength{false};
+  bool mIsIPCSerializable;
+  bool mIsAsyncInputStream;
+  bool mIsCloneableInputStream;
+  bool mIsInputStreamLength;
+  bool mIsAsyncInputStreamLength;
 };
 
 ////////////////////////////////////////////////////////////////////////////////
 
 class nsBufferedOutputStream : public nsBufferedStream,
                                public nsISafeOutputStream,
                                public nsIBufferedOutputStream,
                                public nsIStreamBufferAccess {
--- a/netwerk/base/nsDirectoryIndexStream.cpp
+++ b/netwerk/base/nsDirectoryIndexStream.cpp
@@ -33,17 +33,18 @@
 // behaviour, though. See bug 99382.
 // When this is fixed, #define THREADSAFE_I18N to get this code working
 
 //#define THREADSAFE_I18N
 
 using namespace mozilla;
 static LazyLogModule gLog("nsDirectoryIndexStream");
 
-nsDirectoryIndexStream::nsDirectoryIndexStream() {
+nsDirectoryIndexStream::nsDirectoryIndexStream()
+    : mOffset(0), mStatus(NS_OK), mPos(0) {
   MOZ_LOG(gLog, LogLevel::Debug, ("nsDirectoryIndexStream[%p]: created", this));
 }
 
 static int compare(nsIFile* aElement1, nsIFile* aElement2, void* aData) {
   if (!NS_IsNativeUTF8()) {
     // don't check for errors, because we can't report them anyway
     nsAutoString name1, name2;
     aElement1->GetLeafName(name1);
--- a/netwerk/base/nsDirectoryIndexStream.h
+++ b/netwerk/base/nsDirectoryIndexStream.h
@@ -12,20 +12,20 @@
 #include "nsIInputStream.h"
 #include "nsCOMArray.h"
 
 class nsIFile;
 
 class nsDirectoryIndexStream final : public nsIInputStream {
  private:
   nsCString mBuf;
-  int32_t mOffset{0};
-  nsresult mStatus{NS_OK};
+  int32_t mOffset;
+  nsresult mStatus;
 
-  int32_t mPos{0};             // position within mArray
+  int32_t mPos;                // position within mArray
   nsCOMArray<nsIFile> mArray;  // file objects within the directory
 
   nsDirectoryIndexStream();
   /**
    * aDir will only be used on the calling thread.
    */
   nsresult Init(nsIFile* aDir);
   ~nsDirectoryIndexStream();
--- a/netwerk/base/nsDownloader.h
+++ b/netwerk/base/nsDownloader.h
@@ -13,24 +13,24 @@ class nsIOutputStream;
 
 class nsDownloader : public nsIDownloader {
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOWNLOADER
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
 
-  nsDownloader() = default;
+  nsDownloader() : mLocationIsTemp(false) {}
 
  protected:
   virtual ~nsDownloader();
 
   static nsresult ConsumeData(nsIInputStream* in, void* closure,
                               const char* fromRawSegment, uint32_t toOffset,
                               uint32_t count, uint32_t* writeCount);
 
   nsCOMPtr<nsIDownloadObserver> mObserver;
   nsCOMPtr<nsIFile> mLocation;
   nsCOMPtr<nsIOutputStream> mSink;
-  bool mLocationIsTemp{false};
+  bool mLocationIsTemp;
 };
 
 #endif  // nsDownloader_h__
--- a/netwerk/base/nsFileStreams.cpp
+++ b/netwerk/base/nsFileStreams.cpp
@@ -38,16 +38,22 @@ using namespace mozilla::net;
 using mozilla::DebugOnly;
 using mozilla::Maybe;
 using mozilla::Nothing;
 using mozilla::Some;
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsFileStreamBase
 
+nsFileStreamBase::nsFileStreamBase()
+    : mFD(nullptr),
+      mBehaviorFlags(0),
+      mState(eUnitialized),
+      mErrorValue(NS_ERROR_FAILURE) {}
+
 nsFileStreamBase::~nsFileStreamBase() {
   // We don't want to try to rewrind the stream when shutting down.
   mBehaviorFlags &= ~nsIFileInputStream::REOPEN_ON_REWIND;
 
   Close();
 }
 
 NS_IMPL_ISUPPORTS(nsFileStreamBase, nsISeekableStream, nsITellableStream,
--- a/netwerk/base/nsFileStreams.h
+++ b/netwerk/base/nsFileStreams.h
@@ -30,17 +30,17 @@ class FileDescriptor;
 
 class nsFileStreamBase : public nsISeekableStream, public nsIFileMetadata {
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSISEEKABLESTREAM
   NS_DECL_NSITELLABLESTREAM
   NS_DECL_NSIFILEMETADATA
 
-  nsFileStreamBase() = default;
+  nsFileStreamBase();
 
  protected:
   virtual ~nsFileStreamBase();
 
   nsresult Close();
   nsresult Available(uint64_t* aResult);
   nsresult Read(char* aBuf, uint32_t aCount, uint32_t* aResult);
   nsresult ReadSegments(nsWriteSegmentFun aWriter, void* aClosure,
@@ -48,49 +48,49 @@ class nsFileStreamBase : public nsISeeka
   nsresult IsNonBlocking(bool* aNonBlocking);
   nsresult Flush();
   nsresult Write(const char* aBuf, uint32_t aCount, uint32_t* result);
   nsresult WriteFrom(nsIInputStream* aFromStream, uint32_t aCount,
                      uint32_t* _retval);
   nsresult WriteSegments(nsReadSegmentFun aReader, void* aClosure,
                          uint32_t aCount, uint32_t* _retval);
 
-  PRFileDesc* mFD{nullptr};
+  PRFileDesc* mFD;
 
   /**
    * Flags describing our behavior.  See the IDL file for possible values.
    */
-  int32_t mBehaviorFlags{0};
+  int32_t mBehaviorFlags;
 
   enum {
     // This is the default value. It will be changed by Deserialize or Init.
     eUnitialized,
     // The opening has been deferred. See DEFER_OPEN.
     eDeferredOpen,
     // The file has been opened. mFD is not null.
     eOpened,
     // The file has been closed. mFD is null.
     eClosed,
     // Something bad happen in the Open() or in Deserialize(). The actual
     // error value is stored in mErrorValue.
     eError
-  } mState{eUnitialized};
+  } mState;
 
   struct OpenParams {
     nsCOMPtr<nsIFile> localFile;
     int32_t ioFlags = 0;
     int32_t perm = 0;
   };
 
   /**
    * Data we need to do an open.
    */
   OpenParams mOpenParams;
 
-  nsresult mErrorValue{NS_ERROR_FAILURE};
+  nsresult mErrorValue;
 
   /**
    * Prepares the data we need to open the file, and either does the open now
    * by calling DoOpen(), or leaves it to be opened later by a call to
    * DoPendingOpen().
    */
   nsresult MaybeOpen(nsIFile* aFile, int32_t aIoFlags, int32_t aPerm,
                      bool aDeferred);
@@ -143,17 +143,18 @@ class nsFileInputStream : public nsFileS
   }
   NS_IMETHOD IsNonBlocking(bool* _retval) override {
     return nsFileStreamBase::IsNonBlocking(_retval);
   }
 
   // Overrided from nsFileStreamBase
   NS_IMETHOD Seek(int32_t aWhence, int64_t aOffset) override;
 
-  nsFileInputStream() : mLineBuffer(nullptr) {}
+  nsFileInputStream()
+      : mLineBuffer(nullptr), mIOFlags(0), mPerm(0), mCachedPosition(0) {}
 
   static nsresult Create(nsISupports* aOuter, REFNSIID aIID, void** aResult);
 
  protected:
   virtual ~nsFileInputStream() = default;
 
   void SerializeInternal(mozilla::ipc::InputStreamParams& aParams,
                          FileDescriptorArray& aFileDescriptors);
@@ -165,26 +166,26 @@ class nsFileInputStream : public nsFileS
 
   /**
    * The file being opened.
    */
   nsCOMPtr<nsIFile> mFile;
   /**
    * The IO flags passed to Init() for the file open.
    */
-  int32_t mIOFlags{0};
+  int32_t mIOFlags;
   /**
    * The permissions passed to Init() for the file open.
    */
-  int32_t mPerm{0};
+  int32_t mPerm;
 
   /**
    * Cached position for Tell for automatically reopening streams.
    */
-  int64_t mCachedPosition{0};
+  int64_t mCachedPosition;
 
  protected:
   /**
    * Internal, called to open a file.  Parameters are the same as their
    * Init() analogues.
    */
   nsresult Open(nsIFile* file, int32_t ioFlags, int32_t perm);
 
@@ -214,33 +215,33 @@ class nsFileOutputStream : public nsFile
  * due to the process or the thread being interrupted or crashed.
  */
 class nsAtomicFileOutputStream : public nsFileOutputStream,
                                  public nsISafeOutputStream {
  public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSISAFEOUTPUTSTREAM
 
-  nsAtomicFileOutputStream() = default;
+  nsAtomicFileOutputStream() : mTargetFileExists(true), mWriteResult(NS_OK) {}
 
   virtual nsresult DoOpen() override;
 
   NS_IMETHOD Close() override;
   NS_IMETHOD Write(const char* buf, uint32_t count, uint32_t* result) override;
   NS_IMETHOD Init(nsIFile* file, int32_t ioFlags, int32_t perm,
                   int32_t behaviorFlags) override;
 
  protected:
   virtual ~nsAtomicFileOutputStream() = default;
 
   nsCOMPtr<nsIFile> mTargetFile;
   nsCOMPtr<nsIFile> mTempFile;
 
-  bool mTargetFileExists{true};
-  nsresult mWriteResult{NS_OK};  // Internally set in Write()
+  bool mTargetFileExists;
+  nsresult mWriteResult;  // Internally set in Write()
 };
 
 ////////////////////////////////////////////////////////////////////////////////
 
 /**
  * A safe file output stream that overwrites the destination file only
  * once writing + flushing is complete. This protects against more
  * classes of software/hardware errors than nsAtomicFileOutputStream,
--- a/netwerk/base/nsIOService.cpp
+++ b/netwerk/base/nsIOService.cpp
@@ -191,19 +191,36 @@ static const char kProfileDoChange[] = "
 
 // Necko buffer defaults
 uint32_t nsIOService::gDefaultSegmentSize = 4096;
 uint32_t nsIOService::gDefaultSegmentCount = 24;
 
 ////////////////////////////////////////////////////////////////////////////////
 
 nsIOService::nsIOService()
-    : mLastOfflineStateChange(PR_IntervalNow()),
+    : mOffline(true),
+      mOfflineForProfileChange(false),
+      mManageLinkStatus(false),
+      mConnectivity(true),
+      mSettingOffline(false),
+      mSetOfflineValue(false),
+      mSocketProcessLaunchComplete(false),
+      mShutdown(false),
+      mHttpHandlerAlreadyShutingDown(false),
+      mNetworkLinkServiceInitialized(false),
+      mChannelEventSinks(NS_CHANNEL_EVENT_SINK_CATEGORY),
+      mMutex("nsIOService::mMutex"),
+      mTotalRequests(0),
+      mCacheWon(0),
+      mNetWon(0),
+      mLastOfflineStateChange(PR_IntervalNow()),
       mLastConnectivityChange(PR_IntervalNow()),
-      mLastNetworkLinkChange(PR_IntervalNow()) {}
+      mLastNetworkLinkChange(PR_IntervalNow()),
+      mNetTearingDownStarted(0),
+      mSocketProcess(nullptr) {}
 
 static const char* gCallbackPrefs[] = {
     PORT_PREF_PREFIX,
     MANAGE_OFFLINE_STATUS_PREF,
     NECKO_BUFFER_CACHE_COUNT_PREF,
     NECKO_BUFFER_CACHE_SIZE_PREF,
     NETWORK_CAPTIVE_PORTAL_PREF,
     nullptr,
--- a/netwerk/base/nsIOService.h
+++ b/netwerk/base/nsIOService.h
@@ -20,17 +20,16 @@
 #include "mozilla/Atomics.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Mutex.h"
 #include "prtime.h"
 #include "nsICaptivePortalService.h"
 #include "nsIObserverService.h"
 #include "nsTHashSet.h"
 #include "nsWeakReference.h"
-#include "nsNetCID.h"
 
 #define NS_N(x) (sizeof(x) / sizeof(*(x)))
 
 // We don't want to expose this observer topic.
 // Intended internal use only for remoting offline/inline events.
 // See Bug 552829
 #define NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC "ipc:network:set-offline"
 #define NS_IPC_IOSERVICE_SET_CONNECTIVITY_TOPIC "ipc:network:set-connectivity"
@@ -195,62 +194,61 @@ class nsIOService final : public nsIIOSe
 
   nsresult SpeculativeConnectInternal(nsIURI* aURI, nsIPrincipal* aPrincipal,
                                       nsIInterfaceRequestor* aCallbacks,
                                       bool aAnonymous);
 
   void DestroySocketProcess();
 
  private:
-  mozilla::Atomic<bool, mozilla::Relaxed> mOffline{true};
-  mozilla::Atomic<bool, mozilla::Relaxed> mOfflineForProfileChange{false};
-  bool mManageLinkStatus{false};
-  mozilla::Atomic<bool, mozilla::Relaxed> mConnectivity{true};
+  mozilla::Atomic<bool, mozilla::Relaxed> mOffline;
+  mozilla::Atomic<bool, mozilla::Relaxed> mOfflineForProfileChange;
+  bool mManageLinkStatus;
+  mozilla::Atomic<bool, mozilla::Relaxed> mConnectivity;
 
   // Used to handle SetOffline() reentrancy.  See the comment in
   // SetOffline() for more details.
-  bool mSettingOffline{false};
-  bool mSetOfflineValue{false};
+  bool mSettingOffline;
+  bool mSetOfflineValue;
 
-  bool mSocketProcessLaunchComplete{false};
+  bool mSocketProcessLaunchComplete;
 
-  mozilla::Atomic<bool, mozilla::Relaxed> mShutdown{false};
-  mozilla::Atomic<bool, mozilla::Relaxed> mHttpHandlerAlreadyShutingDown{false};
+  mozilla::Atomic<bool, mozilla::Relaxed> mShutdown;
+  mozilla::Atomic<bool, mozilla::Relaxed> mHttpHandlerAlreadyShutingDown;
 
   nsCOMPtr<nsPISocketTransportService> mSocketTransportService;
   nsCOMPtr<nsICaptivePortalService> mCaptivePortalService;
   nsCOMPtr<nsINetworkLinkService> mNetworkLinkService;
-  bool mNetworkLinkServiceInitialized{false};
+  bool mNetworkLinkServiceInitialized;
 
   // Cached protocol handlers, only accessed on the main thread
   nsWeakPtr mWeakHandler[NS_N(gScheme)];
 
   // cached categories
-  nsCategoryCache<nsIChannelEventSink> mChannelEventSinks{
-      NS_CHANNEL_EVENT_SINK_CATEGORY};
+  nsCategoryCache<nsIChannelEventSink> mChannelEventSinks;
 
-  Mutex mMutex{"nsIOService::mMutex"};
+  Mutex mMutex;
   nsTArray<int32_t> mRestrictedPortList;
 
-  uint32_t mTotalRequests{0};
-  uint32_t mCacheWon{0};
-  uint32_t mNetWon{0};
+  uint32_t mTotalRequests;
+  uint32_t mCacheWon;
+  uint32_t mNetWon;
 
   // These timestamps are needed for collecting telemetry on PR_Connect,
   // PR_ConnectContinue and PR_Close blocking time.  If we spend very long
   // time in any of these functions we want to know if and what network
   // change has happened shortly before.
   mozilla::Atomic<PRIntervalTime> mLastOfflineStateChange;
   mozilla::Atomic<PRIntervalTime> mLastConnectivityChange;
   mozilla::Atomic<PRIntervalTime> mLastNetworkLinkChange;
 
   // Time a network tearing down started.
-  mozilla::Atomic<PRIntervalTime> mNetTearingDownStarted{0};
+  mozilla::Atomic<PRIntervalTime> mNetTearingDownStarted;
 
-  SocketProcessHost* mSocketProcess{nullptr};
+  SocketProcessHost* mSocketProcess;
 
   // Events should be executed after the socket process is launched. Will
   // dispatch these events while socket process fires OnProcessLaunchComplete.
   // Note: this array is accessed only on the main thread.
   nsTArray<std::function<void()>> mPendingEvents;
 
   // The observer notifications need to be forwarded to socket process.
   nsTHashSet<nsCString> mObserverTopicForSocketProcess;
--- a/netwerk/base/nsIncrementalDownload.cpp
+++ b/netwerk/base/nsIncrementalDownload.cpp
@@ -98,17 +98,17 @@ class nsIncrementalDownload final : publ
   NS_DECL_NSIINCREMENTALDOWNLOAD
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSIOBSERVER
   NS_DECL_NSIINTERFACEREQUESTOR
   NS_DECL_NSICHANNELEVENTSINK
   NS_DECL_NSIASYNCVERIFYREDIRECTCALLBACK
 
-  nsIncrementalDownload() = default;
+  nsIncrementalDownload();
 
  private:
   ~nsIncrementalDownload() = default;
   nsresult FlushChunk();
   void UpdateProgress();
   nsresult CallOnStartRequest();
   void CallOnStopRequest();
   nsresult StartTimer(int32_t interval);
@@ -119,33 +119,49 @@ class nsIncrementalDownload final : publ
   nsCOMPtr<nsIRequestObserver> mObserver;
   nsCOMPtr<nsIProgressEventSink> mProgressSink;
   nsCOMPtr<nsIURI> mURI;
   nsCOMPtr<nsIURI> mFinalURI;
   nsCOMPtr<nsIFile> mDest;
   nsCOMPtr<nsIChannel> mChannel;
   nsCOMPtr<nsITimer> mTimer;
   mozilla::UniquePtr<char[]> mChunk;
-  int32_t mChunkLen{0};
-  int32_t mChunkSize{DEFAULT_CHUNK_SIZE};
-  int32_t mInterval{DEFAULT_INTERVAL};
-  int64_t mTotalSize{-1};
-  int64_t mCurrentSize{-1};
-  uint32_t mLoadFlags{LOAD_NORMAL};
-  int32_t mNonPartialCount{0};
-  nsresult mStatus{NS_OK};
-  bool mIsPending{false};
-  bool mDidOnStartRequest{false};
-  PRTime mLastProgressUpdate{0};
+  int32_t mChunkLen;
+  int32_t mChunkSize;
+  int32_t mInterval;
+  int64_t mTotalSize;
+  int64_t mCurrentSize;
+  uint32_t mLoadFlags;
+  int32_t mNonPartialCount;
+  nsresult mStatus;
+  bool mIsPending;
+  bool mDidOnStartRequest;
+  PRTime mLastProgressUpdate;
   nsCOMPtr<nsIAsyncVerifyRedirectCallback> mRedirectCallback;
   nsCOMPtr<nsIChannel> mNewRedirectChannel;
   nsCString mPartialValidator;
-  bool mCacheBust{false};
+  bool mCacheBust;
 };
 
+nsIncrementalDownload::nsIncrementalDownload()
+    : mChunkLen(0),
+      mChunkSize(DEFAULT_CHUNK_SIZE),
+      mInterval(DEFAULT_INTERVAL),
+      mTotalSize(-1),
+      mCurrentSize(-1),
+      mLoadFlags(LOAD_NORMAL),
+      mNonPartialCount(0),
+      mStatus(NS_OK),
+      mIsPending(false),
+      mDidOnStartRequest(false),
+      mLastProgressUpdate(0),
+      mRedirectCallback(nullptr),
+      mNewRedirectChannel(nullptr),
+      mCacheBust(false) {}
+
 nsresult nsIncrementalDownload::FlushChunk() {
   NS_ASSERTION(mTotalSize != int64_t(-1), "total size should be known");
 
   if (mChunkLen == 0) return NS_OK;
 
   nsresult rv = AppendToFile(mDest, mChunk.get(), mChunkLen);
   if (NS_FAILED(rv)) return rv;
 
--- a/netwerk/base/nsInputStreamChannel.h
+++ b/netwerk/base/nsInputStreamChannel.h
@@ -15,29 +15,29 @@ namespace mozilla {
 namespace net {
 
 class nsInputStreamChannel : public nsBaseChannel,
                              public nsIInputStreamChannel {
  public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIINPUTSTREAMCHANNEL
 
-  nsInputStreamChannel() = default;
+  nsInputStreamChannel() : mIsSrcdocChannel(false) {}
 
  protected:
   virtual ~nsInputStreamChannel() = default;
 
   virtual nsresult OpenContentStream(bool async, nsIInputStream** result,
                                      nsIChannel** channel) override;
 
   virtual void OnChannelDone() override { mContentStream = nullptr; }
 
  private:
   nsCOMPtr<nsIInputStream> mContentStream;
   nsCOMPtr<nsIURI> mBaseURI;
   nsString mSrcdocData;
-  bool mIsSrcdocChannel{false};
+  bool mIsSrcdocChannel;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // !nsInputStreamChannel_h__
--- a/netwerk/base/nsInputStreamPump.cpp
+++ b/netwerk/base/nsInputStreamPump.cpp
@@ -28,17 +28,33 @@ static NS_DEFINE_CID(kStreamTransportSer
 static mozilla::LazyLogModule gStreamPumpLog("nsStreamPump");
 #undef LOG
 #define LOG(args) MOZ_LOG(gStreamPumpLog, mozilla::LogLevel::Debug, args)
 
 //-----------------------------------------------------------------------------
 // nsInputStreamPump methods
 //-----------------------------------------------------------------------------
 
-nsInputStreamPump::nsInputStreamPump() : mOffMainThread(!NS_IsMainThread()) {}
+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),
+      mOffMainThread(!NS_IsMainThread()),
+      mMutex("nsInputStreamPump") {}
 
 nsresult nsInputStreamPump::Create(nsInputStreamPump** result,
                                    nsIInputStream* stream, uint32_t segsize,
                                    uint32_t segcount, bool closeWhenDone,
                                    nsIEventTarget* mainThreadTarget) {
   nsresult rv = NS_ERROR_OUT_OF_MEMORY;
   RefPtr<nsInputStreamPump> pump = new nsInputStreamPump();
   if (pump) {
--- a/netwerk/base/nsInputStreamPump.h
+++ b/netwerk/base/nsInputStreamPump.h
@@ -69,41 +69,41 @@ class nsInputStreamPump final : public n
   enum { STATE_IDLE, STATE_START, STATE_TRANSFER, STATE_STOP };
 
   nsresult EnsureWaiting();
   uint32_t OnStateStart();
   uint32_t OnStateTransfer();
   uint32_t OnStateStop();
   nsresult CreateBufferedStreamIfNeeded();
 
-  uint32_t mState{STATE_IDLE};
+  uint32_t mState;
   nsCOMPtr<nsILoadGroup> mLoadGroup;
   nsCOMPtr<nsIStreamListener> mListener;
   nsCOMPtr<nsIEventTarget> mTargetThread;
   nsCOMPtr<nsIEventTarget> mLabeledMainThreadTarget;
   nsCOMPtr<nsIInputStream> mStream;
   nsCOMPtr<nsIAsyncInputStream> mAsyncStream;
-  uint64_t mStreamOffset{0};
-  uint64_t mStreamLength{0};
-  uint32_t mSegSize{0};
-  uint32_t mSegCount{0};
-  nsresult mStatus{NS_OK};
-  uint32_t mSuspendCount{0};
-  uint32_t mLoadFlags{LOAD_NORMAL};
-  bool mIsPending{false};
+  uint64_t mStreamOffset;
+  uint64_t mStreamLength;
+  uint32_t mSegSize;
+  uint32_t mSegCount;
+  nsresult mStatus;
+  uint32_t mSuspendCount;
+  uint32_t mLoadFlags;
+  bool mIsPending;
   // True while in OnInputStreamReady, calling OnStateStart, OnStateTransfer
   // and OnStateStop. Used to prevent calls to AsyncWait during callbacks.
-  bool mProcessingCallbacks{false};
+  bool mProcessingCallbacks;
   // True if waiting on the "input stream ready" callback.
-  bool mWaitingForInputStreamReady{false};
-  bool mCloseWhenDone{false};
-  bool mRetargeting{false};
-  bool mAsyncStreamIsBuffered{false};
+  bool mWaitingForInputStreamReady;
+  bool mCloseWhenDone;
+  bool mRetargeting;
+  bool mAsyncStreamIsBuffered;
   // Indicate whether nsInputStreamPump is used completely off main thread.
   // If true, OnStateStop() is executed off main thread.
   bool mOffMainThread;
   // Protects state/member var accesses across multiple threads.
-  mozilla::RecursiveMutex mMutex{"nsInputStreamPump"};
+  mozilla::RecursiveMutex mMutex;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsInputStreamPump, NS_INPUT_STREAM_PUMP_IID)
 
 #endif  // !nsInputStreamChannel_h__
--- a/netwerk/base/nsLoadGroup.cpp
+++ b/netwerk/base/nsLoadGroup.cpp
@@ -81,17 +81,29 @@ static const PLDHashTableOps sRequestHas
     PLDHashTable::MoveEntryStub, RequestHashClearEntry, RequestHashInitEntry};
 
 static void RescheduleRequest(nsIRequest* aRequest, int32_t delta) {
   nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(aRequest);
   if (p) p->AdjustPriority(delta);
 }
 
 nsLoadGroup::nsLoadGroup()
-    : mRequests(&sRequestHashOps, sizeof(RequestMapEntry)) {
+    : mForegroundCount(0),
+      mLoadFlags(LOAD_NORMAL),
+      mDefaultLoadFlags(0),
+      mPriority(PRIORITY_NORMAL),
+      mRequests(&sRequestHashOps, sizeof(RequestMapEntry)),
+      mStatus(NS_OK),
+      mIsCanceling(false),
+      mDefaultLoadIsTimed(false),
+      mBrowsingContextDiscarded(false),
+      mExternalRequestContext(false),
+      mNotifyObserverAboutBackgroundRequests(false),
+      mTimedRequests(0),
+      mCachedRequests(0) {
   LOG(("LOADGROUP [%p]: Created.\n", this));
 }
 
 nsLoadGroup::~nsLoadGroup() {
   DebugOnly<nsresult> rv = Cancel(NS_BINDING_ABORTED);
   NS_ASSERTION(NS_SUCCEEDED(rv), "Cancel failed");
 
   mDefaultLoadRequest = nullptr;
--- a/netwerk/base/nsLoadGroup.h
+++ b/netwerk/base/nsLoadGroup.h
@@ -71,41 +71,41 @@ class nsLoadGroup : public nsILoadGroup,
   void TelemetryReport();
   void TelemetryReportChannel(nsITimedChannel* timedChannel,
                               bool defaultRequest);
 
   nsresult RemoveRequestFromHashtable(nsIRequest* aRequest, nsresult aStatus);
   nsresult NotifyRemovalObservers(nsIRequest* aRequest, nsresult aStatus);
 
  protected:
-  uint32_t mForegroundCount{0};
-  uint32_t mLoadFlags{LOAD_NORMAL};
-  uint32_t mDefaultLoadFlags{0};
-  int32_t mPriority{PRIORITY_NORMAL};
+  uint32_t mForegroundCount;
+  uint32_t mLoadFlags;
+  uint32_t mDefaultLoadFlags;
+  int32_t mPriority;
 
   nsCOMPtr<nsILoadGroup> mLoadGroup;  // load groups can contain load groups
   nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
   nsCOMPtr<nsIRequestContext> mRequestContext;
   nsCOMPtr<nsIRequestContextService> mRequestContextService;
 
   nsCOMPtr<nsIRequest> mDefaultLoadRequest;
   PLDHashTable mRequests;
 
   nsWeakPtr mObserver;
   nsWeakPtr mParentLoadGroup;
 
-  nsresult mStatus{NS_OK};
-  bool mIsCanceling{false};
-  bool mDefaultLoadIsTimed{false};
-  bool mBrowsingContextDiscarded{false};
-  bool mExternalRequestContext{false};
-  bool mNotifyObserverAboutBackgroundRequests{false};
+  nsresult mStatus;
+  bool mIsCanceling;
+  bool mDefaultLoadIsTimed;
+  bool mBrowsingContextDiscarded;
+  bool mExternalRequestContext;
+  bool mNotifyObserverAboutBackgroundRequests;
 
   /* Telemetry */
   mozilla::TimeStamp mDefaultRequestCreationTime;
-  uint32_t mTimedRequests{0};
-  uint32_t mCachedRequests{0};
+  uint32_t mTimedRequests;
+  uint32_t mCachedRequests;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // nsLoadGroup_h__
--- a/netwerk/base/nsMIMEInputStream.cpp
+++ b/netwerk/base/nsMIMEInputStream.cpp
@@ -37,17 +37,17 @@ class nsMIMEInputStream : public nsIMIME
                           public nsIInputStreamCallback,
                           public nsIInputStreamLength,
                           public nsIAsyncInputStreamLength,
                           public nsIInputStreamLengthCallback,
                           public nsICloneableInputStream {
   virtual ~nsMIMEInputStream() = default;
 
  public:
-  nsMIMEInputStream() = default;
+  nsMIMEInputStream();
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIINPUTSTREAM
   NS_DECL_NSIMIMEINPUTSTREAM
   NS_DECL_NSISEEKABLESTREAM
   NS_DECL_NSITELLABLESTREAM
   NS_DECL_NSIIPCSERIALIZABLEINPUTSTREAM
   NS_DECL_NSIASYNCINPUTSTREAM
@@ -79,19 +79,19 @@ class nsMIMEInputStream : public nsIMIME
   bool IsAsyncInputStream() const;
   bool IsInputStreamLength() const;
   bool IsAsyncInputStreamLength() const;
   bool IsCloneableInputStream() const;
 
   nsTArray<HeaderEntry> mHeaders;
 
   nsCOMPtr<nsIInputStream> mStream;
-  bool mStartedReading{false};
+  bool mStartedReading;
 
-  mozilla::Mutex mMutex{"nsMIMEInputStream::mMutex"};
+  mozilla::Mutex mMutex;
 
   // This is protected by mutex.
   nsCOMPtr<nsIInputStreamCallback> mAsyncWaitCallback;
 
   // This is protected by mutex.
   nsCOMPtr<nsIInputStreamLengthCallback> mAsyncInputStreamLengthCallback;
 };
 
@@ -121,16 +121,19 @@ NS_INTERFACE_MAP_BEGIN(nsMIMEInputStream
                                      IsCloneableInputStream())
   NS_IMPL_QUERY_CLASSINFO(nsMIMEInputStream)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CI_INTERFACE_GETTER(nsMIMEInputStream, nsIMIMEInputStream,
                             nsIAsyncInputStream, nsIInputStream,
                             nsISeekableStream, nsITellableStream)
 
+nsMIMEInputStream::nsMIMEInputStream()
+    : mStartedReading(false), mMutex("nsMIMEInputStream::mMutex") {}
+
 NS_IMETHODIMP
 nsMIMEInputStream::AddHeader(const char* aName, const char* aValue) {
   NS_ENSURE_FALSE(mStartedReading, NS_ERROR_FAILURE);
 
   HeaderEntry* entry = mHeaders.AppendElement();
   entry->name().Append(aName);
   entry->value().Append(aValue);
 
--- a/netwerk/base/nsProtocolProxyService.cpp
+++ b/netwerk/base/nsProtocolProxyService.cpp
@@ -123,17 +123,19 @@ class nsAsyncResolveRequest final : publ
                                     public nsPACManCallback,
                                     public nsICancelable {
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
   nsAsyncResolveRequest(nsProtocolProxyService* pps, nsIChannel* channel,
                         uint32_t aResolveFlags,
                         nsIProtocolProxyCallback* callback)
-      : mResolveFlags(aResolveFlags),
+      : mStatus(NS_OK),
+        mDispatched(false),
+        mResolveFlags(aResolveFlags),
         mPPS(pps),
         mXPComPPS(pps),
         mChannel(channel),
         mCallback(callback) {
     NS_ASSERTION(mCallback, "null callback");
   }
 
  private:
@@ -415,20 +417,20 @@ class nsAsyncResolveRequest final : publ
     mCallback = nullptr;  // in case the callback holds an owning ref to us
     mPPS = nullptr;
     mXPComPPS = nullptr;
     mChannel = nullptr;
     mProxyInfo = nullptr;
   }
 
  private:
-  nsresult mStatus{NS_OK};
+  nsresult mStatus;
   nsCString mPACString;
   nsCString mPACURL;
-  bool mDispatched{false};
+  bool mDispatched;
   uint32_t mResolveFlags;
 
   nsProtocolProxyService* mPPS;
   nsCOMPtr<nsIProtocolProxyService> mXPComPPS;
   nsCOMPtr<nsIChannel> mChannel;
   nsCOMPtr<nsIProtocolProxyCallback> mCallback;
   nsCOMPtr<nsIProxyInfo> mProxyInfo;
 
@@ -763,17 +765,31 @@ NS_INTERFACE_MAP_BEGIN(nsProtocolProxySe
   NS_INTERFACE_MAP_ENTRY_CONCRETE(nsProtocolProxyService)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIProtocolProxyService)
   NS_IMPL_QUERY_CLASSINFO(nsProtocolProxyService)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CI_INTERFACE_GETTER(nsProtocolProxyService, nsIProtocolProxyService,
                             nsIProtocolProxyService2)
 
-nsProtocolProxyService::nsProtocolProxyService() : mSessionStart(PR_Now()) {}
+nsProtocolProxyService::nsProtocolProxyService()
+    : mFilterLocalHosts(false),
+      mProxyConfig(PROXYCONFIG_DIRECT),
+      mHTTPProxyPort(-1),
+      mHTTPSProxyPort(-1),
+      mSOCKSProxyPort(-1),
+      mSOCKSProxyVersion(4),
+      mSOCKSProxyRemoteDNS(false),
+      mProxyOverTLS(true),
+      mWPADOverDHCPEnabled(false),
+      mPACMan(nullptr),
+      mSessionStart(PR_Now()),
+      mFailedProxyTimeout(30 * 60)  // 30 minute default
+      ,
+      mIsShutdown(false) {}
 
 nsProtocolProxyService::~nsProtocolProxyService() {
   // These should have been cleaned up in our Observe method.
   NS_ASSERTION(mHostFiltersArray.Length() == 0 && mFilters.Length() == 0 &&
                    mPACMan == nullptr,
                "what happened to xpcom-shutdown?");
 }
 
@@ -1484,17 +1500,19 @@ nsProtocolProxyService::ReloadPAC() {
 // the main thread is blocking on that condvar -
 //  so call nsPACMan::AsyncGetProxyForURI() with
 // a false mainThreadResponse parameter.
 class nsAsyncBridgeRequest final : public nsPACManCallback {
   NS_DECL_THREADSAFE_ISUPPORTS
 
   nsAsyncBridgeRequest()
       : mMutex("nsDeprecatedCallback"),
-        mCondVar(mMutex, "nsDeprecatedCallback") {}
+        mCondVar(mMutex, "nsDeprecatedCallback"),
+        mStatus(NS_OK),
+        mCompleted(false) {}
 
   void OnQueryComplete(nsresult status, const nsACString& pacString,
                        const nsACString& newPACURL) override {
     MutexAutoLock lock(mMutex);
     mCompleted = true;
     mStatus = status;
     mPACString = pacString;
     mPACURL = newPACURL;
@@ -1508,20 +1526,20 @@ class nsAsyncBridgeRequest final : publi
  private:
   ~nsAsyncBridgeRequest() = default;
 
   friend class nsProtocolProxyService;
 
   Mutex mMutex;
   CondVar mCondVar;
 
-  nsresult mStatus{NS_OK};
+  nsresult mStatus;
   nsCString mPACString;
   nsCString mPACURL;
-  bool mCompleted{false};
+  bool mCompleted;
 };
 NS_IMPL_ISUPPORTS0(nsAsyncBridgeRequest)
 
 nsresult nsProtocolProxyService::AsyncResolveInternal(
     nsIChannel* channel, uint32_t flags, nsIProtocolProxyCallback* callback,
     nsICancelable** result, bool isSyncOK,
     nsISerialEventTarget* mainThreadEventTarget) {
   NS_ENSURE_ARG_POINTER(channel);
--- a/netwerk/base/nsProtocolProxyService.h
+++ b/netwerk/base/nsProtocolProxyService.h
@@ -336,78 +336,77 @@ class nsProtocolProxyService final : pub
   struct HostInfoName {
     char* host;
     uint32_t host_len;
   };
 
  protected:
   // simplified array of filters defined by this struct
   struct HostInfo {
-    bool is_ipaddr{false};
-    int32_t port{0};
-    // other members intentionally uninitialized
+    bool is_ipaddr;
+    int32_t port;
     union {
-      HostInfoIP ip;
+      HostInfoIP ip{};
       HostInfoName name;
     };
 
-    HostInfo() = default;
+    HostInfo()
+        : is_ipaddr(false),
+          port(0) { /* other members intentionally uninitialized */
+    }
     ~HostInfo() {
-      if (!is_ipaddr && name.host) {
-        free(name.host);
-      }
+      if (!is_ipaddr && name.host) free(name.host);
     }
   };
 
  private:
   // Private methods to insert and remove FilterLinks from the FilterLink chain.
   nsresult InsertFilterLink(RefPtr<FilterLink>&& link);
   nsresult RemoveFilterLink(nsISupports* givenObject);
 
  protected:
   // Indicates if local hosts (plain hostnames, no dots) should use the proxy
-  bool mFilterLocalHosts{false};
+  bool mFilterLocalHosts;
 
   // Holds an array of HostInfo objects
   nsTArray<UniquePtr<HostInfo>> mHostFiltersArray;
 
   // Filters, always sorted by the position.
   nsTArray<RefPtr<FilterLink>> mFilters;
 
-  uint32_t mProxyConfig{PROXYCONFIG_DIRECT};
+  uint32_t mProxyConfig;
 
   nsCString mHTTPProxyHost;
-  int32_t mHTTPProxyPort{-1};
+  int32_t mHTTPProxyPort;
 
   nsCString mHTTPSProxyHost;
-  int32_t mHTTPSProxyPort{-1};
+  int32_t mHTTPSProxyPort;
 
   // mSOCKSProxyTarget could be a host, a domain socket path,
   // or a named-pipe name.
   nsCString mSOCKSProxyTarget;
-  int32_t mSOCKSProxyPort{-1};
-  int32_t mSOCKSProxyVersion{4};
-  bool mSOCKSProxyRemoteDNS{false};
-  bool mProxyOverTLS{true};
-  bool mWPADOverDHCPEnabled{false};
+  int32_t mSOCKSProxyPort;
+  int32_t mSOCKSProxyVersion;
+  bool mSOCKSProxyRemoteDNS;
+  bool mProxyOverTLS;
+  bool mWPADOverDHCPEnabled;
 
   RefPtr<nsPACMan> mPACMan;  // non-null if we are using PAC
   nsCOMPtr<nsISystemProxySettings> mSystemProxySettings;
 
   PRTime mSessionStart;
   nsFailedProxyTable mFailedProxies;
-  // 30 minute default
-  int32_t mFailedProxyTimeout{30 * 60};
+  int32_t mFailedProxyTimeout;
 
  private:
   nsresult AsyncResolveInternal(nsIChannel* channel, uint32_t flags,
                                 nsIProtocolProxyCallback* callback,
                                 nsICancelable** result, bool isSyncOK,
                                 nsISerialEventTarget* mainThreadEventTarget);
-  bool mIsShutdown{false};
+  bool mIsShutdown;
   nsCOMPtr<nsITimer> mReloadPACTimer;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsProtocolProxyService,
                               NS_PROTOCOL_PROXY_SERVICE_IMPL_CID)
 
 }  // namespace net
 }  // namespace mozilla
--- a/netwerk/base/nsProxyInfo.h
+++ b/netwerk/base/nsProxyInfo.h
@@ -58,39 +58,45 @@ class nsProxyInfo final : public nsIProx
   static void SerializeProxyInfo(nsProxyInfo* aProxyInfo,
                                  nsTArray<ProxyInfoCloneArgs>& aResult);
   static nsProxyInfo* DeserializeProxyInfo(
       const nsTArray<ProxyInfoCloneArgs>& aArgs);
 
  private:
   friend class nsProtocolProxyService;
 
-  explicit nsProxyInfo(const char* type = nullptr) : mType(type) {}
+  explicit nsProxyInfo(const char* type = nullptr)
+      : mType(type),
+        mPort(-1),
+        mFlags(0),
+        mResolveFlags(0),
+        mTimeout(UINT32_MAX),
+        mNext(nullptr) {}
 
   nsProxyInfo(const nsACString& aType, const nsACString& aHost, int32_t aPort,
               const nsACString& aUsername, const nsACString& aPassword,
               uint32_t aFlags, uint32_t aTimeout, uint32_t aResolveFlags,
               const nsACString& aProxyAuthorizationHeader,
               const nsACString& aConnectionIsolationKey);
 
   ~nsProxyInfo() { NS_IF_RELEASE(mNext); }
 
   const char* mType;  // pointer to statically allocated value
   nsCString mHost;
   nsCString mUsername;
   nsCString mPassword;
   nsCString mProxyAuthorizationHeader;
   nsCString mConnectionIsolationKey;
-  int32_t mPort{-1};
-  uint32_t mFlags{0};
+  int32_t mPort;
+  uint32_t mFlags;
   // We need to read on multiple threads, but don't need to sync on anything
   // else
-  Atomic<uint32_t, Relaxed> mResolveFlags{0};
-  uint32_t mTimeout{UINT32_MAX};
-  nsProxyInfo* mNext{nullptr};
+  Atomic<uint32_t, Relaxed> mResolveFlags;
+  uint32_t mTimeout;
+  nsProxyInfo* mNext;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsProxyInfo, NS_PROXYINFO_IID)
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // nsProxyInfo_h__
--- a/netwerk/base/nsServerSocket.cpp
+++ b/netwerk/base/nsServerSocket.cpp
@@ -30,17 +30,30 @@ static nsresult PostEvent(nsServerSocket
 
   return gSocketTransportService->Dispatch(ev, NS_DISPATCH_NORMAL);
 }
 
 //-----------------------------------------------------------------------------
 // nsServerSocket
 //-----------------------------------------------------------------------------
 
-nsServerSocket::nsServerSocket() {
+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);
   }
   // make sure the STS sticks around as long as we do
--- a/netwerk/base/nsServerSocket.h
+++ b/netwerk/base/nsServerSocket.h
@@ -35,32 +35,32 @@ class nsServerSocket : public nsASocketH
 
   virtual void CreateClientTransport(PRFileDesc* clientFD,
                                      const mozilla::net::NetAddr& clientAddr);
   virtual nsresult SetSocketDefaults() { return NS_OK; }
   virtual nsresult OnSocketListen() { return NS_OK; }
 
  protected:
   virtual ~nsServerSocket();
-  PRFileDesc* mFD{nullptr};
+  PRFileDesc* mFD;
   nsCOMPtr<nsIServerSocketListener> mListener;
 
  private:
   void OnMsgClose();
   void OnMsgAttach();
 
   // try attaching our socket (mFD) to the STS's poll list.
   nsresult TryAttach();
 
   // lock protects access to mListener; so it is not cleared while being used.
-  mozilla::Mutex mLock{"nsServerSocket.mLock"};
+  mozilla::Mutex mLock;
   PRNetAddr mAddr = {.raw = {0, {0}}};
   nsCOMPtr<nsIEventTarget> mListenerTarget;
-  bool mAttached{false};
-  bool mKeepWhenOffline{false};
+  bool mAttached;
+  bool mKeepWhenOffline;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 //-----------------------------------------------------------------------------
 
 #endif  // nsServerSocket_h__
--- a/netwerk/base/nsSimpleURI.cpp
+++ b/netwerk/base/nsSimpleURI.cpp
@@ -49,16 +49,18 @@ already_AddRefed<nsSimpleURI> nsSimpleUR
 NS_IMPL_CLASSINFO(nsSimpleURI, nullptr, nsIClassInfo::THREADSAFE,
                   NS_SIMPLEURI_CID)
 // Empty CI getter. We only need nsIClassInfo for Serialization
 NS_IMPL_CI_INTERFACE_GETTER0(nsSimpleURI)
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsSimpleURI methods:
 
+nsSimpleURI::nsSimpleURI() : mIsRefValid(false), mIsQueryValid(false) {}
+
 NS_IMPL_ADDREF(nsSimpleURI)
 NS_IMPL_RELEASE(nsSimpleURI)
 NS_INTERFACE_TABLE_HEAD(nsSimpleURI)
   NS_INTERFACE_TABLE(nsSimpleURI, nsIURI, nsISerializable)
   NS_INTERFACE_TABLE_TO_MAP_SEGUE
   NS_IMPL_QUERY_CLASSINFO(nsSimpleURI)
   if (aIID.Equals(kThisSimpleURIImplementationCID)) {
     foundInterface = static_cast<nsIURI*>(this);
--- a/netwerk/base/nsSimpleURI.h
+++ b/netwerk/base/nsSimpleURI.h
@@ -22,17 +22,17 @@ namespace net {
   { /* 0b9bb0c2-fee6-470b-b9b9-9fd9462b5e19 */       \
     0x0b9bb0c2, 0xfee6, 0x470b, {                    \
       0xb9, 0xb9, 0x9f, 0xd9, 0x46, 0x2b, 0x5e, 0x19 \
     }                                                \
   }
 
 class nsSimpleURI : public nsIURI, public nsISerializable, public nsISizeOf {
  protected:
-  nsSimpleURI() = default;
+  nsSimpleURI();
   virtual ~nsSimpleURI() = default;
 
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURI
   NS_DECL_NSISERIALIZABLE
 
   static already_AddRefed<nsSimpleURI> From(nsIURI* aURI);
@@ -103,19 +103,18 @@ class nsSimpleURI : public nsIURI, publi
 
   bool Deserialize(const mozilla::ipc::URIParams&);
 
   nsCString mScheme;
   nsCString mPath;  // NOTE: mPath does not include ref, as an optimization
   nsCString mRef;   // so that URIs with different refs can share string data.
   nsCString
       mQuery;  // so that URLs with different querys can share string data.
-  bool mIsRefValid{false};  // To distinguish between empty-ref and no-ref.
-  // To distinguish between empty-query and no-query.
-  bool mIsQueryValid{false};
+  bool mIsRefValid;    // To distinguish between empty-ref and no-ref.
+  bool mIsQueryValid;  // To distinguish between empty-query and no-query.
 
  public:
   class Mutator final : public nsIURIMutator,
                         public BaseURIMutator<nsSimpleURI>,
                         public nsISimpleURIMutator,
                         public nsISerializable {
     NS_DECL_ISUPPORTS
     NS_FORWARD_SAFE_NSIURISETTERS_RET(mURI)
--- a/netwerk/base/nsSocketTransport2.cpp
+++ b/netwerk/base/nsSocketTransport2.cpp
@@ -248,17 +248,21 @@ nsresult ErrorAccordingToNSPR(PRErrorCod
   return rv;
 }
 
 //-----------------------------------------------------------------------------
 // socket input stream impl
 //-----------------------------------------------------------------------------
 
 nsSocketInputStream::nsSocketInputStream(nsSocketTransport* trans)
-    : mTransport(trans) {}
+    : mTransport(trans),
+      mReaderRefCnt(0),
+      mCondition(NS_OK),
+      mCallbackFlags(0),
+      mByteCount(0) {}
 
 // called on the socket transport thread...
 //
 //   condition : failure code if socket has been closed
 //
 void nsSocketInputStream::OnSocketReady(nsresult condition) {
   SOCKET_LOG(("nsSocketInputStream::OnSocketReady [this=%p cond=%" PRIx32 "]\n",
               this, static_cast<uint32_t>(condition)));
@@ -478,17 +482,21 @@ nsSocketInputStream::AsyncWait(nsIInputS
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // socket output stream impl
 //-----------------------------------------------------------------------------
 
 nsSocketOutputStream::nsSocketOutputStream(nsSocketTransport* trans)
-    : mTransport(trans) {}
+    : mTransport(trans),
+      mWriterRefCnt(0),
+      mCondition(NS_OK),
+      mCallbackFlags(0),
+      mByteCount(0) {}
 
 // called on the socket transport thread...
 //
 //   condition : failure code if socket has been closed
 //
 void nsSocketOutputStream::OnSocketReady(nsresult condition) {
   SOCKET_LOG(("nsSocketOutputStream::OnSocketReady [this=%p cond=%" PRIx32
               "]\n",
@@ -666,20 +674,54 @@ nsSocketOutputStream::AsyncWait(nsIOutpu
   return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // socket transport impl
 //-----------------------------------------------------------------------------
 
 nsSocketTransport::nsSocketTransport()
-    : mFD(this),
+    : mPort(0),
+      mProxyPort(0),
+      mOriginPort(0),
+      mProxyTransparent(false),
+      mProxyTransparentResolvesHost(false),
+      mHttpsProxy(false),
+      mConnectionFlags(0),
+      mResetFamilyPreference(false),
+      mTlsFlags(0),
+      mReuseAddrPort(false),
+      mState(STATE_CLOSED),
+      mAttached(false),
+      mInputClosed(true),
+      mOutputClosed(true),
+      mResolving(false),
+      mEchConfigUsed(false),
+      mResolvedByTRR(false),
+      mNetAddrIsSet(false),
+      mSelfAddrIsSet(false),
+      mLock("nsSocketTransport.mLock"),
+      mFD(this),
+      mFDref(0),
+      mFDconnected(false),
       mSocketTransportService(gSocketTransportService),
       mInput(this),
-      mOutput(this) {
+      mOutput(this),
+      mLingerPolarity(false),
+      mLingerTimeout(0),
+      mQoSBits(0x00),
+      mKeepaliveEnabled(false),
+      mKeepaliveIdleTimeS(-1),
+      mKeepaliveRetryIntervalS(-1),
+      mKeepaliveProbeCount(-1),
+      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() {
   SOCKET_LOG(("destroying nsSocketTransport @%p\n", this));
@@ -1939,22 +1981,19 @@ void nsSocketTransport::OnSocketEvent(ui
       //
       if (mState == STATE_CLOSED) {
         // Unix domain sockets are ready to connect; mNetAddr is all we
         // need. Internet address families require a DNS lookup (or possibly
         // several) before we can connect.
 #if defined(XP_UNIX)
         if (mNetAddrIsSet && mNetAddr.raw.family == AF_LOCAL) {
           mCondition = InitiateSocket();
-        } else {
-#else
-        {
+        } else
 #endif
           mCondition = ResolveHost();
-        }
 
       } else {
         SOCKET_LOG(("  ignoring redundant event\n"));
       }
       break;
 
     case MSG_DNS_LOOKUP_COMPLETE:
       if (mDNSRequest) {  // only send this if we actually resolved anything
--- a/netwerk/base/nsSocketTransport2.h
+++ b/netwerk/base/nsSocketTransport2.h
@@ -59,23 +59,23 @@ class nsSocketInputStream : public nsIAs
   nsresult Condition() { return mCondition; }
   uint64_t ByteCount() { return mByteCount; }
 
   // called by the socket transport on the socket thread...
   void OnSocketReady(nsresult condition);
 
  private:
   nsSocketTransport* mTransport;
-  ThreadSafeAutoRefCnt mReaderRefCnt{0};
+  ThreadSafeAutoRefCnt mReaderRefCnt;
 
   // access to these is protected by mTransport->mLock
-  nsresult mCondition{NS_OK};
+  nsresult mCondition;
   nsCOMPtr<nsIInputStreamCallback> mCallback;
-  uint32_t mCallbackFlags{0};
-  uint64_t mByteCount{0};
+  uint32_t mCallbackFlags;
+  uint64_t mByteCount;
 };
 
 //-----------------------------------------------------------------------------
 
 class nsSocketOutputStream : public nsIAsyncOutputStream {
  public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIOUTPUTSTREAM
@@ -92,23 +92,23 @@ class nsSocketOutputStream : public nsIA
   void OnSocketReady(nsresult condition);
 
  private:
   static nsresult WriteFromSegments(nsIInputStream*, void*, const char*,
                                     uint32_t offset, uint32_t count,
                                     uint32_t* countRead);
 
   nsSocketTransport* mTransport;
-  ThreadSafeAutoRefCnt mWriterRefCnt{0};
+  ThreadSafeAutoRefCnt mWriterRefCnt;
 
   // access to these is protected by mTransport->mLock
-  nsresult mCondition{NS_OK};
+  nsresult mCondition;
   nsCOMPtr<nsIOutputStreamCallback> mCallback;
-  uint32_t mCallbackFlags{0};
-  uint64_t mByteCount{0};
+  uint32_t mCallbackFlags;
+  uint64_t mByteCount;
 };
 
 //-----------------------------------------------------------------------------
 
 class nsSocketTransport final : public nsASocketHandler,
                                 public nsISocketTransport,
                                 public nsIDNSListener,
                                 public nsIClassInfo,
@@ -270,29 +270,29 @@ class nsSocketTransport final : public n
   // afterwards.  this allows them to be safely accessed from any thread.
   //-------------------------------------------------------------------------
 
   // socket type info:
   nsTArray<nsCString> mTypes;
   nsCString mHost;
   nsCString mProxyHost;
   nsCString mOriginHost;
-  uint16_t mPort{0};
+  uint16_t mPort;
   nsCOMPtr<nsIProxyInfo> mProxyInfo;
-  uint16_t mProxyPort{0};
-  uint16_t mOriginPort{0};
-  bool mProxyTransparent{false};
-  bool mProxyTransparentResolvesHost{false};
-  bool mHttpsProxy{false};
-  uint32_t mConnectionFlags{0};
+  uint16_t mProxyPort;
+  uint16_t mOriginPort;
+  bool mProxyTransparent;
+  bool mProxyTransparentResolvesHost;
+  bool mHttpsProxy;
+  uint32_t mConnectionFlags;
   // When we fail to connect using a prefered IP family, we tell the consumer to
   // reset the IP family preference on the connection entry.
-  bool mResetFamilyPreference{false};
-  uint32_t mTlsFlags{0};
-  bool mReuseAddrPort{false};
+  bool mResetFamilyPreference;
+  uint32_t mTlsFlags;
+  bool mReuseAddrPort;
 
   // The origin attributes are used to create sockets.  The first party domain
   // will eventually be used to isolate OCSP cache and is only non-empty when
   // "privacy.firstparty.isolate" is enabled.  Setting this is the only way to
   // carry origin attributes down to NSPR layers which are final consumers.
   // It must be set before the socket transport is built.
   OriginAttributes mOriginAttributes;
 
@@ -304,39 +304,39 @@ class nsSocketTransport final : public n
   }
 
   //-------------------------------------------------------------------------
   // members accessible only on the socket transport thread:
   //  (the exception being initialization/shutdown time)
   //-------------------------------------------------------------------------
 
   // socket state vars:
-  uint32_t mState{STATE_CLOSED};  // STATE_??? flags
-  bool mAttached{false};
-  bool mInputClosed{true};
-  bool mOutputClosed{true};
+  uint32_t mState;  // STATE_??? flags
+  bool mAttached;
+  bool mInputClosed;
+  bool mOutputClosed;
 
   // this flag is used to determine if the results of a host lookup arrive
   // recursively or not.  this flag is not protected by any lock.
-  bool mResolving{false};
+  bool mResolving;
 
   nsCOMPtr<nsICancelable> mDNSRequest;
   nsCOMPtr<nsIDNSAddrRecord> mDNSRecord;
 
   nsCString mEchConfig;
   bool mEchConfigUsed = false;
-  bool mResolvedByTRR{false};
+  bool mResolvedByTRR;
 
   // mNetAddr/mSelfAddr is valid from GetPeerAddr()/GetSelfAddr() once we have
   // reached STATE_TRANSFERRING. It must not change after that.
   void SetSocketName(PRFileDesc* fd);
   NetAddr mNetAddr;
   NetAddr mSelfAddr;  // getsockname()
-  Atomic<bool, Relaxed> mNetAddrIsSet{false};
-  Atomic<bool, Relaxed> mSelfAddrIsSet{false};
+  Atomic<bool, Relaxed> mNetAddrIsSet;
+  Atomic<bool, Relaxed> mSelfAddrIsSet;
 
   UniquePtr<NetAddr> mBindAddr;
 
   // socket methods (these can only be called on the socket thread):
 
   void SendStatus(nsresult status);
   nsresult ResolveHost();
   nsresult BuildSocket(PRFileDesc*&, bool&, bool&);
@@ -358,21 +358,20 @@ class nsSocketTransport final : public n
 
   // called when the socket is connected
   void OnSocketConnected();
 
   //-------------------------------------------------------------------------
   // socket input/output objects.  these may be accessed on any thread with
   // the exception of some specific methods (XXX).
 
-  // protects members in this section.
-  Mutex mLock{"nsSocketTransport.mLock"};
+  Mutex mLock;  // protects members in this section.
   LockedPRFileDesc mFD;
-  nsrefcnt mFDref{0};        // mFD is closed when mFDref goes to zero.
-  bool mFDconnected{false};  // mFD is available to consumer when TRUE.
+  nsrefcnt mFDref;    // mFD is closed when mFDref goes to zero.
+  bool mFDconnected;  // mFD is available to consumer when TRUE.
 
   // A delete protector reference to gSocketTransportService held for lifetime
   // of 'this'. Sometimes used interchangably with gSocketTransportService due
   // to scoping.
   RefPtr<nsSocketTransportService> mSocketTransportService;
 
   nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
   nsCOMPtr<nsITransportEventSink> mEventSink;
@@ -383,21 +382,21 @@ class nsSocketTransport final : public n
 
   friend class nsSocketInputStream;
   friend class nsSocketOutputStream;
 
   // socket timeouts are protected by mLock.
   uint16_t mTimeouts[2]{0};
 
   // linger options to use when closing
-  bool mLingerPolarity{false};
-  int16_t mLingerTimeout{0};
+  bool mLingerPolarity;
+  int16_t mLingerTimeout;
 
   // QoS setting for socket
-  uint8_t mQoSBits{0x00};
+  uint8_t mQoSBits;
 
   //
   // mFD access methods: called with mLock held.
   //
   PRFileDesc* GetFD_Locked();
   void ReleaseFD_Locked(PRFileDesc* fd);
 
   //
@@ -444,24 +443,24 @@ class nsSocketTransport final : public n
   // Reads prefs to get default keepalive config.
   nsresult EnsureKeepaliveValsAreInitialized();
 
   // Groups calls to fd.SetKeepaliveEnabled and fd.SetKeepaliveVals.
   nsresult SetKeepaliveEnabledInternal(bool aEnable);
 
   // True if keepalive has been enabled by the socket owner. Note: Keepalive
   // must also be enabled globally for it to be enabled in TCP.
-  bool mKeepaliveEnabled{false};
+  bool mKeepaliveEnabled;
 
   // Keepalive config (support varies by platform).
-  int32_t mKeepaliveIdleTimeS{-1};
-  int32_t mKeepaliveRetryIntervalS{-1};
-  int32_t mKeepaliveProbeCount{-1};
+  int32_t mKeepaliveIdleTimeS;
+  int32_t mKeepaliveRetryIntervalS;
+  int32_t mKeepaliveProbeCount;
 
-  bool mDoNotRetryToConnect{false};
+  bool mDoNotRetryToConnect;
 
   // Whether the port remapping has already been applied.  We definitely want to
   // prevent duplicate calls in case of chaining remapping.
   bool mPortRemappingApplied = false;
 
   bool mExternalDNSResolution = false;
   bool mRetryDnsIfPossible = false;
 };
--- a/netwerk/base/nsSocketTransportService2.cpp
+++ b/netwerk/base/nsSocketTransportService2.cpp
@@ -44,16 +44,17 @@ nsSocketTransportService* gSocketTranspo
 static Atomic<PRThread*, Relaxed> gSocketThread(nullptr);
 
 #define SEND_BUFFER_PREF "network.tcp.sendbuffer"
 #define KEEPALIVE_ENABLED_PREF "network.tcp.keepalive.enabled"
 #define KEEPALIVE_IDLE_TIME_PREF "network.tcp.keepalive.idle_time"
 #define KEEPALIVE_RETRY_INTERVAL_PREF "network.tcp.keepalive.retry_interval"
 #define KEEPALIVE_PROBE_COUNT_PREF "network.tcp.keepalive.probe_count"
 #define SOCKET_LIMIT_TARGET 1000U
+#define SOCKET_LIMIT_MIN 50U
 #define MAX_TIME_BETWEEN_TWO_POLLS \
   "network.sts.max_time_for_events_between_two_polls"
 #define POLL_BUSY_WAIT_PERIOD "network.sts.poll_busy_wait_period"
 #define POLL_BUSY_WAIT_PERIOD_TIMEOUT \
   "network.sts.poll_busy_wait_period_timeout"
 #define MAX_TIME_FOR_PR_CLOSE_DURING_SHUTDOWN \
   "network.sts.max_time_for_pr_close_during_shutdown"
 #define POLLABLE_EVENT_TIMEOUT "network.sts.pollable_event_timeout"
@@ -113,20 +114,48 @@ void nsSocketTransportService::SocketCon
     mPollStartEpoch = 0;
   }
 }
 
 //-----------------------------------------------------------------------------
 // ctor/dtor (called on the main/UI thread by the service manager)
 
 nsSocketTransportService::nsSocketTransportService()
-    : mPollableEventTimeout(TimeDuration::FromSeconds(6)),
+    : mRawThread(nullptr),
+      mInitialized(false),
+      mShuttingDown(false),
+      mLock("nsSocketTransportService::mLock"),
+      mOffline(false),
+      mGoingOffline(false),
+      mActiveListSize(SOCKET_LIMIT_MIN),
+      mIdleListSize(SOCKET_LIMIT_MIN),
+      mActiveCount(0),
+      mIdleCount(0),
+      mSentBytesCount(0),
+      mReceivedBytesCount(0),
+      mSendBufferSize(0),
+      mKeepaliveIdleTimeS(600),
+      mKeepaliveRetryIntervalS(1),
+      mKeepaliveProbeCount(kDefaultTCPKeepCount),
+      mKeepaliveEnabledPref(false),
+      mPollableEventTimeout(TimeDuration::FromSeconds(6)),
+      mServingPendingQueue(false),
+      mMaxTimePerPollIter(100),
       mMaxTimeForPrClosePref(PR_SecondsToInterval(5)),
+      mLastNetworkLinkChangeTime(0),
       mNetworkLinkChangeBusyWaitPeriod(PR_SecondsToInterval(50)),
-      mNetworkLinkChangeBusyWaitTimeout(PR_SecondsToInterval(7)) {
+      mNetworkLinkChangeBusyWaitTimeout(PR_SecondsToInterval(7)),
+      mSleepPhase(false),
+      mProbedMaxCount(false)
+#if defined(XP_WIN)
+      ,
+      mPolling(false)
+#endif
+      ,
+      mNotTrustedMitmDetected(false) {
   NS_ASSERTION(NS_IsMainThread(), "wrong thread");
 
   PR_CallOnce(&gMaxCountInitOnce, DiscoverMaxCount);
   mActiveList =
       (SocketContext*)moz_xmalloc(sizeof(SocketContext) * mActiveListSize);
   mIdleList =
       (SocketContext*)moz_xmalloc(sizeof(SocketContext) * mIdleListSize);
   mPollList =
--- a/netwerk/base/nsSocketTransportService2.h
+++ b/netwerk/base/nsSocketTransportService2.h
@@ -95,18 +95,16 @@ class nsSocketTransportService final : p
   NS_DECL_NSISOCKETTRANSPORTSERVICE
   NS_DECL_NSIROUTEDSOCKETTRANSPORTSERVICE
   NS_DECL_NSIEVENTTARGET_FULL
   NS_DECL_NSITHREADOBSERVER
   NS_DECL_NSIRUNNABLE
   NS_DECL_NSIOBSERVER
   NS_DECL_NSIDIRECTTASKDISPATCHER
 
-  static const uint32_t SOCKET_LIMIT_MIN = 50U;
-
   nsSocketTransportService();
 
   // Max Socket count may need to get initialized/used by nsHttpHandler
   // before this class is initialized.
   static uint32_t gMaxCount;
   static PRCallOnceType gMaxCountInitOnce;
   static PRStatus DiscoverMaxCount();
 
@@ -141,44 +139,44 @@ class nsSocketTransportService final : p
  private:
   //-------------------------------------------------------------------------
   // misc (any thread)
   //-------------------------------------------------------------------------
 
   // The value is guaranteed to be valid and not dangling while on the socket
   // thread as mThread is only ever reset after it's been shutdown.
   // This member should only ever be read on the socket thread.
-  nsIThread* mRawThread{nullptr};
+  nsIThread* mRawThread;
 
   // Returns mThread in a thread-safe manner.
   already_AddRefed<nsIThread> GetThreadSafely();
   // Same as above, but return mThread as a nsIDirectTaskDispatcher
   already_AddRefed<nsIDirectTaskDispatcher> GetDirectTaskDispatcherSafely();
 
   //-------------------------------------------------------------------------
   // initialization and shutdown (any thread)
   //-------------------------------------------------------------------------
 
-  Atomic<bool> mInitialized{false};
+  Atomic<bool> mInitialized;
   // indicates whether we are currently in the process of shutting down
-  Atomic<bool> mShuttingDown{false};
-  Mutex mLock{"nsSocketTransportService::mLock"};
+  Atomic<bool> mShuttingDown;
+  Mutex mLock;
   // Variables in the next section protected by mLock
 
   // mThread and mDirectTaskDispatcher are only ever modified on the main
   // thread. Will be set on Init and set to null after shutdown. You must access
   // mThread and mDirectTaskDispatcher outside the main thread via respectively
   // GetThreadSafely and GetDirectTaskDispatchedSafely().
   nsCOMPtr<nsIThread> mThread;
   // We store a pointer to mThread as a direct task dispatcher to avoid having
   // to do do_QueryInterface whenever we need to access the interface.
   nsCOMPtr<nsIDirectTaskDispatcher> mDirectTaskDispatcher;
   UniquePtr<PollableEvent> mPollableEvent;
-  bool mOffline{false};
-  bool mGoingOffline{false};
+  bool mOffline;
+  bool mGoingOffline;
 
   // Detaches all sockets.
   void Reset(bool aGuardLocals);
 
   nsresult ShutdownThread();
 
   //-------------------------------------------------------------------------
   // socket lists (socket thread only)
@@ -215,36 +213,36 @@ class nsSocketTransportService final : p
     // that mPollStartEpoch is not reset in between.  We have to manually
     // call this on every iteration over sockets to ensure the epoch reset.
     void MaybeResetEpoch();
   };
 
   SocketContext* mActiveList; /* mListSize entries */
   SocketContext* mIdleList;   /* mListSize entries */
 
-  uint32_t mActiveListSize{SOCKET_LIMIT_MIN};
-  uint32_t mIdleListSize{SOCKET_LIMIT_MIN};
-  uint32_t mActiveCount{0};
-  uint32_t mIdleCount{0};
+  uint32_t mActiveListSize;
+  uint32_t mIdleListSize;
+  uint32_t mActiveCount;
+  uint32_t mIdleCount;
 
   nsresult DetachSocket(SocketContext*, SocketContext*);
   nsresult AddToIdleList(SocketContext*);
   nsresult AddToPollList(SocketContext*);
   void RemoveFromIdleList(SocketContext*);
   void RemoveFromPollList(SocketContext*);
   void MoveToIdleList(SocketContext* sock);
   void MoveToPollList(SocketContext* sock);
 
   bool GrowActiveList();
   bool GrowIdleList();
   void InitMaxCount();
 
   // Total bytes number transfered through all the sockets except active ones
-  uint64_t mSentBytesCount{0};
-  uint64_t mReceivedBytesCount{0};
+  uint64_t mSentBytesCount;
+  uint64_t mReceivedBytesCount;
   //-------------------------------------------------------------------------
   // poll list (socket thread only)
   //
   // first element of the poll list is mPollableEvent (or null if the pollable
   // event cannot be created).
   //-------------------------------------------------------------------------
 
   PRPollDesc* mPollList; /* mListSize + 1 entries */
@@ -264,44 +262,44 @@ class nsSocketTransportService final : p
   // pending socket queue - see NotifyWhenCanAttachSocket
   //-------------------------------------------------------------------------
   AutoCleanLinkedList<LinkedRunnableEvent> mPendingSocketQueue;
 
   // Preference Monitor for SendBufferSize and Keepalive prefs.
   nsresult UpdatePrefs();
   static void UpdatePrefs(const char* aPref, void* aSelf);
   void UpdateSendBufferPref();
-  int32_t mSendBufferSize{0};
+  int32_t mSendBufferSize;
   // Number of seconds of connection is idle before first keepalive ping.
-  int32_t mKeepaliveIdleTimeS{600};
+  int32_t mKeepaliveIdleTimeS;
   // Number of seconds between retries should keepalive pings fail.
-  int32_t mKeepaliveRetryIntervalS{1};
+  int32_t mKeepaliveRetryIntervalS;
   // Number of keepalive probes to send.
-  int32_t mKeepaliveProbeCount{kDefaultTCPKeepCount};
+  int32_t mKeepaliveProbeCount;
   // True if TCP keepalive is enabled globally.
-  bool mKeepaliveEnabledPref{false};
+  bool mKeepaliveEnabledPref;
   // Timeout of pollable event signalling.
   TimeDuration mPollableEventTimeout;
 
-  Atomic<bool> mServingPendingQueue{false};
-  Atomic<int32_t, Relaxed> mMaxTimePerPollIter{100};
+  Atomic<bool> mServingPendingQueue;
+  Atomic<int32_t, Relaxed> mMaxTimePerPollIter;
   Atomic<PRIntervalTime, Relaxed> mMaxTimeForPrClosePref;
   // Timestamp of the last network link change event, tracked
   // also on child processes.
-  Atomic<PRIntervalTime, Relaxed> mLastNetworkLinkChangeTime{0};
+  Atomic<PRIntervalTime, Relaxed> mLastNetworkLinkChangeTime;
   // Preference for how long we do busy wait after network link
   // change has been detected.
   Atomic<PRIntervalTime, Relaxed> mNetworkLinkChangeBusyWaitPeriod;
   // Preference for the value of timeout for poll() we use during
   // the network link change event period.
   Atomic<PRIntervalTime, Relaxed> mNetworkLinkChangeBusyWaitTimeout;
 
   // Between a computer going to sleep and waking up the PR_*** telemetry
   // will be corrupted - so do not record it.
-  Atomic<bool, Relaxed> mSleepPhase{false};
+  Atomic<bool, Relaxed> mSleepPhase;
   nsCOMPtr<nsITimer> mAfterWakeUpTimer;
 
   // Lazily created array of forced port remappings.  The tuple members meaning
   // is exactly:
   // <0> the greater-or-equal port number of the range to remap
   // <1> the less-or-equal port number of the range to remap
   // <2> the port number to remap to, when the given port number falls to the
   // range
@@ -314,39 +312,39 @@ class nsSocketTransportService final : p
 
   void OnKeepaliveEnabledPrefChange();
   void NotifyKeepaliveEnabledPrefChange(SocketContext* sock);
 
   // Socket thread only for dynamically adjusting max socket size
 #if defined(XP_WIN)
   void ProbeMaxCount();
 #endif
-  bool mProbedMaxCount{false};
+  bool mProbedMaxCount;
 
   void AnalyzeConnection(nsTArray<SocketInfo>* data, SocketContext* context,
                          bool aActive);
 
   void ClosePrivateConnections();
   void DetachSocketWithGuard(bool aGuardLocals, SocketContext* socketList,
                              int32_t index);
 
   void MarkTheLastElementOfPendingQueue();
 
 #if defined(XP_WIN)
-  Atomic<bool> mPolling{false};
+  Atomic<bool> mPolling;
   nsCOMPtr<nsITimer> mPollRepairTimer;
   void StartPollWatchdog();
   void DoPollRepair();
   void StartPolling();
   void EndPolling();
 #endif
 
   void TryRepairPollableEvent();
 
-  bool mNotTrustedMitmDetected{false};
+  bool mNotTrustedMitmDetected;
 
   CopyableTArray<nsCOMPtr<nsISTSShutdownObserver>> mShutdownObservers;
 };
 
 extern nsSocketTransportService* gSocketTransportService;
 bool OnSocketThread();
 
 }  // namespace net
--- a/netwerk/base/nsStandardURL.cpp
+++ b/netwerk/base/nsStandardURL.cpp
@@ -200,17 +200,20 @@ const nsACString& nsStandardURL::nsSegme
 //----------------------------------------------------------------------------
 
 #ifdef DEBUG_DUMP_URLS_AT_SHUTDOWN
 static StaticMutex gAllURLsMutex;
 static LinkedList<nsStandardURL> gAllURLs;
 #endif
 
 nsStandardURL::nsStandardURL(bool aSupportsFileURL, bool aTrackURL)
-    : mURLType(URLTYPE_STANDARD),
+    : mDefaultPort(-1),
+      mPort(-1),
+      mDisplayHost(nullptr),
+      mURLType(URLTYPE_STANDARD),
       mSupportsFileURL(aSupportsFileURL),
       mCheckedIfHostA(false) {
   LOG(("Creating nsStandardURL @%p\n", this));
 
   // gInitialized changes value only once (false->true) on the main thread.
   // It's OK to race here because in the worst case we'll just
   // dispatch a noop runnable to the main thread.
   MOZ_ASSERT(gInitialized);
--- a/netwerk/base/nsStandardURL.h
+++ b/netwerk/base/nsStandardURL.h
@@ -69,20 +69,20 @@ class nsStandardURL : public nsIFileURL,
   static void InitGlobalObjects();
   static void ShutdownGlobalObjects();
 
  public: /* internal -- HPUX compiler can't handle this being private */
   //
   // location and length of an url segment relative to mSpec
   //
   struct URLSegment {
-    uint32_t mPos{0};
-    int32_t mLen{-1};
+    uint32_t mPos;
+    int32_t mLen;
 
-    URLSegment() = default;
+    URLSegment() : mPos(0), mLen(-1) {}
     URLSegment(uint32_t pos, int32_t len) : mPos(pos), mLen(len) {}
     URLSegment(const URLSegment& aCopy) = default;
     void Reset() {
       mPos = 0;
       mLen = -1;
     }
     // Merge another segment following this one to it if they're contiguous
     // Assumes we have something like "foo;bar" where this object is 'foo' and
@@ -260,18 +260,18 @@ class nsStandardURL : public nsIFileURL,
   // Asserts that the URL has sane values
   void SanityCheck();
 
   // Checks if the URL has a valid representation.
   bool IsValid();
 
   // mSpec contains the normalized version of the URL spec (UTF-8 encoded).
   nsCString mSpec;
-  int32_t mDefaultPort{-1};
-  int32_t mPort{-1};
+  int32_t mDefaultPort;
+  int32_t mPort;
 
   // url parts (relative to mSpec)
   URLSegment mScheme;
   URLSegment mAuthority;
   URLSegment mUsername;
   URLSegment mPassword;
   URLSegment mHost;
   URLSegment mPath;
@@ -441,17 +441,17 @@ class nsStandardURL : public nsIFileURL,
       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/nsStreamTransportService.cpp
+++ b/netwerk/base/nsStreamTransportService.cpp
@@ -36,44 +36,48 @@ class nsInputStreamTransport : public ns
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSITRANSPORT
   NS_DECL_NSIINPUTSTREAM
   NS_DECL_NSIASYNCINPUTSTREAM
   NS_DECL_NSIINPUTSTREAMCALLBACK
 
   nsInputStreamTransport(nsIInputStream* source, bool closeWhenDone)
-      : mSource(source), mCloseWhenDone(closeWhenDone) {
+      : mMutex("nsInputStreamTransport::mMutex"),
+        mSource(source),
+        mOffset(0),
+        mCloseWhenDone(closeWhenDone),
+        mInProgress(false) {
     mAsyncSource = do_QueryInterface(mSource);
   }
 
  private:
   virtual ~nsInputStreamTransport() = default;
 
-  Mutex mMutex{"nsInputStreamTransport::mMutex"};
+  Mutex mMutex;
 
   // This value is protected by mutex.
   nsCOMPtr<nsIInputStreamCallback> mAsyncWaitCallback;
 
   nsCOMPtr<nsIAsyncInputStream> mPipeIn;
 
   // while the copy is active, these members may only be accessed from the
   // nsIInputStream implementation.
   nsCOMPtr<nsITransportEventSink> mEventSink;
   nsCOMPtr<nsIInputStream> mSource;
 
   // It can be null.
   nsCOMPtr<nsIAsyncInputStream> mAsyncSource;
 
-  int64_t mOffset{0};
+  int64_t mOffset;
   const bool mCloseWhenDone;
 
   // this variable serves as a lock to prevent the state of the transport
   // from being modified once the copy is in progress.
-  bool mInProgress{false};
+  bool mInProgress;
 };
 
 NS_IMPL_ADDREF(nsInputStreamTransport);
 NS_IMPL_RELEASE(nsInputStreamTransport);
 
 NS_INTERFACE_MAP_BEGIN(nsInputStreamTransport)
   NS_INTERFACE_MAP_ENTRY(nsITransport)
   NS_INTERFACE_MAP_ENTRY(nsIInputStream)
@@ -239,17 +243,19 @@ nsInputStreamTransport::OnInputStreamRea
 }
 
 //-----------------------------------------------------------------------------
 // nsStreamTransportService
 //-----------------------------------------------------------------------------
 
 nsStreamTransportService::nsStreamTransportService()
     : mScheduledDelayedRunnables(
-          "nsStreamTransportService.mScheduledDelayedRunnables") {}
+          "nsStreamTransportService.mScheduledDelayedRunnables"),
+      mShutdownLock("nsStreamTransportService.mShutdownLock"),
+      mIsShutdown(false) {}
 
 nsStreamTransportService::~nsStreamTransportService() {
   NS_ASSERTION(!mPool, "thread pool wasn't shutdown");
 }
 
 nsresult nsStreamTransportService::Init() {
   mPool = new nsThreadPool();
 
--- a/netwerk/base/nsStreamTransportService.h
+++ b/netwerk/base/nsStreamTransportService.h
@@ -44,15 +44,15 @@ class nsStreamTransportService final : p
 
  private:
   ~nsStreamTransportService();
 
   nsCOMPtr<nsIThreadPool> mPool;
 
   DataMutex<nsTArray<RefPtr<DelayedRunnable>>> mScheduledDelayedRunnables;
 
-  mozilla::Mutex mShutdownLock{"nsStreamTransportService.mShutdownLock"};
-  bool mIsShutdown{false};
+  mozilla::Mutex mShutdownLock;
+  bool mIsShutdown;
 };
 
 }  // namespace net
 }  // namespace mozilla
 #endif
--- a/netwerk/base/nsSyncStreamListener.h
+++ b/netwerk/base/nsSyncStreamListener.h
@@ -20,23 +20,23 @@ class nsSyncStreamListener final : publi
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSISYNCSTREAMLISTENER
   NS_DECL_NSIINPUTSTREAM
 
   static already_AddRefed<nsISyncStreamListener> Create();
 
  private:
-  nsSyncStreamListener() = default;
+  nsSyncStreamListener() : mStatus(NS_OK), mKeepWaiting(false), mDone(false) {}
   ~nsSyncStreamListener() = default;
 
   nsresult Init();
 
   nsresult WaitForData();
 
   nsCOMPtr<nsIInputStream> mPipeIn;
   nsCOMPtr<nsIOutputStream> mPipeOut;
-  nsresult mStatus{NS_OK};
-  bool mKeepWaiting{false};
-  bool mDone{false};
+  nsresult mStatus;
+  bool mKeepWaiting;
+  bool mDone;
 };
 
 #endif  // nsSyncStreamListener_h__
--- a/netwerk/base/nsUDPSocket.cpp
+++ b/netwerk/base/nsUDPSocket.cpp
@@ -216,17 +216,25 @@ nsUDPMessage::GetRawData(JSContext* cx, 
 }
 
 FallibleTArray<uint8_t>& nsUDPMessage::GetDataAsTArray() { return mData; }
 
 //-----------------------------------------------------------------------------
 // nsUDPSocket
 //-----------------------------------------------------------------------------
 
-nsUDPSocket::nsUDPSocket() {
+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/base/nsUDPSocket.h
+++ b/netwerk/base/nsUDPSocket.h
@@ -53,28 +53,28 @@ class nsUDPSocket final : public nsASock
   nsresult LeaveMulticastInternal(const PRNetAddr& aAddr,
                                   const PRNetAddr& aIface);
   nsresult SetMulticastInterfaceInternal(const PRNetAddr& aIface);
 
   void CloseSocket();
 
   // lock protects access to mListener;
   // so mListener is not cleared while being used/locked.
-  Mutex mLock{"nsUDPSocket.mLock"};
-  PRFileDesc* mFD{nullptr};
+  Mutex mLock;
+  PRFileDesc* mFD;
   NetAddr mAddr;
   OriginAttributes mOriginAttributes;
   nsCOMPtr<nsIUDPSocketListener> mListener;
   nsCOMPtr<nsIUDPSocketSyncListener> mSyncListener;
   nsCOMPtr<nsIEventTarget> mListenerTarget;
-  bool mAttached{false};
+  bool mAttached;
   RefPtr<nsSocketTransportService> mSts;
 
-  uint64_t mByteReadCount{0};
-  uint64_t mByteWriteCount{0};
+  uint64_t mByteReadCount;
+  uint64_t mByteWriteCount;
 };
 
 //-----------------------------------------------------------------------------
 
 class nsUDPMessage : public nsIUDPMessage {
  public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsUDPMessage)
--- a/netwerk/cache/nsDeleteDir.cpp
+++ b/netwerk/cache/nsDeleteDir.cpp
@@ -27,17 +27,21 @@ class nsBlockOnBackgroundThreadEvent : p
     nsDeleteDir::gInstance->mCondVar.Notify();
     return NS_OK;
   }
 };
 
 nsDeleteDir* nsDeleteDir::gInstance = nullptr;
 
 nsDeleteDir::nsDeleteDir()
-    : mLock("nsDeleteDir.mLock"), mCondVar(mLock, "nsDeleteDir.mCondVar") {
+    : mLock("nsDeleteDir.mLock"),
+      mCondVar(mLock, "nsDeleteDir.mCondVar"),
+      mNotified(false),
+      mShutdownPending(false),
+      mStopDeleting(false) {
   NS_ASSERTION(gInstance == nullptr, "multiple nsCacheService instances!");
 }
 
 nsDeleteDir::~nsDeleteDir() { gInstance = nullptr; }
 
 nsresult nsDeleteDir::Init() {
   if (gInstance) return NS_ERROR_ALREADY_INITIALIZED;
 
--- a/netwerk/cache/nsDeleteDir.h
+++ b/netwerk/cache/nsDeleteDir.h
@@ -64,16 +64,16 @@ class nsDeleteDir {
   nsresult InitThread();
   void DestroyThread();
   nsresult PostTimer(void* arg, uint32_t delay);
   nsresult RemoveDir(nsIFile* file, bool* stopDeleting);
 
   static nsDeleteDir* gInstance;
   mozilla::Mutex mLock;
   mozilla::CondVar mCondVar;
-  bool mNotified{false};
+  bool mNotified;
   nsCOMArray<nsITimer> mTimers;
   nsCOMPtr<nsISerialEventTarget> mBackgroundET;
-  bool mShutdownPending{false};
-  bool mStopDeleting{false};
+  bool mShutdownPending;
+  bool mStopDeleting;
 };
 
 #endif  // nsDeleteDir_h__
--- a/netwerk/cache2/CacheEntry.cpp
+++ b/netwerk/cache2/CacheEntry.cpp
@@ -39,17 +39,18 @@ static uint32_t const ENTRY_NEEDS_REVALI
     nsICacheEntryOpenCallback::ENTRY_NEEDS_REVALIDATION;
 static uint32_t const ENTRY_NOT_WANTED =
     nsICacheEntryOpenCallback::ENTRY_NOT_WANTED;
 
 NS_IMPL_ISUPPORTS(CacheEntryHandle, nsICacheEntry)
 
 // CacheEntryHandle
 
-CacheEntryHandle::CacheEntryHandle(CacheEntry* aEntry) : mEntry(aEntry) {
+CacheEntryHandle::CacheEntryHandle(CacheEntry* aEntry)
+    : mEntry(aEntry), mClosed(false) {
 #ifdef DEBUG
   if (!mEntry->HandlesCount()) {
     // CacheEntry.mHandlesCount must go from zero to one only under
     // the service lock. Can access CacheStorageService::Self() w/o a check
     // since CacheEntry hrefs it.
     CacheStorageService::Self()->Lock().AssertCurrentThreadOwns();
   }
 #endif
@@ -196,26 +197,35 @@ NS_IMPL_ISUPPORTS(CacheEntry, nsIRunnabl
 uint64_t CacheEntry::GetNextId() {
   static Atomic<uint64_t, Relaxed> id(0);
   return ++id;
 }
 
 CacheEntry::CacheEntry(const nsACString& aStorageID, const nsACString& aURI,
                        const nsACString& aEnhanceID, bool aUseDisk,
                        bool aSkipSizeCheck, bool aPin)
-    : mURI(aURI),
+    : mFrecency(0),
+      mSortingExpirationTime(uint32_t(-1)),
+      mLock("CacheEntry"),
+      mFileStatus(NS_ERROR_NOT_INITIALIZED),
+      mURI(aURI),
       mEnhanceID(aEnhanceID),
       mStorageID(aStorageID),
       mUseDisk(aUseDisk),
       mSkipSizeCheck(aSkipSizeCheck),
+      mIsDoomed(false),
       mSecurityInfoLoaded(false),
       mPreventCallbacks(false),
       mHasData(false),
       mPinned(aPin),
       mPinningKnown(false),
+      mState(NOTLOADED),
+      mRegistration(NEVERREGISTERED),
+      mWriter(nullptr),
+      mUseCount(0),
       mCacheEntryId(GetNextId()) {
   LOG(("CacheEntry::CacheEntry [this=%p]", this));
 
   mService = CacheStorageService::Self();
 
   CacheStorageService::Self()->RecordMemoryOnlyEntry(this, !aUseDisk,
                                                      true /* overwrite */);
 }
--- a/netwerk/cache2/CacheEntry.h
+++ b/netwerk/cache2/CacheEntry.h
@@ -146,19 +146,18 @@ class CacheEntry final : public nsIRunna
                              const nsACString& aEnhanceID, nsIURI* aURI,
                              nsACString& aResult);
 
   static nsresult HashingKey(const nsACString& aStorageID,
                              const nsACString& aEnhanceID,
                              const nsACString& aURISpec, nsACString& aResult);
 
   // Accessed only on the service management thread
-  double mFrecency{0};
-  ::mozilla::Atomic<uint32_t, ::mozilla::Relaxed> mSortingExpirationTime{
-      uint32_t(-1)};
+  double mFrecency;
+  ::mozilla::Atomic<uint32_t, ::mozilla::Relaxed> mSortingExpirationTime;
 
   // Memory reporting
   size_t SizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
 
  private:
   virtual ~CacheEntry();
 
@@ -303,44 +302,44 @@ class CacheEntry final : public nsIRunna
   // When this entry is doomed the first time, this method removes
   // any force-valid timing info for this entry.
   void RemoveForcedValidity();
 
   already_AddRefed<CacheEntryHandle> ReopenTruncated(
       bool aMemoryOnly, nsICacheEntryOpenCallback* aCallback);
   void TransferCallbacks(CacheEntry& aFromEntry);
 
-  mozilla::Mutex mLock{"CacheEntry"};
+  mozilla::Mutex mLock;
 
   // Reflects the number of existing handles for this entry
   ::mozilla::ThreadSafeAutoRefCnt mHandlesCount;
 
   nsTArray<Callback> mCallbacks;
   nsCOMPtr<nsICacheEntryDoomCallback> mDoomCallback;
 
   RefPtr<CacheFile> mFile;
 
   // Using ReleaseAcquire since we only control access to mFile with this.
   // When mFileStatus is read and found success it is ensured there is mFile and
   // that it is after a successful call to Init().
-  Atomic<nsresult, ReleaseAcquire> mFileStatus{NS_ERROR_NOT_INITIALIZED};
+  ::mozilla::Atomic<nsresult, ::mozilla::ReleaseAcquire> mFileStatus;
   nsCString mURI;
   nsCString mEnhanceID;
   nsCString mStorageID;
 
   // mUseDisk, mSkipSizeCheck, mIsDoomed are plain "bool", not "bool:1",
   // so as to avoid bitfield races with the byte containing
   // mSecurityInfoLoaded et al.  See bug 1278524.
   //
   // Whether it's allowed to persist the data to disk
   bool const mUseDisk;
   // Whether it should skip max size check.
   bool const mSkipSizeCheck;
   // Set when entry is doomed with AsyncDoom() or DoomAlreadyRemoved().
-  bool mIsDoomed{false};
+  bool mIsDoomed;
 
   // Following flags are all synchronized with the cache entry lock.
 
   // Whether security info has already been looked up in metadata.
   bool mSecurityInfoLoaded : 1;
   // Prevents any callback invocation
   bool mPreventCallbacks : 1;
   // true: after load and an existing file, or after output stream has been
@@ -364,67 +363,67 @@ class CacheEntry final : public nsIRunna
     LOADING = 1,      // -> EMPTY | READY
     EMPTY = 2,        // -> WRITING
     WRITING = 3,      // -> EMPTY | READY
     READY = 4,        // -> REVALIDATING
     REVALIDATING = 5  // -> READY
   };
 
   // State of this entry.
-  EState mState{NOTLOADED};
+  EState mState;
 
   enum ERegistration {
     NEVERREGISTERED = 0,  // The entry has never been registered
     REGISTERED = 1,       // The entry is stored in the memory pool index
     DEREGISTERED = 2      // The entry has been removed from the pool
   };
 
   // Accessed only on the management thread.  Records the state of registration
   // this entry in the memory pool intermediate cache.
-  ERegistration mRegistration{NEVERREGISTERED};
+  ERegistration mRegistration;
 
   // If a new (empty) entry is requested to open an input stream before
   // output stream has been opened, we must open output stream internally
   // on CacheFile and hold until writer releases the entry or opens the output
   // stream for read (then we trade him mOutputStream).
   nsCOMPtr<nsIOutputStream> mOutputStream;
 
   // Weak reference to the current writter.  There can be more then one
   // writer at a time and OnHandleClosed() must be processed only for the
   // current one.
-  CacheEntryHandle* mWriter{nullptr};
+  CacheEntryHandle* mWriter;
 
   // Background thread scheduled operation.  Set (under the lock) one
   // of this flags to tell the background thread what to do.
   class Ops {
    public:
     static uint32_t const REGISTER = 1 << 0;
     static uint32_t const FRECENCYUPDATE = 1 << 1;
     static uint32_t const CALLBACKS = 1 << 2;
     static uint32_t const UNREGISTER = 1 << 3;
 
-    Ops() = default;
+    Ops() : mFlags(0) {}
     uint32_t Grab() {
       uint32_t flags = mFlags;
       mFlags = 0;
       return flags;
     }
     bool Set(uint32_t aFlags) {
       if (mFlags & aFlags) return false;
       mFlags |= aFlags;
       return true;
     }
 
    private:
-    uint32_t mFlags{0};
+    uint32_t mFlags;
   } mBackgroundOperations;
 
   nsCOMPtr<nsISupports> mSecurityInfo;
   mozilla::TimeStamp mLoadStart;
-  uint32_t mUseCount{0};
+  uint32_t mUseCount;
 
   const uint64_t mCacheEntryId;
 };
 
 class CacheEntryHandle final : public nsICacheEntry {
  public:
   explicit CacheEntryHandle(CacheEntry* aEntry);
   CacheEntry* Entry() const { return mEntry; }
@@ -543,17 +542,17 @@ class CacheEntryHandle final : public ns
   NS_IMETHOD Dismiss() override;
 
  private:
   virtual ~CacheEntryHandle();
   RefPtr<CacheEntry> mEntry;
 
   // This is |false| until Dismiss() was called and prevents OnHandleClosed
   // being called more than once.
-  Atomic<bool, ReleaseAcquire> mClosed{false};
+  Atomic<bool, ReleaseAcquire> mClosed;
 };
 
 class CacheOutputCloseListener final : public Runnable {
  public:
   void OnOutputClosed();
 
  private:
   friend class CacheEntry;
--- a/netwerk/cache2/CacheFile.cpp
+++ b/netwerk/cache2/CacheFile.cpp
@@ -155,17 +155,37 @@ NS_IMPL_RELEASE(CacheFile)
 NS_INTERFACE_MAP_BEGIN(CacheFile)
   NS_INTERFACE_MAP_ENTRY(mozilla::net::CacheFileChunkListener)
   NS_INTERFACE_MAP_ENTRY(mozilla::net::CacheFileIOListener)
   NS_INTERFACE_MAP_ENTRY(mozilla::net::CacheFileMetadataListener)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports,
                                    mozilla::net::CacheFileChunkListener)
 NS_INTERFACE_MAP_END
 
-CacheFile::CacheFile() { LOG(("CacheFile::CacheFile() [this=%p]", this)); }
+CacheFile::CacheFile()
+    : mLock("CacheFile.mLock"),
+      mOpeningFile(false),
+      mReady(false),
+      mMemoryOnly(false),
+      mSkipSizeCheck(false),
+      mOpenAsMemoryOnly(false),
+      mPinned(false),
+      mPriority(false),
+      mDataAccessed(false),
+      mDataIsDirty(false),
+      mWritingMetadata(false),
+      mPreloadWithoutInputStreams(true),
+      mPreloadChunkCount(0),
+      mStatus(NS_OK),
+      mDataSize(-1),
+      mAltDataOffset(-1),
+      mKill(false),
+      mOutput(nullptr) {
+  LOG(("CacheFile::CacheFile() [this=%p]", this));
+}
 
 CacheFile::~CacheFile() {
   LOG(("CacheFile::~CacheFile() [this=%p]", this));
 
   MutexAutoLock lock(mLock);
   if (!mMemoryOnly && mReady && !mKill) {
     // mReady flag indicates we have metadata plus in a valid state.
     WriteMetadataIfNeededLocked(true);
--- a/netwerk/cache2/CacheFile.h
+++ b/netwerk/cache2/CacheFile.h
@@ -184,60 +184,59 @@ class CacheFile final : public CacheFile
 
   nsresult PadChunkWithZeroes(uint32_t aChunkIdx);
 
   void SetError(nsresult aStatus);
   nsresult SetAltMetadata(const char* aAltMetadata);
 
   nsresult InitIndexEntry();
 
-  mozilla::Mutex mLock{"CacheFile.mLock"};
-  bool mOpeningFile{false};
-  bool mReady{false};
-  bool mMemoryOnly{false};
-  bool mSkipSizeCheck{false};
-  bool mOpenAsMemoryOnly{false};
-  bool mPinned{false};
-  bool mPriority{false};
-  bool mDataAccessed{false};
-  bool mDataIsDirty{false};
-  bool mWritingMetadata{false};
-  bool mPreloadWithoutInputStreams{true};
-  uint32_t mPreloadChunkCount{0};
-  nsresult mStatus{NS_OK};
-  // Size of the whole data including eventual alternative data represenation.
-  int64_t mDataSize{-1};
-
-  // If there is alternative data present, it contains size of the original
-  // data, i.e. offset where alternative data starts. Otherwise it is -1.
-  int64_t mAltDataOffset{-1};
-
+  mozilla::Mutex mLock;
+  bool mOpeningFile;
+  bool mReady;
+  bool mMemoryOnly;
+  bool mSkipSizeCheck;
+  bool mOpenAsMemoryOnly;
+  bool mPinned;
+  bool mPriority;
+  bool mDataAccessed;
+  bool mDataIsDirty;
+  bool mWritingMetadata;
+  bool mPreloadWithoutInputStreams;
+  uint32_t mPreloadChunkCount;
+  nsresult mStatus;
+  int64_t mDataSize;       // Size of the whole data including eventual
+                           // alternative data represenation.
+  int64_t mAltDataOffset;  // If there is alternative data present, it
+                           // contains size of the original data, i.e.
+                           // offset where alternative data starts.
+                           // Otherwise it is -1.
   nsCString mKey;
   nsCString mAltDataType;  // The type of the saved alt-data. May be empty.
 
   RefPtr<CacheFileHandle> mHandle;
   RefPtr<CacheFileMetadata> mMetadata;
   nsCOMPtr<CacheFileListener> mListener;
   nsCOMPtr<CacheFileIOListener> mDoomAfterOpenListener;
-  Atomic<bool, Relaxed> mKill{false};
+  Atomic<bool, Relaxed> mKill;
 
   nsRefPtrHashtable<nsUint32HashKey, CacheFileChunk> mChunks;
   nsClassHashtable<nsUint32HashKey, ChunkListeners> mChunkListeners;
   nsRefPtrHashtable<nsUint32HashKey, CacheFileChunk> mCachedChunks;
   // We can truncate data only if there is no input/output stream beyond the
   // truncate position, so only unused chunks can be thrown away. But it can
   // happen that we need to throw away a chunk that is still in mChunks (i.e.
   // an active chunk) because deactivation happens with a small delay. We cannot
   // delete such chunk immediately but we need to ensure that such chunk won't
   // be returned by GetChunkLocked, so we move this chunk into mDiscardedChunks
   // and mark it as discarded.
   nsTArray<RefPtr<CacheFileChunk>> mDiscardedChunks;
 
   nsTArray<CacheFileInputStream*> mInputs;
-  CacheFileOutputStream* mOutput{nullptr};
+  CacheFileOutputStream* mOutput;
 
   nsTArray<RefPtr<nsISupports>> mObjsToRelease;
 };
 
 class CacheFileAutoLock {
  public:
   explicit CacheFileAutoLock(CacheFile* aFile) : mFile(aFile), mLocked(true) {
     mFile->Lock();
--- a/netwerk/cache2/CacheFileContextEvictor.cpp
+++ b/netwerk/cache2/CacheFileContextEvictor.cpp
@@ -23,17 +23,18 @@
 namespace mozilla::net {
 
 #define CONTEXT_EVICTION_PREFIX "ce_"
 const uint32_t kContextEvictionPrefixLength =
     sizeof(CONTEXT_EVICTION_PREFIX) - 1;
 
 bool CacheFileContextEvictor::sDiskAlreadySearched = false;
 
-CacheFileContextEvictor::CacheFileContextEvictor() {
+CacheFileContextEvictor::CacheFileContextEvictor()
+    : mEvicting(false), mIndexIsUpToDate(false) {
   LOG(("CacheFileContextEvictor::CacheFileContextEvictor() [this=%p]", this));
 }
 
 CacheFileContextEvictor::~CacheFileContextEvictor() {
   LOG(("CacheFileContextEvictor::~CacheFileContextEvictor() [this=%p]", this));
 }
 
 nsresult CacheFileContextEvictor::Init(nsIFile* aCacheDirectory) {
--- a/netwerk/cache2/CacheFileContextEvictor.h
+++ b/netwerk/cache2/CacheFileContextEvictor.h
@@ -74,22 +74,22 @@ class CacheFileContextEvictor {
                           const nsAString& aOrigin, nsIFile** _retval);
 
   void CreateIterators();
   void CloseIterators();
   void StartEvicting();
   void EvictEntries();
 
   // Whether eviction is in progress
-  bool mEvicting{false};
+  bool mEvicting;
   // Whether index is up to date. We wait with eviction until the index finishes
   // update process when it is outdated. NOTE: We also stop eviction in progress
   // when the index is found outdated, the eviction is restarted again once the
   // update process finishes.
-  bool mIndexIsUpToDate{false};
+  bool mIndexIsUpToDate;
   // Whether we already tried to restore unfinished jobs from previous run after
   // startup.
   static bool sDiskAlreadySearched;
   // Array of contexts being evicted.
   nsTArray<UniquePtr<CacheFileContextEvictorEntry>> mEntries;
   nsCOMPtr<nsIFile> mCacheDirectory;
   nsCOMPtr<nsIFile> mEntriesDir;
 };
--- a/netwerk/cache2/CacheFileIOManager.cpp
+++ b/netwerk/cache2/CacheFileIOManager.cpp
@@ -512,17 +512,19 @@ size_t CacheFileHandles::SizeOfExcluding
   return mTable.SizeOfExcludingThis(mallocSizeOf);
 }
 
 // Events
 
 class ShutdownEvent : public Runnable {
  public:
   ShutdownEvent()
-      : Runnable("net::ShutdownEvent"), mMonitor("ShutdownEvent.mMonitor") {}
+      : Runnable("net::ShutdownEvent"),
+        mMonitor("ShutdownEvent.mMonitor"),
+        mNotified(false) {}
 
  protected:
   ~ShutdownEvent() = default;
 
  public:
   NS_IMETHOD Run() override {
     MonitorAutoLock mon(mMonitor);
 
@@ -558,17 +560,17 @@ class ShutdownEvent : public Runnable {
         MonitorAutoUnlock unmon(mMonitor);  // Prevent delays
         CacheFileIOManager::gInstance->mIOThread->CancelBlockingIO();
       }
     }
   }
 
  protected:
   mozilla::Monitor mMonitor;
-  bool mNotified{false};
+  bool mNotified;
 };
 
 // Class responsible for reporting IO performance stats
 class IOPerfReportEvent {
  public:
   explicit IOPerfReportEvent(CacheFileUtils::CachePerfStats::EDataType aType)
       : mType(aType), mEventCounter(0) {}
 
@@ -1097,18 +1099,22 @@ class MetadataWriteScheduleEvent : publi
   }
 };
 
 StaticRefPtr<CacheFileIOManager> CacheFileIOManager::gInstance;
 
 NS_IMPL_ISUPPORTS(CacheFileIOManager, nsITimerCallback, nsINamed)
 
 CacheFileIOManager::CacheFileIOManager()
-
-{
+    : mShuttingDown(false),
+      mTreeCreated(false),
+      mTreeCreationFailed(false),
+      mOverLimitEvicting(false),
+      mCacheSizeOnHardLimit(false),
+      mRemovingTrashDirs(false) {
   LOG(("CacheFileIOManager::CacheFileIOManager [this=%p]", this));
   MOZ_ASSERT(!gInstance, "multiple CacheFileIOManager instances!");
 }
 
 CacheFileIOManager::~CacheFileIOManager() {
   LOG(("CacheFileIOManager::~CacheFileIOManager [this=%p]", this));
 }
 
--- a/netwerk/cache2/CacheFileIOManager.h
+++ b/netwerk/cache2/CacheFileIOManager.h
@@ -437,39 +437,39 @@ class CacheFileIOManager final : public 
   // Memory reporting (private part)
   size_t SizeOfExcludingThisInternal(mozilla::MallocSizeOf mallocSizeOf) const;
 
   static StaticRefPtr<CacheFileIOManager> gInstance;
 
   TimeStamp mStartTime;
   // Set true on the IO thread, CLOSE level as part of the internal shutdown
   // procedure.
-  bool mShuttingDown{false};
+  bool mShuttingDown;
   RefPtr<CacheIOThread> mIOThread;
   nsCOMPtr<nsIFile> mCacheDirectory;
 #if defined(MOZ_WIDGET_ANDROID)
   // On Android we add the active profile directory name between the path
   // and the 'cache2' leaf name.  However, to delete any leftover data from
   // times before we were doing it, we still need to access the directory
   // w/o the profile name in the path.  Here it is stored.
   nsCOMPtr<nsIFile> mCacheProfilelessDirectory;
 #endif
-  bool mTreeCreated{false};
-  bool mTreeCreationFailed{false};
+  bool mTreeCreated;
+  bool mTreeCreationFailed;
   CacheFileHandles mHandles;
   nsTArray<CacheFileHandle*> mHandlesByLastUsed;
   nsTArray<CacheFileHandle*> mSpecialHandles;
   nsTArray<RefPtr<CacheFile> > mScheduledMetadataWrites;
   nsCOMPtr<nsITimer> mMetadataWritesTimer;
-  bool mOverLimitEvicting{false};
+  bool mOverLimitEvicting;
   // When overlimit eviction is too slow and cache size reaches 105% of the
   // limit, this flag is set and no other content is cached to prevent
   // uncontrolled cache growing.
-  bool mCacheSizeOnHardLimit{false};
-  bool mRemovingTrashDirs{false};
+  bool mCacheSizeOnHardLimit;
+  bool mRemovingTrashDirs;
   nsCOMPtr<nsITimer> mTrashTimer;
   nsCOMPtr<nsIFile> mTrashDir;
   nsCOMPtr<nsIDirectoryEnumerator> mTrashDirEnumerator;
   nsTArray<nsCString> mFailedTrashDirs;
   RefPtr<CacheFileContextEvictor> mContextEvictor;
   TimeStamp mLastSmartSizeTime;
 };
 
--- a/netwerk/cache2/CacheFileMetadata.cpp
+++ b/netwerk/cache2/CacheFileMetadata.cpp
@@ -37,17 +37,24 @@ namespace mozilla::net {
 #define NOW_SECONDS() (uint32_t(PR_Now() / PR_USEC_PER_SEC))
 
 NS_IMPL_ISUPPORTS(CacheFileMetadata, CacheFileIOListener)
 
 CacheFileMetadata::CacheFileMetadata(CacheFileHandle* aHandle,
                                      const nsACString& aKey)
     : CacheMemoryConsumer(NORMAL),
       mHandle(aHandle),
+      mHashArray(nullptr),
+      mHashArraySize(0),
+      mHashCount(0),
       mOffset(-1),
+      mBuf(nullptr),
+      mBufSize(0),
+      mWriteBuf(nullptr),
+      mElementsSize(0),
       mIsDirty(false),
       mAnonymous(false),
       mAllocExactSize(false),
       mFirstRead(true) {
   LOG(("CacheFileMetadata::CacheFileMetadata() [this=%p, handle=%p, key=%s]",
        this, aHandle, PromiseFlatCString(aKey).get()));
 
   memset(&mMetaHdr, 0, sizeof(CacheFileMetadataHeader));
@@ -58,16 +65,25 @@ CacheFileMetadata::CacheFileMetadata(Cac
   DebugOnly<nsresult> rv{};
   rv = ParseKey(aKey);
   MOZ_ASSERT(NS_SUCCEEDED(rv));
 }
 
 CacheFileMetadata::CacheFileMetadata(bool aMemoryOnly, bool aPinned,
                                      const nsACString& aKey)
     : CacheMemoryConsumer(aMemoryOnly ? MEMORY_ONLY : NORMAL),
+      mHandle(nullptr),
+      mHashArray(nullptr),
+      mHashArraySize(0),
+      mHashCount(0),
+      mOffset(0),
+      mBuf(nullptr),
+      mBufSize(0),
+      mWriteBuf(nullptr),
+      mElementsSize(0),
       mIsDirty(true),
       mAnonymous(false),
       mAllocExactSize(false),
       mFirstRead(true) {
   LOG(("CacheFileMetadata::CacheFileMetadata() [this=%p, key=%s]", this,
        PromiseFlatCString(aKey).get()));
 
   memset(&mMetaHdr, 0, sizeof(CacheFileMetadataHeader));
@@ -81,16 +97,25 @@ CacheFileMetadata::CacheFileMetadata(boo
 
   DebugOnly<nsresult> rv{};
   rv = ParseKey(aKey);
   MOZ_ASSERT(NS_SUCCEEDED(rv));
 }
 
 CacheFileMetadata::CacheFileMetadata()
     : CacheMemoryConsumer(DONT_REPORT /* This is a helper class */),
+      mHandle(nullptr),
+      mHashArray(nullptr),
+      mHashArraySize(0),
+      mHashCount(0),
+      mOffset(0),
+      mBuf(nullptr),
+      mBufSize(0),
+      mWriteBuf(nullptr),
+      mElementsSize(0),
       mIsDirty(false),
       mAnonymous(false),
       mAllocExactSize(false),
       mFirstRead(true) {
   LOG(("CacheFileMetadata::CacheFileMetadata() [this=%p]", this));
 
   memset(&mMetaHdr, 0, sizeof(CacheFileMetadataHeader));
 }
--- a/netwerk/cache2/CacheFileMetadata.h
+++ b/netwerk/cache2/CacheFileMetadata.h
@@ -207,26 +207,26 @@ class CacheFileMetadata final : public C
   nsresult ParseMetadata(uint32_t aMetaOffset, uint32_t aBufOffset,
                          bool aHaveKey);
   nsresult CheckElements(const char* aBuf, uint32_t aSize);
   nsresult EnsureBuffer(uint32_t aSize);
   nsresult ParseKey(const nsACString& aKey);
 
   RefPtr<CacheFileHandle> mHandle;
   nsCString mKey;
-  CacheHash::Hash16_t* mHashArray{nullptr};
-  uint32_t mHashArraySize{0};
-  uint32_t mHashCount{0};
-  int64_t mOffset{0};
-  // used for parsing, then points to elements
-  char* mBuf{nullptr};
-  uint32_t mBufSize{0};
-  char* mWriteBuf{nullptr};
+  CacheHash::Hash16_t* mHashArray;
+  uint32_t mHashArraySize;
+  uint32_t mHashCount;
+  int64_t mOffset;
+  char* mBuf;  // used for parsing, then points
+               // to elements
+  uint32_t mBufSize;
+  char* mWriteBuf;
   CacheFileMetadataHeader mMetaHdr{0};
-  uint32_t mElementsSize{0};
+  uint32_t mElementsSize;
   bool mIsDirty : 1;
   bool mAnonymous : 1;
   bool mAllocExactSize : 1;
   bool mFirstRead : 1;
   mozilla::OriginAttributes mOriginAttributes;
   mozilla::TimeStamp mReadStart;
   nsCOMPtr<CacheFileMetadataListener> mListener;
 };
--- a/netwerk/cache2/CacheHashUtils.cpp
+++ b/netwerk/cache2/CacheHashUtils.cpp
@@ -119,17 +119,25 @@ CacheHash::Hash32_t CacheHash::Hash(cons
 CacheHash::Hash16_t CacheHash::Hash16(const char* aData, uint32_t aSize,
                                       uint32_t aInitval) {
   Hash32_t hash = Hash(aData, aSize, aInitval);
   return (hash & 0xFFFF);
 }
 
 NS_IMPL_ISUPPORTS0(CacheHash)
 
-CacheHash::CacheHash(uint32_t aInitval) : mC(aInitval) {}
+CacheHash::CacheHash(uint32_t aInitval)
+    : mA(0x9e3779b9),
+      mB(0x9e3779b9),
+      mC(aInitval),
+      mPos(0),
+      mBuf(0),
+      mBufPos(0),
+      mLength(0),
+      mFinalized(false) {}
 
 void CacheHash::Feed(uint32_t aVal, uint8_t aLen) {
   switch (mPos) {
     case 0:
       mA += aVal;
       mPos++;
       break;
 
--- a/netwerk/cache2/CacheHashUtils.h
+++ b/netwerk/cache2/CacheHashUtils.h
@@ -44,24 +44,22 @@ class CacheHash : public nsISupports {
   Hash32_t GetHash();
   Hash16_t GetHash16();
 
  private:
   virtual ~CacheHash() = default;
 
   void Feed(uint32_t aVal, uint8_t aLen = 4);
 
-  static const uint32_t kGoldenRation = 0x9e3779b9;
-
-  uint32_t mA{kGoldenRation}, mB{kGoldenRation}, mC;
-  uint8_t mPos{0};
-  uint32_t mBuf{0};
-  uint8_t mBufPos{0};
-  uint32_t mLength{0};
-  bool mFinalized{false};
+  uint32_t mA, mB, mC;
+  uint8_t mPos;
+  uint32_t mBuf;
+  uint8_t mBufPos;
+  uint32_t mLength;
+  bool mFinalized;
 };
 
 using OriginAttrsHash = uint64_t;
 
 OriginAttrsHash GetOriginAttrsHash(const mozilla::OriginAttributes& aOA);
 
 }  // namespace net
 }  // namespace mozilla
--- a/netwerk/cache2/CacheIOThread.cpp
+++ b/netwerk/cache2/CacheIOThread.cpp
@@ -201,17 +201,32 @@ void BlockingIOWatcher::NotifyOperationD
 #endif
 
 }  // namespace detail
 
 CacheIOThread* CacheIOThread::sSelf = nullptr;
 
 NS_IMPL_ISUPPORTS(CacheIOThread, nsIThreadObserver)
 
-CacheIOThread::CacheIOThread() {
+CacheIOThread::CacheIOThread()
+    : mMonitor("CacheIOThread"),
+      mThread(nullptr),
+      mXPCOMThread(nullptr),
+      mLowestLevelWaiting(LAST_LEVEL),
+      mCurrentlyExecutingLevel(0),
+      mHasXPCOMEvents(false),
+      mRerunCurrentEvent(false),
+      mShutdown(false),
+      mIOCancelableEvents(0),
+      mEventCounter(0)
+#ifdef DEBUG
+      ,
+      mInsideLoop(true)
+#endif
+{
   for (auto& item : mQueueLength) {
     item = 0;
   }
 
   sSelf = this;
 }
 
 CacheIOThread::~CacheIOThread() {
--- a/netwerk/cache2/CacheIOThread.h
+++ b/netwerk/cache2/CacheIOThread.h
@@ -106,42 +106,42 @@ class CacheIOThread final : public nsITh
   void LoopOneLevel(uint32_t aLevel);
   bool EventsPending(uint32_t aLastLevel = LAST_LEVEL);
   nsresult DispatchInternal(already_AddRefed<nsIRunnable> aRunnable,
                             uint32_t aLevel);
   bool YieldInternal();
 
   static CacheIOThread* sSelf;
 
-  mozilla::Monitor mMonitor{"CacheIOThread"};
-  PRThread* mThread{nullptr};
+  mozilla::Monitor mMonitor;
+  PRThread* mThread;
   UniquePtr<detail::BlockingIOWatcher> mBlockingIOWatcher;
-  Atomic<nsIThread*> mXPCOMThread{nullptr};
-  Atomic<uint32_t, Relaxed> mLowestLevelWaiting{LAST_LEVEL};
-  uint32_t mCurrentlyExecutingLevel{0};
+  Atomic<nsIThread*> mXPCOMThread;
+  Atomic<uint32_t, Relaxed> mLowestLevelWaiting;
+  uint32_t mCurrentlyExecutingLevel;
 
   // Keeps the length of the each event queue, since LoopOneLevel moves all
   // events into a local array.
   Atomic<int32_t> mQueueLength[LAST_LEVEL];
 
   EventQueue mEventQueue[LAST_LEVEL];
   // Raised when nsIEventTarget.Dispatch() is called on this thread
-  Atomic<bool, Relaxed> mHasXPCOMEvents{false};
+  Atomic<bool, Relaxed> mHasXPCOMEvents;
   // See YieldAndRerun() above
-  bool mRerunCurrentEvent{false};
+  bool mRerunCurrentEvent;
   // Signal to process all pending events and then shutdown
   // Synchronized by mMonitor
-  bool mShutdown{false};
+  bool mShutdown;
   // If > 0 there is currently an I/O operation on the thread that
   // can be canceled when after shutdown, see the Shutdown() method
   // for usage. Made a counter to allow nesting of the Cancelable class.
-  Atomic<uint32_t, Relaxed> mIOCancelableEvents{0};
+  Atomic<uint32_t, Relaxed> mIOCancelableEvents;
   // Event counter that increases with every event processed.
-  Atomic<uint32_t, Relaxed> mEventCounter{0};
+  Atomic<uint32_t, Relaxed> mEventCounter;
 #ifdef DEBUG
-  bool mInsideLoop{true};
+  bool mInsideLoop;
 #endif
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif
--- a/netwerk/cache2/CacheIndex.cpp
+++ b/netwerk/cache2/CacheIndex.cpp
@@ -244,18 +244,33 @@ NS_IMPL_ADDREF(CacheIndex)
 NS_IMPL_RELEASE(CacheIndex)
 
 NS_INTERFACE_MAP_BEGIN(CacheIndex)
   NS_INTERFACE_MAP_ENTRY(mozilla::net::CacheFileIOListener)
   NS_INTERFACE_MAP_ENTRY(nsIRunnable)
 NS_INTERFACE_MAP_END
 
 CacheIndex::CacheIndex()
-
-{
+    : mState(INITIAL),
+      mShuttingDown(false),
+      mIndexNeedsUpdate(false),
+      mRemovingAll(false),
+      mIndexOnDiskIsValid(false),
+      mDontMarkIndexClean(false),
+      mIndexTimeStamp(0),
+      mUpdateEventPending(false),
+      mSkipEntries(0),
+      mProcessEntries(0),
+      mRWBuf(nullptr),
+      mRWBufSize(0),
+      mRWBufPos(0),
+      mRWPending(false),
+      mJournalReadSuccessfully(false),
+      mAsyncGetDiskConsumptionBlocked(false),
+      mTotalBytesWritten(0) {
   sLock.AssertCurrentThreadOwns();
   LOG(("CacheIndex::CacheIndex [this=%p]", this));
   MOZ_ASSERT(!gInstance, "multiple CacheIndex instances!");
 }
 
 CacheIndex::~CacheIndex() {
   sLock.AssertCurrentThreadOwns();
   LOG(("CacheIndex::~CacheIndex [this=%p]", this));
--- a/netwerk/cache2/CacheIndex.h
+++ b/netwerk/cache2/CacheIndex.h
@@ -70,36 +70,42 @@ static_assert(sizeof(CacheIndexHeader::m
                       sizeof(CacheIndexHeader::mIsDirty) +
                       sizeof(CacheIndexHeader::mKBWritten) ==
                   sizeof(CacheIndexHeader),
               "Unexpected sizeof(CacheIndexHeader)!");
 
 #pragma pack(push, 1)
 struct CacheIndexRecord {
   SHA1Sum::Hash mHash{};
-  uint32_t mFrecency{0};
-  OriginAttrsHash mOriginAttrsHash{0};
-  uint16_t mOnStartTime{kIndexTimeNotAvailable};
-  uint16_t mOnStopTime{kIndexTimeNotAvailable};
-  uint8_t mContentType{nsICacheEntry::CONTENT_TYPE_UNKNOWN};
+  uint32_t mFrecency;
+  OriginAttrsHash mOriginAttrsHash;
+  uint16_t mOnStartTime;
+  uint16_t mOnStopTime;
+  uint8_t mContentType;
 
   /*
    *    1000 0000 0000 0000 0000 0000 0000 0000 : initialized
    *    0100 0000 0000 0000 0000 0000 0000 0000 : anonymous
    *    0010 0000 0000 0000 0000 0000 0000 0000 : removed
    *    0001 0000 0000 0000 0000 0000 0000 0000 : dirty
    *    0000 1000 0000 0000 0000 0000 0000 0000 : fresh
    *    0000 0100 0000 0000 0000 0000 0000 0000 : pinned
    *    0000 0010 0000 0000 0000 0000 0000 0000 : has cached alt data
    *    0000 0001 0000 0000 0000 0000 0000 0000 : reserved
    *    0000 0000 1111 1111 1111 1111 1111 1111 : file size (in kB)
    */
-  uint32_t mFlags{0};
+  uint32_t mFlags;
 
-  CacheIndexRecord() = default;
+  CacheIndexRecord()
+      : mFrecency(0),
+        mOriginAttrsHash(0),
+        mOnStartTime(kIndexTimeNotAvailable),
+        mOnStopTime(kIndexTimeNotAvailable),
+        mContentType(nsICacheEntry::CONTENT_TYPE_UNKNOWN),
+        mFlags(0) {}
 };
 #pragma pack(pop)
 
 static_assert(sizeof(CacheIndexRecord::mHash) +
                       sizeof(CacheIndexRecord::mFrecency) +
                       sizeof(CacheIndexRecord::mOriginAttrsHash) +
                       sizeof(CacheIndexRecord::mOnStartTime) +
                       sizeof(CacheIndexRecord::mOnStopTime) +
@@ -480,17 +486,30 @@ class CacheIndexEntryUpdate : public Cac
   static const uint32_t kOnStartTimeUpdatedMask = 0x00000010;
   static const uint32_t kOnStopTimeUpdatedMask = 0x00000020;
 
   uint32_t mUpdateFlags;
 };
 
 class CacheIndexStats {
  public:
-  CacheIndexStats() {
+  CacheIndexStats()
+      : mCount(0),
+        mNotInitialized(0),
+        mRemoved(0),
+        mDirty(0),
+        mFresh(0),
+        mEmpty(0),
+        mSize(0)
+#ifdef DEBUG
+        ,
+        mStateLogged(false),
+        mDisableLogging(false)
+#endif
+  {
     for (uint32_t i = 0; i < nsICacheEntry::CONTENT_TYPE_LAST; ++i) {
       mCountByType[i] = 0;
       mSizeByType[i] = 0;
     }
   }
 
   bool operator==(const CacheIndexStats& aOther) const {
     for (uint32_t i = 0; i < nsICacheEntry::CONTENT_TYPE_LAST; ++i) {
@@ -665,35 +684,35 @@ class CacheIndexStats {
     if (!mDisableLogging) {
       LOG(("CacheIndexStats::AfterChange()"));
       Log();
     }
 #endif
   }
 
  private:
-  uint32_t mCount{0};
+  uint32_t mCount;
   uint32_t mCountByType[nsICacheEntry::CONTENT_TYPE_LAST]{0};
-  uint32_t mNotInitialized{0};
-  uint32_t mRemoved{0};
-  uint32_t mDirty{0};
-  uint32_t mFresh{0};
-  uint32_t mEmpty{0};
-  uint32_t mSize{0};
+  uint32_t mNotInitialized;
+  uint32_t mRemoved;
+  uint32_t mDirty;
+  uint32_t mFresh;
+  uint32_t mEmpty;
+  uint32_t mSize;
   uint32_t mSizeByType[nsICacheEntry::CONTENT_TYPE_LAST]{0};
 #ifdef DEBUG
   // We completely remove the data about an entry from the stats in
   // BeforeChange() and set this flag to true. The entry is then modified,
   // deleted or created and the data is again put into the stats and this flag
   // set to false. Statistics must not be read during this time since the
   // information is not correct.
-  bool mStateLogged{false};
+  bool mStateLogged;
 
   // Disables logging in this instance of CacheIndexStats
-  bool mDisableLogging{false};
+  bool mDisableLogging;
 #endif
 };
 
 class CacheIndex final : public CacheFileIOListener, public nsIRunnable {
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
 
@@ -1042,75 +1061,75 @@ class CacheIndex final : public CacheFil
   // stats.
   void DoTelemetryReport();
 
   static mozilla::StaticRefPtr<CacheIndex> gInstance;
   static StaticMutex sLock;
 
   nsCOMPtr<nsIFile> mCacheDirectory;
 
-  EState mState{INITIAL};
+  EState mState;
   // Timestamp of time when the index was initialized. We use it to delay
   // initial update or build of index.
   TimeStamp mStartTime;
   // Set to true in PreShutdown(), it is checked on variaous places to prevent
   // starting any process (write, update, etc.) during shutdown.
-  bool mShuttingDown{false};
+  bool mShuttingDown;
   // When set to true, update process should start as soon as possible. This
   // flag is set whenever we find some inconsistency which would be fixed by
   // update process. The flag is checked always when switching to READY state.
   // To make sure we start the update process as soon as possible, methods that
   // set this flag should also call StartUpdatingIndexIfNeeded() to cover the
   // case when we are currently in READY state.
-  bool mIndexNeedsUpdate{false};
+  bool mIndexNeedsUpdate;
   // Set at the beginning of RemoveAll() which clears the whole index. When
   // removing all entries we must stop any pending reading, writing, updating or
   // building operation. This flag is checked at various places and it prevents
   // we won't start another operation (e.g. canceling reading of the index would
   // normally start update or build process)
-  bool mRemovingAll{false};
+  bool mRemovingAll;
   // Whether the index file on disk exists and is valid.
-  bool mIndexOnDiskIsValid{false};
+  bool mIndexOnDiskIsValid;
   // When something goes wrong during updating or building process, we don't
   // mark index clean (and also don't write journal) to ensure that update or
   // build will be initiated on the next start.
-  bool mDontMarkIndexClean{false};
+  bool mDontMarkIndexClean;
   // Timestamp value from index file. It is used during update process to skip
   // entries that were last modified before this timestamp.
-  uint32_t mIndexTimeStamp{0};
+  uint32_t mIndexTimeStamp;
   // Timestamp of last time the index was dumped to disk.
   // NOTE: The index might not be necessarily dumped at this time. The value
   // is used to schedule next dump of the index.
   TimeStamp mLastDumpTime;
 
   // Timer of delayed update/build.
   nsCOMPtr<nsITimer> mUpdateTimer;
   // True when build or update event is posted
-  bool mUpdateEventPending{false};
+  bool mUpdateEventPending;
 
   // Helper members used when reading/writing index from/to disk.
   // Contains number of entries that should be skipped:
   //  - in hashtable when writing index because they were already written
   //  - in index file when reading index because they were already read
-  uint32_t mSkipEntries{0};
+  uint32_t mSkipEntries;
   // Number of entries that should be written to disk. This is number of entries
   // in hashtable that are initialized and are not marked as removed when
   // writing begins.
-  uint32_t mProcessEntries{0};
-  char* mRWBuf{nullptr};
-  uint32_t mRWBufSize{0};
-  uint32_t mRWBufPos{0};
+  uint32_t mProcessEntries;
+  char* mRWBuf;
+  uint32_t mRWBufSize;
+  uint32_t mRWBufPos;
   RefPtr<CacheHash> mRWHash;
 
   // True if read or write operation is pending. It is used to ensure that
   // mRWBuf is not freed until OnDataRead or OnDataWritten is called.
-  bool mRWPending{false};
+  bool mRWPending;
 
   // Reading of journal succeeded if true.
-  bool mJournalReadSuccessfully{false};
+  bool mJournalReadSuccessfully;
 
   // Handle used for writing and reading index file.
   RefPtr<CacheFileHandle> mIndexHandle;
   // Handle used for reading journal file.
   RefPtr<CacheFileHandle> mJournalHandle;
   // Used to check the existence of the file during reading process.
   RefPtr<CacheFileHandle> mTmpHandle;
 
@@ -1173,48 +1192,48 @@ class CacheIndex final : public CacheFil
      private:
       nsTArray<RefPtr<CacheIndexRecordWrapper>>* mRecs;
       uint32_t mIdx;
     };
 
    public:
     Iterator Iter() { return Iterator(&mRecs); }
 
-    FrecencyArray() = default;
+    FrecencyArray() : mUnsortedElements(0), mRemovedElements(0) {}
 
     // Methods used by CacheIndexEntryAutoManage to keep the array up to date.
     void AppendRecord(CacheIndexRecordWrapper* aRecord);
     void RemoveRecord(CacheIndexRecordWrapper* aRecord);
     void ReplaceRecord(CacheIndexRecordWrapper* aOldRecord,
                        CacheIndexRecordWrapper* aNewRecord);
     void SortIfNeeded();
 
     size_t Length() const { return mRecs.Length() - mRemovedElements; }
     void Clear() { mRecs.Clear(); }
 
    private:
     friend class CacheIndex;
 
     nsTArray<RefPtr<CacheIndexRecordWrapper>> mRecs;
-    uint32_t mUnsortedElements{0};
+    uint32_t mUnsortedElements;
     // Instead of removing elements from the array immediately, we null them out
     // and the iterator skips them when accessing the array. The null pointers
     // are placed at the end during sorting and we strip them out all at once.
     // This saves moving a lot of memory in nsTArray::RemoveElementsAt.
-    uint32_t mRemovedElements{0};
+    uint32_t mRemovedElements;
   };
 
   FrecencyArray mFrecencyArray;
 
   nsTArray<CacheIndexIterator*> mIterators;
 
   // This flag is true iff we are between CacheStorageService:Clear() and
   // processing all contexts to be evicted.  It will make UI to show
   // "calculating" instead of any intermediate cache size.
-  bool mAsyncGetDiskConsumptionBlocked{false};
+  bool mAsyncGetDiskConsumptionBlocked;
 
   class DiskConsumptionObserver : public Runnable {
    public:
     static DiskConsumptionObserver* Init(
         nsICacheStorageConsumptionObserver* aObserver) {
       nsWeakPtr observer = do_GetWeakReference(aObserver);
       if (!observer) return nullptr;
 
@@ -1256,15 +1275,15 @@ class CacheIndex final : public CacheFil
     nsWeakPtr mObserver;
     int64_t mSize;
   };
 
   // List of async observers that want to get disk consumption information
   nsTArray<RefPtr<DiskConsumptionObserver>> mDiskConsumptionObservers;
 
   // Number of bytes written to the cache since the last telemetry report
-  uint64_t mTotalBytesWritten{0};
+  uint64_t mTotalBytesWritten;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif
--- a/netwerk/cache2/CacheStorageService.h
+++ b/netwerk/cache2/CacheStorageService.h
@@ -392,25 +392,26 @@ class CacheStorageService final : public
   // thread but this table is manipulated on the management thread.
   nsTHashMap<nsCStringHashKey, mozilla::TimeStamp> mPurgeTimeStamps;
 
   // nsICacheTesting
   class IOThreadSuspender : public Runnable {
    public:
     IOThreadSuspender()
         : Runnable("net::CacheStorageService::IOThreadSuspender"),
-          mMon("IOThreadSuspender") {}
+          mMon("IOThreadSuspender"),
+          mSignaled(false) {}
     void Notify();
 
    private:
     virtual ~IOThreadSuspender() = default;
     NS_IMETHOD Run() override;
 
     Monitor mMon;
-    bool mSignaled{false};
+    bool mSignaled;
   };
 
   RefPtr<IOThreadSuspender> mActiveIOSuspender;
 };
 
 template <class T>
 void ProxyRelease(const char* aName, nsCOMPtr<T>& object,
                   nsIEventTarget* target) {
--- a/netwerk/cookie/CookieStorage.cpp
+++ b/netwerk/cookie/CookieStorage.cpp
@@ -103,16 +103,26 @@ size_t CookieEntry::SizeOfExcludingThis(
   return amount;
 }
 
 // ---------------------------------------------------------------------------
 // CookieStorage
 
 NS_IMPL_ISUPPORTS(CookieStorage, nsIObserver, nsISupportsWeakReference)
 
+CookieStorage::CookieStorage()
+    : mCookieCount(0),
+      mCookieOldestTime(INT64_MAX),
+      mMaxNumberOfCookies(kMaxNumberOfCookies),
+      mMaxCookiesPerHost(kMaxCookiesPerHost),
+      mCookieQuotaPerHost(kCookieQuotaPerHost),
+      mCookiePurgeAge(kCookiePurgeAge) {}
+
+CookieStorage::~CookieStorage() = default;
+
 void CookieStorage::Init() {
   // init our pref and observer
   nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID);
   if (prefBranch) {
     prefBranch->AddObserver(kPrefMaxNumberOfCookies, this, true);
     prefBranch->AddObserver(kPrefMaxCookiesPerHost, this, true);
     prefBranch->AddObserver(kPrefCookiePurgeAge, this, true);
     PrefChanged(prefBranch);
--- a/netwerk/cookie/CookieStorage.h
+++ b/netwerk/cookie/CookieStorage.h
@@ -7,17 +7,16 @@
 #define mozilla_net_CookieStorage_h
 
 #include "CookieKey.h"
 
 #include "nsIObserver.h"
 #include "nsTHashtable.h"
 #include "nsWeakReference.h"
 #include <functional>
-#include "CookieCommons.h"
 
 class nsIArray;
 class nsICookie;
 class nsIPrefBranch;
 
 namespace mozilla {
 namespace net {
 
@@ -123,18 +122,18 @@ class CookieStorage : public nsIObserver
                                       nsICookie* aCookie);
 
   virtual void StaleCookies(const nsTArray<Cookie*>& aCookieList,
                             int64_t aCurrentTimeInUsec) = 0;
 
   virtual void Close() = 0;
 
  protected:
-  CookieStorage() = default;
-  virtual ~CookieStorage() = default;
+  CookieStorage();
+  virtual ~CookieStorage();
 
   void Init();
 
   void AddCookieToList(const nsACString& aBaseDomain,
                        const OriginAttributes& aOriginAttributes,
                        Cookie* aCookie);
 
   virtual void StoreCookie(const nsACString& aBaseDomain,
@@ -159,17 +158,17 @@ class CookieStorage : public nsIObserver
   already_AddRefed<nsIArray> PurgeCookiesWithCallbacks(
       int64_t aCurrentTimeInUsec, uint16_t aMaxNumberOfCookies,
       int64_t aCookiePurgeAge,
       std::function<void(const CookieListIter&)>&& aRemoveCookieCallback,
       std::function<void()>&& aFinalizeCallback);
 
   nsTHashtable<CookieEntry> mHostTable;
 
-  uint32_t mCookieCount{0};
+  uint32_t mCookieCount;
 
  private:
   void PrefChanged(nsIPrefBranch* aPrefBranch);
 
   bool FindSecureCookie(const nsACString& aBaseDomain,
                         const OriginAttributes& aOriginAttributes,
                         Cookie* aCookie);
 
@@ -183,20 +182,20 @@ class CookieStorage : public nsIObserver
   void MergeCookieSchemeMap(Cookie* aOldCookie, Cookie* aNewCookie);
 
   static already_AddRefed<nsIArray> CreatePurgeList(nsICookie* aCookie);
 
   virtual already_AddRefed<nsIArray> PurgeCookies(int64_t aCurrentTimeInUsec,
                                                   uint16_t aMaxNumberOfCookies,
                                                   int64_t aCookiePurgeAge) = 0;
 
-  int64_t mCookieOldestTime{INT64_MAX};
+  int64_t mCookieOldestTime;
 
-  uint16_t mMaxNumberOfCookies{kMaxNumberOfCookies};
-  uint16_t mMaxCookiesPerHost{kMaxCookiesPerHost};
-  uint16_t mCookieQuotaPerHost{kCookieQuotaPerHost};
-  int64_t mCookiePurgeAge{kCookiePurgeAge};
+  uint16_t mMaxNumberOfCookies;
+  uint16_t mMaxCookiesPerHost;
+  uint16_t mCookieQuotaPerHost;
+  int64_t mCookiePurgeAge;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // mozilla_net_CookieStorage_h
--- a/netwerk/dns/TRR.cpp
+++ b/netwerk/dns/TRR.cpp
@@ -76,17 +76,20 @@ TRR::TRR(AHostResolver* aResolver, nsHos
       mCnameLoop(aLoopCount),
       mOriginSuffix(aRec ? aRec->originSuffix : ""_ns) {
   MOZ_DIAGNOSTIC_ASSERT(XRE_IsParentProcess() || XRE_IsSocketProcess(),
                         "TRR must be in parent or socket process");
 }
 
 // used on push
 TRR::TRR(AHostResolver* aResolver, bool aPB)
-    : mozilla::Runnable("TRR"), mHostResolver(aResolver), mPB(aPB) {
+    : mozilla::Runnable("TRR"),
+      mHostResolver(aResolver),
+      mType(TRRTYPE_A),
+      mPB(aPB) {
   MOZ_DIAGNOSTIC_ASSERT(XRE_IsParentProcess() || XRE_IsSocketProcess(),
                         "TRR must be in parent or socket process");
 }
 
 // to verify a domain
 TRR::TRR(AHostResolver* aResolver, nsACString& aHost, enum TrrType aType,
          const nsACString& aOriginSuffix, bool aPB)
     : mozilla::Runnable("TRR"),
--- a/netwerk/ipc/InputChannelThrottleQueueParent.cpp
+++ b/netwerk/ipc/InputChannelThrottleQueueParent.cpp
@@ -45,16 +45,19 @@ InputChannelThrottleQueueParent::Release
   // to delete the InputChannelThrottleQueueChild in socket process.
   if (count == 1 && CanSend()) {
     mozilla::Unused << Send__delete__(this);
     return 1;
   }
   return count;
 }
 
+InputChannelThrottleQueueParent::InputChannelThrottleQueueParent()
+    : mBytesProcessed(0), mMeanBytesPerSecond(0), mMaxBytesPerSecond(0) {}
+
 mozilla::ipc::IPCResult InputChannelThrottleQueueParent::RecvRecordRead(
     const uint32_t& aBytesRead) {
   mBytesProcessed += aBytesRead;
   return IPC_OK();
 }
 
 NS_IMETHODIMP
 InputChannelThrottleQueueParent::RecordRead(uint32_t aBytesRead) {
--- a/netwerk/ipc/InputChannelThrottleQueueParent.h
+++ b/netwerk/ipc/InputChannelThrottleQueueParent.h
@@ -25,26 +25,26 @@ class InputChannelThrottleQueueParent fi
       public nsIInputChannelThrottleQueue {
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIINPUTCHANNELTHROTTLEQUEUE
   NS_DECLARE_STATIC_IID_ACCESSOR(INPUT_CHANNEL_THROTTLE_QUEUE_PARENT_IID)
 
   friend class PInputChannelThrottleQueueParent;
 
-  explicit InputChannelThrottleQueueParent() = default;
+  explicit InputChannelThrottleQueueParent();
   mozilla::ipc::IPCResult RecvRecordRead(const uint32_t& aBytesRead);
   void ActorDestroy(ActorDestroyReason aWhy) override {}
 
  private:
   virtual ~InputChannelThrottleQueueParent() = default;
 
-  uint64_t mBytesProcessed{0};
-  uint32_t mMeanBytesPerSecond{0};
-  uint32_t mMaxBytesPerSecond{0};
+  uint64_t mBytesProcessed;
+  uint32_t mMeanBytesPerSecond;
+  uint32_t mMaxBytesPerSecond;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(InputChannelThrottleQueueParent,
                               INPUT_CHANNEL_THROTTLE_QUEUE_PARENT_IID)
 
 }  // namespace net
 }  // namespace mozilla
 
--- a/netwerk/ipc/SocketProcessChild.cpp
+++ b/netwerk/ipc/SocketProcessChild.cpp
@@ -67,17 +67,18 @@
 
 namespace mozilla {
 namespace net {
 
 using namespace ipc;
 
 SocketProcessChild* sSocketProcessChild;
 
-SocketProcessChild::SocketProcessChild() {
+SocketProcessChild::SocketProcessChild()
+    : mShuttingDown(false), mMutex("SocketProcessChild::mMutex") {
   LOG(("CONSTRUCT SocketProcessChild::SocketProcessChild\n"));
   nsDebugImpl::SetMultiprocessMode("Socket");
 
   MOZ_COUNT_CTOR(SocketProcessChild);
   sSocketProcessChild = this;
 }
 
 SocketProcessChild::~SocketProcessChild() {
--- a/netwerk/ipc/SocketProcessChild.h
+++ b/netwerk/ipc/SocketProcessChild.h
@@ -150,19 +150,19 @@ class SocketProcessChild final
   // This table keeps SocketProcessBridgeParent alive in socket process.
   nsRefPtrHashtable<nsUint32HashKey, SocketProcessBridgeParent>
       mSocketProcessBridgeParentMap;
 
 #ifdef MOZ_GECKO_PROFILER
   RefPtr<ChildProfilerController> mProfilerController;
 #endif
 
-  bool mShuttingDown{false};
+  bool mShuttingDown;
   // Protect the table below.
-  Mutex mMutex{"SocketProcessChild::mMutex"};
+  Mutex mMutex;
   nsTHashMap<uint64_t, RefPtr<BackgroundDataBridgeParent>>
       mBackgroundDataBridgeMap;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // mozilla_net_SocketProcessChild_h
--- a/netwerk/protocol/about/nsAboutCacheEntry.h
+++ b/netwerk/protocol/about/nsAboutCacheEntry.h
@@ -34,17 +34,17 @@ class nsAboutCacheEntry final : public n
     NS_DECL_ISUPPORTS
     NS_DECL_NSICACHEENTRYOPENCALLBACK
     NS_DECL_NSICACHEENTRYMETADATAVISITOR
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSISTREAMLISTENER
     NS_FORWARD_SAFE_NSICHANNEL(mChannel)
     NS_FORWARD_SAFE_NSIREQUEST(mChannel)
 
-    Channel() = default;
+    Channel() : mBuffer(nullptr), mWaitingForData(false), mHexDumpState(0) {}
 
    private:
     virtual ~Channel() = default;
 
    public:
     [[nodiscard]] nsresult Init(nsIURI* uri, nsILoadInfo* aLoadInfo);
 
     [[nodiscard]] nsresult GetContentStream(nsIURI*, nsIInputStream**);
@@ -61,20 +61,20 @@ class nsAboutCacheEntry final : public n
         nsIInputStream* aInStream, void* aClosure, const char* aFromSegment,
         uint32_t aToOffset, uint32_t aCount, uint32_t* aWriteCount);
 
    private:
     nsCString mStorageName, mEnhanceId;
     nsCOMPtr<nsILoadContextInfo> mLoadInfo;
     nsCOMPtr<nsIURI> mCacheURI;
 
-    nsCString* mBuffer{nullptr};
+    nsCString* mBuffer;
     nsCOMPtr<nsIAsyncOutputStream> mOutputStream;
-    bool mWaitingForData{false};
-    uint32_t mHexDumpState{0};
+    bool mWaitingForData;
+    uint32_t mHexDumpState;
 
     nsCOMPtr<nsIChannel> mChannel;
   };
 };
 
 #define NS_ABOUT_CACHE_ENTRY_MODULE_CID              \
   { /* 7fa5237d-b0eb-438f-9e50-ca0166e63788 */       \
     0x7fa5237d, 0xb0eb, 0x438f, {                    \
--- a/netwerk/protocol/gio/GIOChannelChild.cpp
+++ b/netwerk/protocol/gio/GIOChannelChild.cpp
@@ -26,17 +26,23 @@
 using mozilla::dom::ContentChild;
 
 namespace mozilla {
 #undef LOG
 #define LOG(args) MOZ_LOG(gGIOLog, mozilla::LogLevel::Debug, args)
 namespace net {
 
 GIOChannelChild::GIOChannelChild(nsIURI* aUri)
-    : mEventQ(new ChannelEventQueue(static_cast<nsIChildChannel*>(this))) {
+    : mIPCOpen(false),
+      mEventQ(new ChannelEventQueue(static_cast<nsIChildChannel*>(this))),
+      mCanceled(false),
+      mSuspendCount(0),
+      mIsPending(false),
+      mStartPos(0),
+      mSuspendSent(false) {
   SetURI(aUri);
   // We could support thread retargeting, but as long as we're being driven by
   // IPDL on the main thread it doesn't buy us anything.
   DisallowThreadRetargeting();
 }
 
 void GIOChannelChild::AddIPDLReference() {
   MOZ_ASSERT(!mIPCOpen, "Attempt to retain more than one IPDL reference");
--- a/netwerk/protocol/gio/GIOChannelChild.h
+++ b/netwerk/protocol/gio/GIOChannelChild.h
@@ -81,30 +81,29 @@ class GIOChannelChild final : public PGI
 
   void SetupNeckoTarget() override;
 
   friend class NeckoTargetChannelFunctionEvent;
 
  private:
   nsCOMPtr<nsIInputStream> mUploadStream;
 
-  bool mIPCOpen = false;
+  bool mIPCOpen;
   const RefPtr<ChannelEventQueue> mEventQ;
 
   bool mCanceled = false;
-  uint32_t mSuspendCount = 0;
-  ;
+  uint32_t mSuspendCount;
   bool mIsPending = false;
 
-  uint64_t mStartPos = 0;
+  uint64_t mStartPos;
   nsCString mEntityID;
 
   // Set if SendSuspend is called. Determines if SendResume is needed when
   // diverting callbacks to parent.
-  bool mSuspendSent = false;
+  bool mSuspendSent;
 };
 
 inline bool GIOChannelChild::IsSuspended() const { return mSuspendCount != 0; }
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif /* NS_GIOCHANNELCHILD_H */
--- a/netwerk/protocol/http/AlternateServices.h
+++ b/netwerk/protocol/http/AlternateServices.h
@@ -129,17 +129,17 @@ class AltSvcMapping {
   MOZ_INIT_OUTSIDE_CTOR bool mHttps{};  // origin is https://
   MOZ_INIT_OUTSIDE_CTOR bool
       mMixedScheme;  // .wk allows http and https on same con
 
   nsCString mNPNToken;
 
   OriginAttributes mOriginAttributes;
 
-  bool mSyncOnlyOnSuccess{false};
+  bool mSyncOnlyOnSuccess;
   bool mIsHttp3;
 };
 
 class AltSvcOverride : public nsIInterfaceRequestor,
                        public nsISpeculativeConnectionOverrider {
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSISPECULATIVECONNECTIONOVERRIDER
@@ -175,17 +175,17 @@ class TransactionObserver final : public
   bool mStatusOK;  // HTTP Status 200
   // These two values could be accessed on sts thread.
   Atomic<bool> mAuthOK;     // confirmed no TLS failure
   Atomic<bool> mVersionOK;  // connection h2
 };
 
 class AltSvcCache {
  public:
-  AltSvcCache() = default;
+  AltSvcCache() : mStorageEpoch(0) {}
   virtual ~AltSvcCache() = default;
   void UpdateAltServiceMapping(
       AltSvcMapping* map, nsProxyInfo* pi, nsIInterfaceRequestor*,
       uint32_t caps,
       const OriginAttributes& originAttributes);  // main thread
   void UpdateAltServiceMappingWithoutValidation(
       AltSvcMapping* map, nsProxyInfo* pi, nsIInterfaceRequestor*,
       uint32_t caps,
@@ -202,17 +202,17 @@ class AltSvcCache {
   int32_t StorageEpoch() { return mStorageEpoch; }
   nsresult GetAltSvcCacheKeys(nsTArray<nsCString>& value);
 
  private:
   void EnsureStorageInited();
   already_AddRefed<AltSvcMapping> LookupMapping(const nsCString& key,
                                                 bool privateBrowsing);
   RefPtr<DataStorage> mStorage;
-  int32_t mStorageEpoch{0};
+  int32_t mStorageEpoch;
 };
 
 // This class is used to write the validated result to AltSvcMapping when the
 // AltSvcTransaction is closed and destroyed.
 class AltSvcMappingValidator final {
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AltSvcMappingValidator)
 
--- a/netwerk/protocol/http/ClassifierDummyChannelChild.cpp
+++ b/netwerk/protocol/http/ClassifierDummyChannelChild.cpp
@@ -47,16 +47,21 @@ bool ClassifierDummyChannelChild::Create
   bool isThirdParty =
       nsContentUtils::IsThirdPartyWindowOrChannel(nullptr, aChannel, aURI);
 
   static_cast<ClassifierDummyChannelChild*>(actor)->Initialize(
       aChannel, aURI, isThirdParty, aCallback);
   return true;
 }
 
+ClassifierDummyChannelChild::ClassifierDummyChannelChild()
+    : mIsThirdParty(false) {}
+
+ClassifierDummyChannelChild::~ClassifierDummyChannelChild() = default;
+
 void ClassifierDummyChannelChild::Initialize(
     nsIHttpChannel* aChannel, nsIURI* aURI, bool aIsThirdParty,
     const std::function<void(bool)>& aCallback) {
   MOZ_ASSERT(NS_IsMainThread());
 
   mChannel = aChannel;
   mURI = aURI;
   mIsThirdParty = aIsThirdParty;
--- a/netwerk/protocol/http/ClassifierDummyChannelChild.h
+++ b/netwerk/protocol/http/ClassifierDummyChannelChild.h
@@ -21,27 +21,27 @@ namespace net {
 class ClassifierDummyChannelChild final : public PClassifierDummyChannelChild {
   friend class PClassifierDummyChannelChild;
 
  public:
   static bool Create(nsIHttpChannel* aChannel, nsIURI* aURI,
                      const std::function<void(bool)>& aCallback);
 
   // Used by PNeckoChild only!
-  ClassifierDummyChannelChild() = default;
-  ~ClassifierDummyChannelChild() = default;
+  ClassifierDummyChannelChild();
+  ~ClassifierDummyChannelChild();
 
  private:
   void Initialize(nsIHttpChannel* aChannel, nsIURI* aURI, bool aIsThirdParty,
                   const std::function<void(bool)>& aCallback);
 
   mozilla::ipc::IPCResult Recv__delete__(const uint32_t& aClassificationFlags);
 
   nsCOMPtr<nsIHttpChannel> mChannel;
   nsCOMPtr<nsIURI> mURI;
   std::function<void(bool)> mCallback;
-  bool mIsThirdParty{false};
+  bool mIsThirdParty;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // mozilla_net_ClassifierDummyChannelChild_h
--- a/netwerk/protocol/http/ClassifierDummyChannelParent.cpp
+++ b/netwerk/protocol/http/ClassifierDummyChannelParent.cpp
@@ -9,16 +9,21 @@
 #include "mozilla/ScopeExit.h"
 #include "mozilla/Unused.h"
 #include "nsIPrincipal.h"
 #include "nsNetUtil.h"
 
 namespace mozilla {
 namespace net {
 
+ClassifierDummyChannelParent::ClassifierDummyChannelParent()
+    : mIPCActive(true) {}
+
+ClassifierDummyChannelParent::~ClassifierDummyChannelParent() = default;
+
 void ClassifierDummyChannelParent::Init(nsIURI* aURI, nsIURI* aTopWindowURI,
                                         nsresult aTopWindowURIResult,
                                         nsILoadInfo* aLoadInfo) {
   MOZ_ASSERT(mIPCActive);
 
   RefPtr<ClassifierDummyChannelParent> self = this;
   auto onExit =
       MakeScopeExit([self] { Unused << Send__delete__(self, false); });
--- a/netwerk/protocol/http/ClassifierDummyChannelParent.h
+++ b/netwerk/protocol/http/ClassifierDummyChannelParent.h
@@ -16,25 +16,25 @@ class nsIURI;
 namespace mozilla {
 namespace net {
 
 class ClassifierDummyChannelParent final
     : public PClassifierDummyChannelParent {
  public:
   NS_INLINE_DECL_REFCOUNTING(ClassifierDummyChannelParent)
 
-  ClassifierDummyChannelParent() = default;
+  ClassifierDummyChannelParent();
 
   void Init(nsIURI* aURI, nsIURI* aTopWindowURI, nsresult aTopWindowURIResult,
             nsILoadInfo* aLoadInfo);
 
  private:
-  ~ClassifierDummyChannelParent() = default;
+  ~ClassifierDummyChannelParent();
 
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
-  bool mIPCActive{true};
+  bool mIPCActive;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // mozilla_net_ClassifierDummyChannelParent_h
--- a/netwerk/protocol/http/Http2Compression.cpp
+++ b/netwerk/protocol/http/Http2Compression.cpp
@@ -175,17 +175,17 @@ size_t nvPair::SizeOfExcludingThis(Mallo
   return mName.SizeOfExcludingThisIfUnshared(aMallocSizeOf) +
          mValue.SizeOfExcludingThisIfUnshared(aMallocSizeOf);
 }
 
 size_t nvPair::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
   return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
 }
 
-nvFIFO::nvFIFO() { InitializeStaticHeaders(); }
+nvFIFO::nvFIFO() : mByteCount(0), mTable() { InitializeStaticHeaders(); }
 
 nvFIFO::~nvFIFO() { Clear(); }
 
 void nvFIFO::AddElement(const nsCString& name, const nsCString& value) {
   nvPair* pair = new nvPair(name, value);
   mByteCount += pair->Size();
   mTable.PushFront(pair);
 }
@@ -226,17 +226,24 @@ const nvPair* nvFIFO::operator[](size_t 
     return nullptr;
   }
   if (index >= gStaticHeaders->GetSize()) {
     return mTable.ObjectAt(index - gStaticHeaders->GetSize());
   }
   return gStaticHeaders->ObjectAt(index);
 }
 
-Http2BaseCompressor::Http2BaseCompressor() {
+Http2BaseCompressor::Http2BaseCompressor()
+    : mOutput(nullptr),
+      mMaxBuffer(kDefaultMaxBuffer),
+      mMaxBufferSetting(kDefaultMaxBuffer),
+      mSetInitialMaxBufferSizeAllowed(true),
+      mPeakSize(0),
+      mPeakCount(0),
+      mDumpTables(false) {
   mDynamicReporter = new HpackDynamicTableReporter(this);
   RegisterStrongMemoryReporter(mDynamicReporter);
 }
 
 Http2BaseCompressor::~Http2BaseCompressor() {
   if (mPeakSize) {
     Telemetry::Accumulate(mPeakSizeID, mPeakSize);
   }
--- a/netwerk/protocol/http/Http2Compression.h
+++ b/netwerk/protocol/http/Http2Compression.h
@@ -44,17 +44,17 @@ class nvFIFO {
   uint32_t ByteCount() const;
   uint32_t Length() const;
   uint32_t VariableLength() const;
   size_t StaticLength() const;
   void Clear();
   const nvPair* operator[](size_t index) const;
 
  private:
-  uint32_t mByteCount{0};
+  uint32_t mByteCount;
   nsDeque<nvPair> mTable;
 };
 
 class HpackDynamicTableReporter;
 
 class Http2BaseCompressor {
  public:
   Http2BaseCompressor();
@@ -66,41 +66,46 @@ class Http2BaseCompressor {
  protected:
   const static uint32_t kDefaultMaxBuffer = 4096;
 
   virtual void ClearHeaderTable();
   virtual void MakeRoom(uint32_t amount, const char* direction);
   virtual void DumpState(const char*);
   virtual void SetMaxBufferSizeInternal(uint32_t maxBufferSize);
 
-  nsACString* mOutput{nullptr};
+  nsACString* mOutput;
   nvFIFO mHeaderTable;
 
-  uint32_t mMaxBuffer{kDefaultMaxBuffer};
-  uint32_t mMaxBufferSetting{kDefaultMaxBuffer};
-  bool mSetInitialMaxBufferSizeAllowed{true};
+  uint32_t mMaxBuffer;
+  uint32_t mMaxBufferSetting;
+  bool mSetInitialMaxBufferSizeAllowed;
 
-  uint32_t mPeakSize{0};
-  uint32_t mPeakCount{0};
+  uint32_t mPeakSize;
+  uint32_t mPeakCount;
   MOZ_INIT_OUTSIDE_CTOR
   Telemetry::HistogramID mPeakSizeID;
   MOZ_INIT_OUTSIDE_CTOR
   Telemetry::HistogramID mPeakCountID;
 
-  bool mDumpTables{false};
+  bool mDumpTables;
 
  private:
   RefPtr<HpackDynamicTableReporter> mDynamicReporter;
 };
 
 class Http2Compressor;
 
 class Http2Decompressor final : public Http2BaseCompressor {
  public:
-  Http2Decompressor() {
+  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
   [[nodiscard]] nsresult DecodeHeaderBlock(const uint8_t* data,
                                            uint32_t datalen, nsACString& output,
@@ -138,26 +143,29 @@ class Http2Decompressor final : public H
 
   nsCString mHeaderStatus;
   nsCString mHeaderHost;
   nsCString mHeaderScheme;
   nsCString mHeaderPath;
   nsCString mHeaderMethod;
 
   // state variables when DecodeBlock() is on the stack
-  uint32_t mOffset{0};
-  const uint8_t* mData{nullptr};
-  uint32_t mDataLen{0};
-  bool mSeenNonColonHeader{false};
-  bool mIsPush{false};
+  uint32_t mOffset;
+  const uint8_t* mData;
+  uint32_t mDataLen;
+  bool mSeenNonColonHeader;
+  bool mIsPush;
 };
 
 class Http2Compressor final : public Http2BaseCompressor {
  public:
-  Http2Compressor() {
+  Http2Compressor()
+      : mParsedContentLength(-1),
+        mBufferSizeChangeWaiting(false),
+        mLowestBufferSizeWaiting(0) {
     mPeakSizeID = Telemetry::HPACK_PEAK_SIZE_COMPRESSOR;
     mPeakCountID = Telemetry::HPACK_PEAK_COUNT_COMPRESSOR;
   };
   virtual ~Http2Compressor() = default;
 
   // HTTP/1 formatted header block as input - HTTP/2 formatted
   // header block as output
   [[nodiscard]] nsresult EncodeHeaderBlock(
@@ -182,17 +190,17 @@ class Http2Compressor final : public Htt
   void DoOutput(Http2Compressor::outputCode code, const class nvPair* pair,
                 uint32_t index);
   void EncodeInteger(uint32_t prefixLen, uint32_t val);
   void ProcessHeader(const nvPair inputPair, bool noLocalIndex,
                      bool neverIndex);
   void HuffmanAppend(const nsCString& value);
   void EncodeTableSizeChange(uint32_t newMaxSize);
 
-  int64_t mParsedContentLength{-1};
-  bool mBufferSizeChangeWaiting{false};
-  uint32_t mLowestBufferSizeWaiting{0};
+  int64_t mParsedContentLength;
+  bool mBufferSizeChangeWaiting;
+  uint32_t mLowestBufferSizeWaiting;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // mozilla_net_Http2Compression_Internal_h
--- a/netwerk/protocol/http/Http2Push.cpp
+++ b/netwerk/protocol/http/Http2Push.cpp
@@ -108,18 +108,24 @@ void Http2PushedStreamWrapper::OnPushFai
 //////////////////////////////////////////
 
 Http2PushedStream::Http2PushedStream(
     Http2PushTransactionBuffer* aTransaction, Http2Session* aSession,
     Http2Stream* aAssociatedStream, uint32_t aID,
     uint64_t aCurrentForegroundTabOuterContentWindowId)
     : Http2Stream(aTransaction, aSession, 0,
                   aCurrentForegroundTabOuterContentWindowId),
+      mConsumerStream(nullptr),
       mAssociatedTransaction(aAssociatedStream->Transaction()),
-      mBufferedPush(aTransaction) {
+      mBufferedPush(aTransaction),
+      mStatus(NS_OK),
+      mPushCompleted(false),
+      mDeferCleanupOnSuccess(true),
+      mDeferCleanupOnPush(false),
+      mOnPushFailed(false) {
   LOG3(("Http2PushedStream ctor this=%p 0x%X\n", this, aID));
   mStreamID = aID;
   MOZ_ASSERT(!(aID & 1));  // must be even to be a pushed stream
   mBufferedPush->SetPushStream(this);
   mRequestContext = aAssociatedStream->RequestContext();
   mLastRead = TimeStamp::Now();
   mPriorityDependency = aAssociatedStream->PriorityDependency();
   if (mPriorityDependency == Http2Session::kUrgentStartGroupID ||
@@ -360,17 +366,24 @@ void Http2PushedStream::TopBrowsingConte
 //////////////////////////////////////////
 // Http2PushTransactionBuffer
 // This is the nsAHttpTransction owned by the stream when the pushed
 // stream has not yet been matched with a pull request
 //////////////////////////////////////////
 
 NS_IMPL_ISUPPORTS0(Http2PushTransactionBuffer)
 
-Http2PushTransactionBuffer::Http2PushTransactionBuffer() {
+Http2PushTransactionBuffer::Http2PushTransactionBuffer()
+    : mStatus(NS_OK),
+      mRequestHead(nullptr),
+      mPushStream(nullptr),
+      mIsDone(false),
+      mBufferedHTTP1Size(kDefaultBufferSize),
+      mBufferedHTTP1Used(0),
+      mBufferedHTTP1Consumed(0) {
   mBufferedHTTP1 = MakeUnique<char[]>(mBufferedHTTP1Size);
 }
 
 Http2PushTransactionBuffer::~Http2PushTransactionBuffer() {
   delete mRequestHead;
 }
 
 void Http2PushTransactionBuffer::SetConnection(nsAHttpConnection* conn) {}
--- a/netwerk/protocol/http/Http2Push.h
+++ b/netwerk/protocol/http/Http2Push.h
@@ -70,40 +70,40 @@ class Http2PushedStream final : public H
   virtual void SetPushComplete() override { mPushCompleted = true; }
   virtual void TopBrowsingContextIdChanged(uint64_t) override;
 
   nsCString& GetRequestString() { return mRequestString; }
   nsCString& GetResourceUrl() { return mResourceUrl; }
 
  private:
   virtual ~Http2PushedStream() = default;
-  // paired request stream that consumes from real http/2 one.. null until a
-  // match is made.
-  Http2Stream* mConsumerStream{nullptr};
+  Http2Stream*
+      mConsumerStream;  // paired request stream that consumes from
+                        // real http/2 one.. null until a match is made.
 
   nsCOMPtr<nsIRequestContext> mRequestContext;
 
   nsAHttpTransaction* mAssociatedTransaction;
 
   Http2PushTransactionBuffer* mBufferedPush;
   mozilla::TimeStamp mLastRead;
 
   nsCString mHashKey;
-  nsresult mStatus{NS_OK};
-  bool mPushCompleted{false};  // server push FIN received
-  bool mDeferCleanupOnSuccess{true};
+  nsresult mStatus;
+  bool mPushCompleted;  // server push FIN received
+  bool mDeferCleanupOnSuccess;
 
   // mDeferCleanupOnPush prevents Http2Session::CleanupStream() from
   // destroying the push stream on an error code during the period between
   // when we need to do OnPush() on another thread and the time it takes
   // for that event to create a synthetic pull stream attached to this
   // object. That synthetic pull will become mConsuemerStream.
   // Ths is essentially a delete protecting reference.
-  bool mDeferCleanupOnPush{false};
-  bool mOnPushFailed{false};
+  bool mDeferCleanupOnPush;
+  bool mOnPushFailed;
   nsCString mRequestString;
   nsCString mResourceUrl;
 
   uint32_t mDefaultPriorityDependency;
 };
 
 class Http2PushTransactionBuffer final : public nsAHttpTransaction {
  public:
@@ -117,25 +117,25 @@ class Http2PushTransactionBuffer final :
   void SetPushStream(Http2PushedStream* stream) { mPushStream = stream; }
 
  private:
   virtual ~Http2PushTransactionBuffer();
   uint64_t Available();
 
   const static uint32_t kDefaultBufferSize = 4096;
 
-  nsresult mStatus{NS_OK};
-  nsHttpRequestHead* mRequestHead{nullptr};
-  Http2PushedStream* mPushStream{nullptr};
-  bool mIsDone{false};
+  nsresult mStatus;
+  nsHttpRequestHead* mRequestHead;
+  Http2PushedStream* mPushStream;
+  bool mIsDone;
 
   UniquePtr<char[]> mBufferedHTTP1;
-  uint32_t mBufferedHTTP1Size{kDefaultBufferSize};
-  uint32_t mBufferedHTTP1Used{0};
-  uint32_t mBufferedHTTP1Consumed{0};
+  uint32_t mBufferedHTTP1Size;
+  uint32_t mBufferedHTTP1Used;
+  uint32_t mBufferedHTTP1Consumed;
 };
 
 class Http2PushedStreamWrapper : public nsISupports {
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   bool DispatchRelease();
 
   explicit Http2PushedStreamWrapper(Http2PushedStream* aPushStream);
--- a/netwerk/protocol/http/Http3Session.cpp
+++ b/netwerk/protocol/http/Http3Session.cpp
@@ -54,17 +54,27 @@ const uint32_t TRANSPORT_ERROR_STATELESS
 NS_IMPL_ADDREF(Http3Session)
 NS_IMPL_RELEASE(Http3Session)
 NS_INTERFACE_MAP_BEGIN(Http3Session)
   NS_INTERFACE_MAP_ENTRY(nsAHttpConnection)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
   NS_INTERFACE_MAP_ENTRY_CONCRETE(Http3Session)
 NS_INTERFACE_MAP_END
 
-Http3Session::Http3Session() {
+Http3Session::Http3Session()
+    : mState(INITIALIZING),
+      mAuthenticationStarted(false),
+      mCleanShutdown(false),
+      mGoawayReceived(false),
+      mShouldClose(false),
+      mIsClosedByNeqo(false),
+      mError(NS_OK),
+      mSocketError(NS_OK),
+      mBeforeConnectedError(false),
+      mTimerActive(false) {
   MOZ_ASSERT(OnSocketThread(), "not on socket thread");
   LOG(("Http3Session::Http3Session [this=%p]", this));
 
   mCurrentTopBrowsingContextId =
       gHttpHandler->ConnMgr()->CurrentTopBrowsingContextId();
   mThroughCaptivePortal = gHttpHandler->GetThroughCaptivePortal();
 }
 
--- a/netwerk/protocol/http/Http3Session.h
+++ b/netwerk/protocol/http/Http3Session.h
@@ -148,41 +148,35 @@ class Http3Session final : public nsAHtt
   nsRefPtrHashtable<nsUint64HashKey, Http3Stream> mStreamIdHash;
   nsRefPtrHashtable<nsPtrHashKey<nsAHttpTransaction>, Http3Stream>
       mStreamTransactionHash;
 
   nsDeque<Http3Stream> mReadyForWrite;
   nsTArray<RefPtr<Http3Stream>> mSlowConsumersReadyForRead;
   nsDeque<Http3Stream> mQueuedStreams;
 
-  enum State {
-    INITIALIZING,
-    ZERORTT,
-    CONNECTED,
-    CLOSING,
-    CLOSED
-  } mState{INITIALIZING};
+  enum State { INITIALIZING, ZERORTT, CONNECTED, CLOSING, CLOSED } mState;
 
-  bool mAuthenticationStarted{false};
-  bool mCleanShutdown{false};
-  bool mGoawayReceived{false};
-  bool mShouldClose{false};
-  bool mIsClosedByNeqo{false};
+  bool mAuthenticationStarted;
+  bool mCleanShutdown;
+  bool mGoawayReceived;
+  bool mShouldClose;
+  bool mIsClosedByNeqo;
   bool mHttp3ConnectionReported = false;
   // mError is neqo error (a protocol error) and that may mean that we will
   // send some packets after that.
-  nsresult mError{NS_OK};
+  nsresult mError;
   // This is a socket error, there is no poioint in sending anything on that
   // socket.
-  nsresult mSocketError{NS_OK};
-  bool mBeforeConnectedError{false};
+  nsresult mSocketError;
+  bool mBeforeConnectedError;
   uint64_t mCurrentTopBrowsingContextId;
 
   // True if the mTimer is inited and waiting for firing.
-  bool mTimerActive{false};
+  bool mTimerActive;
 
   RefPtr<HttpConnectionUDP> mUdpConn;
 
   // The underlying socket transport object is needed to propogate some events
   RefPtr<nsISocketTransport> mSocketTransport;
 
   nsCOMPtr<nsITimer> mTimer;
 
--- a/netwerk/protocol/http/Http3Stream.cpp
+++ b/netwerk/protocol/http/Http3Stream.cpp
@@ -14,17 +14,29 @@
 
 #include <stdio.h>
 
 namespace mozilla {
 namespace net {
 
 Http3Stream::Http3Stream(nsAHttpTransaction* httpTransaction,
                          Http3Session* session)
-    : mSession(session), mTransaction(httpTransaction) {
+    : mSendState(PREPARING_HEADERS),
+      mRecvState(BEFORE_HEADERS),
+      mStreamId(UINT64_MAX),
+      mSession(session),
+      mTransaction(httpTransaction),
+      mQueued(false),
+      mDataReceived(false),
+      mResetRecv(false),
+      mRequestBodyLenRemaining(0),
+      mTotalSent(0),
+      mTotalRead(0),
+      mFin(false),
+      mSendingBlockedByFlowControlCount(0) {
   MOZ_ASSERT(OnSocketThread(), "not on socket thread");
   LOG3(("Http3Stream::Http3Stream [this=%p]", this));
 }
 
 void Http3Stream::Close(nsresult aResult) {
   mRecvState = RECV_DONE;
   mTransaction->Close(aResult);
 }
--- a/netwerk/protocol/http/Http3Stream.h
+++ b/netwerk/protocol/http/Http3Stream.h
@@ -91,17 +91,17 @@ class Http3Stream final : public nsAHttp
    *      body. In this state the server will just ignore the request body.
    **/
   enum SendStreamState {
     PREPARING_HEADERS,
     WAITING_TO_ACTIVATE,
     SENDING_BODY,
     EARLY_RESPONSE,
     SEND_DONE
-  } mSendState{PREPARING_HEADERS};
+  } mSendState;
 
   /**
    * RecvStreamState:
    *  - BEFORE_HEADERS:
    *      The stream has not received headers yet.
    *  - READING_HEADERS:
    *      In this state Http3Session::ReadResponseHeaders will be called to read
    *      the response headers. All headers will be read at once into
@@ -118,33 +118,33 @@ class Http3Stream final : public nsAHttp
    *      The transaction is done.
    **/
   enum RecvStreamState {
     BEFORE_HEADERS,
     READING_HEADERS,
     READING_DATA,
     RECEIVED_FIN,
     RECV_DONE
-  } mRecvState{BEFORE_HEADERS};
+  } mRecvState;
 
-  uint64_t mStreamId{UINT64_MAX};
+  uint64_t mStreamId;
   Http3Session* mSession;
   RefPtr<nsAHttpTransaction> mTransaction;
   nsCString mFlatHttpRequestHeaders;
-  bool mQueued{false};
-  bool mDataReceived{false};
-  bool mResetRecv{false};
+  bool mQueued;
+  bool mDataReceived;
+  bool mResetRecv;
   nsTArray<uint8_t> mFlatResponseHeaders;
-  uint32_t mRequestBodyLenRemaining{0};
+  uint32_t mRequestBodyLenRemaining;
 
   // For Progress Events
-  uint64_t mTotalSent{0};
-  uint64_t mTotalRead{0};
+  uint64_t mTotalSent;
+  uint64_t mTotalRead;
 
-  bool mFin{false};
+  bool mFin;
 
   bool mAttempting0RTT = false;
 
   uint32_t mSendingBlockedByFlowControlCount = 0;
 
   nsresult mSocketInCondition = NS_ERROR_NOT_INITIALIZED;
   nsresult mSocketOutCondition = NS_ERROR_NOT_INITIALIZED;
 };
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -78,16 +78,30 @@ namespace net {
 
 //-----------------------------------------------------------------------------
 // HttpChannelChild
 //-----------------------------------------------------------------------------
 
 HttpChannelChild::HttpChannelChild()
     : HttpAsyncAborter<HttpChannelChild>(this),
       NeckoTargetHolder(nullptr),
+      mBgChildMutex("HttpChannelChild::BgChildMutex"),
+      mEventTargetMutex("HttpChannelChild::EventTargetMutex"),
+      mCacheEntryId(0),
+      mCacheKey(0),
+      mCacheFetchCount(0),
+      mCacheExpirationTime(nsICacheEntry::NO_EXPIRATION_TIME),
+      mDeletingChannelSent(false),
+      mIsFromCache(false),
+      mIsRacing(false),
+      mCacheNeedToReportBytesReadInitialized(false),
+      mNeedToReportBytesRead(true),
+#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
+      mBackgroundChildQueueFinalState(BCKCHILD_UNKNOWN),
+#endif
       mCacheEntryAvailable(false),
       mAltDataCacheEntryAvailable(false),
       mSendResumeAt(false),
       mKeptAlive(false),
       mIPCActorDeleted(false),
       mSuspendSent(false),
       mIsLastPartOfMultiPart(false),
       mSuspendForWaitCompleteRedirectSetup(false),
--- a/netwerk/protocol/http/HttpChannelChild.h
+++ b/netwerk/protocol/http/HttpChannelChild.h
@@ -16,17 +16,16 @@
 #include "mozilla/net/NeckoTargetHolder.h"
 #include "mozilla/net/PHttpChannelChild.h"
 #include "mozilla/net/ChannelEventQueue.h"
 
 #include "nsIStreamListener.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIProgressEventSink.h"
-#include "nsICacheEntry.h"
 #include "nsICacheInfoChannel.h"
 #include "nsIResumableChannel.h"
 #include "nsIProxiedChannel.h"
 #include "nsIAsyncVerifyRedirectCallback.h"
 #include "nsIChildChannel.h"
 #include "nsIHttpChannelChild.h"
 #include "nsIMultiPartChannel.h"
 #include "nsIThreadRetargetableRequest.h"
@@ -273,61 +272,59 @@ class HttpChannelChild final : public PH
 
   RequestHeaderTuples mClientSetRequestHeaders;
   RefPtr<ChannelEventQueue> mEventQ;
 
   nsCOMPtr<nsIInputStreamReceiver> mOriginalInputStreamReceiver;
   nsCOMPtr<nsIInputStreamReceiver> mAltDataInputStreamReceiver;
 
   // Used to ensure atomicity of mBgChild and mBgInitFailCallback
-  Mutex mBgChildMutex{"HttpChannelChild::BgChildMutex"};
+  Mutex mBgChildMutex;
 
   // Associated HTTP background channel
   RefPtr<HttpBackgroundChannelChild> mBgChild;
 
   // Error handling procedure if failed to establish PBackground IPC
   nsCOMPtr<nsIRunnable> mBgInitFailCallback;
 
   // Remove the association with background channel after OnStopRequest
   // or AsyncAbort.
   void CleanupBackgroundChannel();
 
   // Target thread for delivering ODA.
   nsCOMPtr<nsIEventTarget> mODATarget;
   // Used to ensure atomicity of mNeckoTarget / mODATarget;
-  Mutex mEventTargetMutex{"HttpChannelChild::EventTargetMutex"};
+  Mutex mEventTargetMutex;
 
   TimeStamp mLastStatusReported;
 
-  uint64_t mCacheEntryId{0};
+  uint64_t mCacheEntryId;
 
   // The result of RetargetDeliveryTo for this channel.
   // |notRequested| represents OMT is not requested by the channel owner.
   LABELS_HTTP_CHILD_OMT_STATS mOMTResult =
       LABELS_HTTP_CHILD_OMT_STATS::notRequested;
 
-  uint32_t mCacheKey{0};
-  int32_t mCacheFetchCount{0};
-  uint32_t mCacheExpirationTime{
-      static_cast<uint32_t>(nsICacheEntry::NO_EXPIRATION_TIME)};
+  uint32_t mCacheKey;
+  int32_t mCacheFetchCount;
+  uint32_t mCacheExpirationTime;
 
   // If we're handling a multi-part response, then this is set to the current
   // part ID during OnStartRequest.
   Maybe<uint32_t> mMultiPartID;
 
   // To ensure only one SendDeletingChannel is triggered.
-  Atomic<bool> mDeletingChannelSent{false};
+  Atomic<bool> mDeletingChannelSent;
 
-  Atomic<bool, SequentiallyConsistent> mIsFromCache{false};
-  Atomic<bool, SequentiallyConsistent> mIsRacing{false};
+  Atomic<bool, SequentiallyConsistent> mIsFromCache;
+  Atomic<bool, SequentiallyConsistent> mIsRacing;
   // Set if we get the result and cache |mNeedToReportBytesRead|
-  Atomic<bool, SequentiallyConsistent> mCacheNeedToReportBytesReadInitialized{
-      false};
+  Atomic<bool, SequentiallyConsistent> mCacheNeedToReportBytesReadInitialized;
   // True if we need to tell the parent the size of unreported received data
-  Atomic<bool, SequentiallyConsistent> mNeedToReportBytesRead{true};
+  Atomic<bool, SequentiallyConsistent> mNeedToReportBytesRead;
 
 #ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
   bool mDoDiagnosticAssertWhenOnStopNotCalledOnDestroy = false;
   bool mAsyncOpenSucceeded = false;
   bool mSuccesfullyRedirected = false;
   bool mRemoteChannelExistedAtCancel = false;
   bool mEverHadBgChildAtAsyncOpen = false;
   bool mEverHadBgChildAtConnectParent = false;
@@ -338,17 +335,17 @@ class HttpChannelChild final : public PH
   enum BckChildQueueStatus {
     // BckChild never told us
     BCKCHILD_UNKNOWN,
     // BckChild was empty at the time of destruction
     BCKCHILD_EMPTY,
     // BckChild was keeping events in the queue at the destruction time!
     BCKCHILD_NON_EMPTY
   };
-  Atomic<BckChildQueueStatus> mBackgroundChildQueueFinalState{BCKCHILD_UNKNOWN};
+  Atomic<BckChildQueueStatus> mBackgroundChildQueueFinalState;
   Maybe<ActorDestroyReason> mActorDestroyReason;
 #endif
 
   uint8_t mCacheEntryAvailable : 1;
   uint8_t mAltDataCacheEntryAvailable : 1;
 
   // If ResumeAt is called before AsyncOpen, we need to send extra data upstream
   uint8_t mSendResumeAt : 1;
--- a/netwerk/protocol/http/HttpConnectionBase.cpp
+++ b/netwerk/protocol/http/HttpConnectionBase.cpp
@@ -26,17 +26,22 @@
 
 namespace mozilla {
 namespace net {
 
 //-----------------------------------------------------------------------------
 // nsHttpConnection <public>
 //-----------------------------------------------------------------------------
 
-HttpConnectionBase::HttpConnectionBase() {
+HttpConnectionBase::HttpConnectionBase()
+    : mTransactionCaps(0),
+      mExperienced(false),
+      mBootstrappedTimingsSet(false),
+      mCallbacksLock("nsHttpConnection::mCallbacksLock"),
+      mRtt(0) {
   LOG(("Creating HttpConnectionBase @%p\n", this));
 }
 
 void HttpConnectionBase::BootstrapTimings(TimingStruct times) {
   mBootstrappedTimingsSet = true;
   mBootstrappedTimings = times;
 }
 
--- a/netwerk/protocol/http/HttpConnectionBase.h
+++ b/netwerk/protocol/http/HttpConnectionBase.h
@@ -134,30 +134,30 @@ class HttpConnectionBase : public nsSupp
 
   virtual nsresult GetSelfAddr(NetAddr* addr) = 0;
   virtual nsresult GetPeerAddr(NetAddr* addr) = 0;
   virtual bool ResolvedByTRR() = 0;
   virtual bool GetEchConfigUsed() = 0;
 
  protected:
   // The capabailities associated with the most recent transaction
-  uint32_t mTransactionCaps{0};
+  uint32_t mTransactionCaps;
 
   RefPtr<nsHttpConnectionInfo> mConnInfo;
 
-  bool mExperienced{false};
+  bool mExperienced;
 
-  bool mBootstrappedTimingsSet{false};
+  bool mBootstrappedTimingsSet;
   TimingStruct mBootstrappedTimings;
 
-  Mutex mCallbacksLock{"nsHttpConnection::mCallbacksLock"};
+  Mutex mCallbacksLock;
   nsMainThreadPtrHandle<nsIInterfaceRequestor> mCallbacks;
 
   nsTArray<HttpTrafficCategory> mTrafficCategory;
-  PRIntervalTime mRtt{0};
+  PRIntervalTime mRtt;
   nsresult mErrorBeforeConnect = NS_OK;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(HttpConnectionBase, HTTPCONNECTIONBASE_IID)
 
 #define NS_DECL_HTTPCONNECTIONBASE                                             \
   [[nodiscard]] nsresult Activate(nsAHttpTransaction*, uint32_t, int32_t)      \
       override;                                                                \
--- a/netwerk/protocol/http/HttpConnectionMgrParent.cpp
+++ b/netwerk/protocol/http/HttpConnectionMgrParent.cpp
@@ -17,16 +17,18 @@
 #include "nsIOService.h"
 #include "nsQueryObject.h"
 
 namespace mozilla {
 namespace net {
 
 NS_IMPL_ISUPPORTS0(HttpConnectionMgrParent)
 
+HttpConnectionMgrParent::HttpConnectionMgrParent() : mShutDown(false) {}
+
 nsresult HttpConnectionMgrParent::Init(
     uint16_t maxUrgentExcessiveConns, uint16_t maxConnections,
     uint16_t maxPersistentConnectionsPerHost,
     uint16_t maxPersistentConnectionsPerProxy, uint16_t maxRequestDelay,
     bool throttleEnabled, uint32_t throttleVersion, uint32_t throttleSuspendFor,
     uint32_t throttleResumeFor, uint32_t throttleReadLimit,
     uint32_t throttleReadInterval, uint32_t throttleHoldTime,
     uint32_t throttleMaxTime, bool beConservativeForProxy) {
--- a/netwerk/protocol/http/HttpConnectionMgrParent.h
+++ b/netwerk/protocol/http/HttpConnectionMgrParent.h
@@ -15,20 +15,20 @@ namespace net {
 // HttpConnectionMgrParent plays the role of nsHttpConnectionMgr and delegates
 // the work to the nsHttpConnectionMgr in socket process.
 class HttpConnectionMgrParent final : public PHttpConnectionMgrParent,
                                       public HttpConnectionMgrShell {
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_HTTPCONNECTIONMGRSHELL
 
-  explicit HttpConnectionMgrParent() = default;
+  explicit HttpConnectionMgrParent();
 
  private:
   virtual ~HttpConnectionMgrParent() = default;
 
-  bool mShutDown{false};
+  bool mShutDown;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // HttpConnectionMgrParent_h__
--- a/netwerk/protocol/http/HttpTransactionChild.cpp
+++ b/netwerk/protocol/http/HttpTransactionChild.cpp
@@ -34,17 +34,22 @@ namespace net {
 NS_IMPL_ISUPPORTS(HttpTransactionChild, nsIRequestObserver, nsIStreamListener,
                   nsITransportEventSink, nsIThrottledInputChannel,
                   nsIThreadRetargetableStreamListener);
 
 //-----------------------------------------------------------------------------
 // HttpTransactionChild <public>
 //-----------------------------------------------------------------------------
 
-HttpTransactionChild::HttpTransactionChild() {
+HttpTransactionChild::HttpTransactionChild()
+    : mCanceled(false),
+      mStatus(NS_OK),
+      mChannelId(0),
+      mIsDocumentLoad(false),
+      mLogicalOffset(0) {
   LOG(("Creating HttpTransactionChild @%p\n", this));
 }
 
 HttpTransactionChild::~HttpTransactionChild() {
   LOG(("Destroying HttpTransactionChild @%p\n", this));
 }
 
 static already_AddRefed<nsIRequestContext> CreateRequestContext(
--- a/netwerk/protocol/http/HttpTransactionChild.h
+++ b/netwerk/protocol/http/HttpTransactionChild.h
@@ -94,22 +94,22 @@ class HttpTransactionChild final : publi
 
   bool CanSendODAToContentProcessDirectly(
       const Maybe<nsHttpResponseHead>& aHead);
 
   ResourceTimingStructArgs GetTimingAttributes();
 
   // Use Release-Acquire ordering to ensure the OMT ODA is ignored while
   // transaction is canceled on main thread.
-  Atomic<bool, ReleaseAcquire> mCanceled{false};
-  Atomic<nsresult, ReleaseAcquire> mStatus{NS_OK};
-  uint64_t mChannelId{0};
+  Atomic<bool, ReleaseAcquire> mCanceled;
+  Atomic<nsresult, ReleaseAcquire> mStatus;
+  uint64_t mChannelId;
   nsHttpRequestHead mRequestHead;
-  bool mIsDocumentLoad{false};
-  uint64_t mLogicalOffset{0};
+  bool mIsDocumentLoad;
+  uint64_t mLogicalOffset;
   TimeStamp mRedirectStart;
   TimeStamp mRedirectEnd;
   nsCString mProtocolVersion;
 
   nsCOMPtr<nsIInputStream> mUploadStream;
   RefPtr<nsHttpTransaction> mTransaction;
   nsCOMPtr<nsIRequest> mTransactionPump;
   Maybe<TransactionObserverResult> mTransactionObserverResult;
--- a/netwerk/protocol/http/HttpTransactionParent.cpp
+++ b/netwerk/protocol/http/HttpTransactionParent.cpp
@@ -70,18 +70,48 @@ NS_IMETHODIMP_(MozExternalRefCountType) 
   return count;
 }
 
 //-----------------------------------------------------------------------------
 // HttpTransactionParent <public>
 //-----------------------------------------------------------------------------
 
 HttpTransactionParent::HttpTransactionParent(bool aIsDocumentLoad)
-    : mIsDocumentLoad(aIsDocumentLoad) {
+    : mEventTargetMutex("HttpTransactionParent::EventTargetMutex"),
+      mResponseIsComplete(false),
+      mTransferSize(0),
+      mRequestSize(0),
+      mProxyConnectFailed(false),
+      mCanceled(false),
+      mStatus(NS_OK),
+      mSuspendCount(0),
+      mResponseHeadTaken(false),
+      mResponseTrailersTaken(false),
+      mOnStartRequestCalled(false),
+      mOnStopRequestCalled(false),
+      mResolvedByTRR(false),
+      mEchConfigUsed(false),
+      mProxyConnectResponseCode(0),
+      mChannelId(0),
+      mDataSentToChildProcess(false),
+      mIsDocumentLoad(aIsDocumentLoad),
+      mRestarted(false),
+      mCaps(0) {
   LOG(("Creating HttpTransactionParent @%p\n", this));
+
+  this->mSelfAddr.inet = {};
+  this->mPeerAddr.inet = {};
+
+#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;
+
   mEventQ = new ChannelEventQueue(static_cast<nsIRequest*>(this));
 }
 
 HttpTransactionParent::~HttpTransactionParent() {
   LOG(("Destroying HttpTransactionParent @%p\n", this));
 }
 
 //-----------------------------------------------------------------------------
--- a/netwerk/protocol/http/HttpTransactionParent.h
+++ b/netwerk/protocol/http/HttpTransactionParent.h
@@ -113,42 +113,42 @@ class HttpTransactionParent final : publ
   already_AddRefed<nsIEventTarget> GetODATarget();
   void CancelOnMainThread(nsresult aRv);
   void HandleAsyncAbort();
 
   nsCOMPtr<nsITransportEventSink> mEventsink;
   nsCOMPtr<nsIStreamListener> mChannel;
   nsCOMPtr<nsIEventTarget> mTargetThread;
   nsCOMPtr<nsIEventTarget> mODATarget;
-  Mutex mEventTargetMutex{"HttpTransactionParent::EventTargetMutex"};
+  Mutex mEventTargetMutex;
   nsCOMPtr<nsISupports> mSecurityInfo;
   UniquePtr<nsHttpResponseHead> mResponseHead;
   UniquePtr<nsHttpHeaderArray> mResponseTrailers;
   RefPtr<ChannelEventQueue> mEventQ;
 
-  bool mResponseIsComplete{false};
-  int64_t mTransferSize{0};
-  int64_t mRequestSize{0};
+  bool mResponseIsComplete;
+  int64_t mTransferSize;
+  int64_t mRequestSize;
   bool mIsHttp3Used = false;
-  bool mProxyConnectFailed{false};
-  Atomic<bool, ReleaseAcquire> mCanceled{false};
-  Atomic<nsresult, ReleaseAcquire> mStatus{NS_OK};
-  int32_t mSuspendCount{0};
-  bool mResponseHeadTaken{false};
-  bool mResponseTrailersTaken{false};
-  bool mOnStartRequestCalled{false};
-  bool mOnStopRequestCalled{false};
-  bool mResolvedByTRR{false};
+  bool mProxyConnectFailed;
+  Atomic<bool, ReleaseAcquire> mCanceled;
+  Atomic<nsresult, ReleaseAcquire> mStatus;
+  int32_t mSuspendCount;
+  bool mResponseHeadTaken;
+  bool mResponseTrailersTaken;
+  bool mOnStartRequestCalled;
+  bool mOnStopRequestCalled;
+  bool mResolvedByTRR;
   bool mEchConfigUsed = false;
-  int32_t mProxyConnectResponseCode{0};
-  uint64_t mChannelId{0};
-  bool mDataSentToChildProcess{false};
+  int32_t mProxyConnectResponseCode;
+  uint64_t mChannelId;
+  bool mDataSentToChildProcess;
   bool mIsDocumentLoad;
-  bool mRestarted{false};
-  uint32_t mCaps{0};
+  bool mRestarted;
+  uint32_t mCaps;
   TimeStamp mRedirectStart;
   TimeStamp mRedirectEnd;
 
   NetAddr mSelfAddr;
   NetAddr mPeerAddr;
   TimingStruct mTimings;
   TimeStamp mDomainLookupStart;
   TimeStamp mDomainLookupEnd;
--- a/netwerk/protocol/http/NullHttpChannel.cpp
+++ b/netwerk/protocol/http/NullHttpChannel.cpp
@@ -9,17 +9,18 @@
 #include "nsIStreamListener.h"
 
 namespace mozilla {
 namespace net {
 
 NS_IMPL_ISUPPORTS(NullHttpChannel, nsINullChannel, nsIHttpChannel,
                   nsIIdentChannel, nsITimedChannel)
 
-NullHttpChannel::NullHttpChannel() {
+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();
--- a/netwerk/protocol/http/NullHttpChannel.h
+++ b/netwerk/protocol/http/NullHttpChannel.h
@@ -49,16 +49,16 @@ class NullHttpChannel final : public nsI
   nsCOMPtr<nsIURI> mOriginalURI;
 
   nsString mInitiatorType;
   PRTime mChannelCreationTime;
   TimeStamp mAsyncOpenTime;
   TimeStamp mChannelCreationTimestamp;
   nsCOMPtr<nsIPrincipal> mResourcePrincipal;
   nsCString mTimingAllowOriginHeader;
-  bool mAllRedirectsSameOrigin{false};
-  bool mAllRedirectsPassTimingAllowCheck{false};
+  bool mAllRedirectsSameOrigin;
+  bool mAllRedirectsPassTimingAllowCheck;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // mozilla_net_NullHttpChannel_h
--- a/netwerk/protocol/http/SpeculativeTransaction.cpp
+++ b/netwerk/protocol/http/SpeculativeTransaction.cpp
@@ -13,16 +13,17 @@
 
 namespace mozilla {
 namespace net {
 
 SpeculativeTransaction::SpeculativeTransaction(
     nsHttpConnectionInfo* aConnInfo, nsIInterfaceRequestor* aCallbacks,
     uint32_t aCaps, std::function<void(bool)>&& aCallback)
     : NullHttpTransaction(aConnInfo, aCallbacks, aCaps),
+      mTriedToWrite(false),
       mCloseCallback(std::move(aCallback)) {}
 
 already_AddRefed<SpeculativeTransaction>
 SpeculativeTransaction::CreateWithNewConnInfo(nsHttpConnectionInfo* aConnInfo) {
   RefPtr<SpeculativeTransaction> trans =
       new SpeculativeTransaction(aConnInfo, mCallbacks, mCaps);
   trans->mParallelSpeculativeConnectLimit = mParallelSpeculativeConnectLimit;
   trans->mIgnoreIdle = mIgnoreIdle;
--- a/netwerk/protocol/http/TRRServiceChannel.cpp
+++ b/netwerk/protocol/http/TRRServiceChannel.cpp
@@ -83,16 +83,17 @@ NS_INTERFACE_MAP_BEGIN(TRRServiceChannel
   NS_INTERFACE_MAP_ENTRY(nsITransportEventSink)
   NS_INTERFACE_MAP_ENTRY(nsIDNSListener)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
   NS_INTERFACE_MAP_ENTRY_CONCRETE(TRRServiceChannel)
 NS_INTERFACE_MAP_END_INHERITING(HttpBaseChannel)
 
 TRRServiceChannel::TRRServiceChannel()
     : HttpAsyncAborter<TRRServiceChannel>(this),
+      mPushedStreamId(0),
       mProxyRequest(nullptr, "TRRServiceChannel::mProxyRequest"),
       mCurrentEventTarget(GetCurrentEventTarget()) {
   LOG(("TRRServiceChannel ctor [this=%p]\n", this));
 }
 
 TRRServiceChannel::~TRRServiceChannel() {
   LOG(("TRRServiceChannel dtor [this=%p]\n", this));
 }
--- a/netwerk/protocol/http/TRRServiceChannel.h
+++ b/netwerk/protocol/http/TRRServiceChannel.h
@@ -139,17 +139,17 @@ class TRRServiceChannel : public HttpBas
 
   nsCString mUsername;
 
   // Needed for accurate DNS timing
   RefPtr<nsDNSPrefetch> mDNSPrefetch;
 
   nsCOMPtr<nsIRequest> mTransactionPump;
   RefPtr<HttpTransactionShell> mTransaction;
-  uint32_t mPushedStreamId{0};
+  uint32_t mPushedStreamId;
   RefPtr<HttpTransactionShell> mTransWithPushedStream;
   DataMutex<nsCOMPtr<nsICancelable>> mProxyRequest;
   nsCOMPtr<nsIEventTarget> mCurrentEventTarget;
 
   friend class HttpAsyncAborter<TRRServiceChannel>;
   friend class nsHttpHandler;
 };
 
--- a/netwerk/protocol/http/nsCORSListenerProxy.cpp
+++ b/netwerk/protocol/http/nsCORSListenerProxy.cpp
@@ -443,32 +443,32 @@ nsCORSListenerProxy::OnStartRequest(nsIR
   return listener->OnStartRequest(aRequest);
 }
 
 namespace {
 class CheckOriginHeader final : public nsIHttpHeaderVisitor {
  public:
   NS_DECL_ISUPPORTS
 
-  CheckOriginHeader() = default;
+  CheckOriginHeader() : mHeaderCount(0) {}
 
   NS_IMETHOD
   VisitHeader(const nsACString& aHeader, const nsACString& aValue) override {
     if (aHeader.EqualsLiteral("Access-Control-Allow-Origin")) {
       mHeaderCount++;
     }
 
     if (mHeaderCount > 1) {
       return NS_ERROR_DOM_BAD_URI;
     }
     return NS_OK;
   }
 
  private:
-  uint32_t mHeaderCount{0};
+  uint32_t mHeaderCount;
 
   ~CheckOriginHeader() = default;
 };
 
 NS_IMPL_ISUPPORTS(CheckOriginHeader, nsIHttpHeaderVisitor)
 }  // namespace
 
 nsresult nsCORSListenerProxy::CheckRequestApproved(nsIRequest* aRequest) {
--- a/netwerk/protocol/http/nsHttpActivityDistributor.cpp
+++ b/netwerk/protocol/http/nsHttpActivityDistributor.cpp
@@ -20,16 +20,19 @@ namespace mozilla {
 namespace net {
 
 using ObserverHolder = nsMainThreadPtrHolder<nsIHttpActivityObserver>;
 using ObserverHandle = nsMainThreadPtrHandle<nsIHttpActivityObserver>;
 
 NS_IMPL_ISUPPORTS(nsHttpActivityDistributor, nsIHttpActivityDistributor,
                   nsIHttpActivityObserver)
 
+nsHttpActivityDistributor::nsHttpActivityDistributor()
+    : mLock("nsHttpActivityDistributor.mLock"), mActivated(false) {}
+
 NS_IMETHODIMP
 nsHttpActivityDistributor::ObserveActivity(nsISupports* aHttpChannel,
                                            uint32_t aActivityType,
                                            uint32_t aActivitySubtype,
                                            PRTime aTimestamp,
                                            uint64_t aExtraSizeData,
                                            const nsACString& aExtraStringData) {
   MOZ_ASSERT(XRE_IsParentProcess() && NS_IsMainThread());
--- a/netwerk/protocol/http/nsHttpActivityDistributor.h
+++ b/netwerk/protocol/http/nsHttpActivityDistributor.h
@@ -16,22 +16,22 @@ namespace net {
 class nsHttpActivityDistributor : public nsIHttpActivityDistributor {
  public:
   using ObserverArray =
       nsTArray<nsMainThreadPtrHandle<nsIHttpActivityObserver>>;
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIHTTPACTIVITYOBSERVER
   NS_DECL_NSIHTTPACTIVITYDISTRIBUTOR
 
-  nsHttpActivityDistributor() = default;
+  nsHttpActivityDistributor();
 
  protected:
   virtual ~nsHttpActivityDistributor() = default;
 
   ObserverArray mObservers;
-  Mutex mLock{"nsHttpActivityDistributor.mLock"};
-  bool mActivated{false};
+  Mutex mLock;
+  bool mActivated;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // nsHttpActivityDistributor_h__
--- a/netwerk/protocol/http/nsHttpAuthCache.cpp
+++ b/netwerk/protocol/http/nsHttpAuthCache.cpp
@@ -279,37 +279,35 @@ nsHttpAuthEntry::~nsHttpAuthEntry() {
 
 nsresult nsHttpAuthEntry::AddPath(const char* aPath) {
   // null path matches empty path
   if (!aPath) aPath = "";
 
   nsHttpAuthPath* tempPtr = mRoot;
   while (tempPtr) {
     const char* curpath = tempPtr->mPath;
-    if (strncmp(aPath, curpath, strlen(curpath)) == 0) {
+    if (strncmp(aPath, curpath, strlen(curpath)) == 0)
       return NS_OK;  // subpath already exists in the list
-    }
 
     tempPtr = tempPtr->mNext;
   }
 
   // Append the aPath
   nsHttpAuthPath* newAuthPath;
   int newpathLen = strlen(aPath);
   newAuthPath = (nsHttpAuthPath*)malloc(sizeof(nsHttpAuthPath) + newpathLen);
   if (!newAuthPath) return NS_ERROR_OUT_OF_MEMORY;
 
   memcpy(newAuthPath->mPath, aPath, newpathLen + 1);
   newAuthPath->mNext = nullptr;
 
-  if (!mRoot) {
+  if (!mRoot)
     mRoot = newAuthPath;  // first entry
-  } else {
+  else
     mTail->mNext = newAuthPath;  // Append newAuthPath
-  }
 
   // update the tail pointer.
   mTail = newAuthPath;
   return NS_OK;
 }
 
 nsresult nsHttpAuthEntry::Set(const char* path, const char* realm,
                               const char* creds, const char* chall,
--- a/netwerk/protocol/http/nsHttpAuthCache.h
+++ b/netwerk/protocol/http/nsHttpAuthCache.h
@@ -26,17 +26,17 @@ struct nsHttpAuthPath {
 };
 
 //-----------------------------------------------------------------------------
 // nsHttpAuthIdentity
 //-----------------------------------------------------------------------------
 
 class nsHttpAuthIdentity {
  public:
-  nsHttpAuthIdentity() = default;
+  nsHttpAuthIdentity() : mUser(nullptr), 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(); }
 
@@ -46,24 +46,24 @@ class nsHttpAuthIdentity {
 
   [[nodiscard]] nsresult Set(const char16_t* domain, const char16_t* user,
                              const char16_t* password);
   [[nodiscard]] nsresult Set(const nsHttpAuthIdentity& other) {
     return Set(other.mDomain, other.mUser, other.mPass);
   }
   void Clear();
 
-  bool Equals(const nsHttpAuthIdentity& ident) const;
+  bool Equals(const nsHttpAuthIdentity& other) const;
   bool IsEmpty() const { return !mUser; }
 
  private:
   // allocated as one contiguous blob, starting at mUser.
-  char16_t* mUser{nullptr};
-  char16_t* mPass{nullptr};
-  char16_t* mDomain{nullptr};
+  char16_t* mUser;
+  char16_t* mPass;
+  char16_t* mDomain;
 };
 
 //-----------------------------------------------------------------------------
 // nsHttpAuthEntry
 //-----------------------------------------------------------------------------
 
 class nsHttpAuthEntry {
  public:
@@ -133,17 +133,18 @@ class nsHttpAuthNode {
   nsHttpAuthEntry* LookupEntryByPath(const char* path);
 
   // realm must not be null
   nsHttpAuthEntry* LookupEntryByRealm(const char* realm);
   EntryList::const_iterator LookupEntryItrByRealm(const char* realm) const;
 
   // if a matching entry is found, then credentials will be changed.
   [[nodiscard]] nsresult SetAuthEntry(const char* path, const char* realm,
-                                      const char* creds, const char* challenge,
+                                      const char* credentials,
+                                      const char* challenge,
                                       const nsHttpAuthIdentity* ident,
                                       nsISupports* metadata);
 
   void ClearAuthEntry(const char* realm);
 
   uint32_t EntryCount() { return mList.Length(); }
 
  private:
@@ -182,23 +183,21 @@ class nsHttpAuthCache {
                                                nsACString const& originSuffix,
                                                nsHttpAuthEntry** entry);
 
   // |scheme|, |host|, and |port| are required
   // |path| can be null
   // |realm| must not be null
   // if |credentials|, |user|, |pass|, and |challenge| are each
   // null, then the entry is deleted.
-  [[nodiscard]] nsresult SetAuthEntry(const char* scheme, const char* host,
-                                      int32_t port, const char* path,
-                                      const char* realm, const char* creds,
-                                      const char* challenge,
-                                      nsACString const& originSuffix,
-                                      const nsHttpAuthIdentity* ident,
-                                      nsISupports* metadata);
+  [[nodiscard]] nsresult SetAuthEntry(
+      const char* scheme, const char* host, int32_t port, const char* directory,
+      const char* realm, const char* credentials, const char* challenge,
+      nsACString const& originSuffix, const nsHttpAuthIdentity* ident,
+      nsISupports* metadata);
 
   void ClearAuthEntry(const char* scheme, const char* host, int32_t port,
                       const char* realm, nsACString const& originSuffix);
 
   // expire all existing auth list entries including proxy auths.
   void ClearAll();
 
   // For testing only.
--- a/netwerk/protocol/http/nsHttpAuthManager.cpp
+++ b/netwerk/protocol/http/nsHttpAuthManager.cpp
@@ -11,16 +11,19 @@
 #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);
     if (NS_FAILED(rv)) return rv;
@@ -50,25 +53,24 @@ nsHttpAuthManager::GetAuthIdentity(
   nsHttpAuthEntry* entry = nullptr;
   nsresult rv;
 
   nsAutoCString originSuffix;
   if (aPrincipal) {
     aPrincipal->OriginAttributesRef().CreateSuffix(originSuffix);
   }
 
-  if (!aPath.IsEmpty()) {
+  if (!aPath.IsEmpty())
     rv = auth_cache->GetAuthEntryForPath(
         PromiseFlatCString(aScheme).get(), PromiseFlatCString(aHost).get(),
         aPort, PromiseFlatCString(aPath).get(), originSuffix, &entry);
-  } else {
+  else
     rv = auth_cache->GetAuthEntryForDomain(
         PromiseFlatCString(aScheme).get(), PromiseFlatCString(aHost).get(),
         aPort, PromiseFlatCString(aRealm).get(), originSuffix, &entry);
-  }
 
   if (NS_FAILED(rv)) return rv;
   if (!entry) return NS_ERROR_UNEXPECTED;
 
   aUserDomain.Assign(entry->Domain());
   aUserName.Assign(entry->User());
   aUserPassword.Assign(entry->Pass());
   return NS_OK;
--- a/netwerk/protocol/http/nsHttpAuthManager.h
+++ b/netwerk/protocol/http/nsHttpAuthManager.h
@@ -13,22 +13,22 @@ namespace net {
 
 class nsHttpAuthCache;
 
 class nsHttpAuthManager : public nsIHttpAuthManager {
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIHTTPAUTHMANAGER
 
-  nsHttpAuthManager() = default;
+  nsHttpAuthManager();
   [[nodiscard]] nsresult Init();
 
  protected:
   virtual ~nsHttpAuthManager() = default;
 
-  nsHttpAuthCache* mAuthCache{nullptr};
-  nsHttpAuthCache* mPrivateAuthCache{nullptr};
+  nsHttpAuthCache* mAuthCache;
+  nsHttpAuthCache* mPrivateAuthCache;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // nsHttpAuthManager_h__
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -297,17 +297,41 @@ void AutoRedirectVetoNotifier::ReportRed
   // Drop after the notification
   channel->StoreHasAutoRedirectVetoNotifier(false);
 }
 
 //-----------------------------------------------------------------------------
 // nsHttpChannel <public>
 //-----------------------------------------------------------------------------
 
-nsHttpChannel::nsHttpChannel() : HttpAsyncAborter<nsHttpChannel>(this) {
+nsHttpChannel::nsHttpChannel()
+    : HttpAsyncAborter<nsHttpChannel>(this),
+      mCacheDisposition(kCacheUnresolved),
+      mLogicalOffset(0),
+      mPostID(0),
+      mRequestTime(0),
+      mSuspendTotalTime(0),
+      mRedirectType(0),
+      mCacheOpenWithPriority(false),
+      mCacheQueueSizeWhenOpen(0),
+      mCachedContentIsValid(false),
+      mIsAuthChannel(false),
+      mAuthRetryPending(false),
+      mPushedStreamId(0),
+      mLocalBlocklist(false),
+      mOnTailUnblock(nullptr),
+      mWarningReporter(nullptr),
+      mIsReadingFromCache(false),
+      mFirstResponseSource(RESPONSE_PENDING),
+      mRaceCacheWithNetwork(false),
+      mRaceDelay(0),
+      mIgnoreCacheEntry(false),
+      mRCWNLock("nsHttpChannel.mRCWNLock"),
+      mProxyConnectResponseCode(0),
+      mDidReval(false) {
   LOG(("Creating nsHttpChannel [this=%p]\n", this));
   mChannelCreationTime = PR_Now();
   mChannelCreationTimestamp = TimeStamp::Now();
 }
 
 nsHttpChannel::~nsHttpChannel() {
   LOG(("Destroying nsHttpChannel [this=%p]\n", this));
 
@@ -9052,18 +9076,19 @@ nsHttpChannel::Test_triggerNetwork(int32
 NS_IMETHODIMP
 nsHttpChannel::Notify(nsITimer* aTimer) {
   RefPtr<nsHttpChannel> self(this);
   if (aTimer == mCacheOpenTimer) {
     return Test_triggerDelayedOpenCacheEntry();
   }
   if (aTimer == mNetworkTriggerTimer) {
     return TriggerNetwork();
-  }
-  MOZ_CRASH("Unknown timer");
+  } else {
+    MOZ_CRASH("Unknown timer");
+  }
 
   return NS_OK;
 }
 
 bool nsHttpChannel::EligibleForTailing() {
   if (!(mClassOfService & nsIClassOfService::Tail)) {
     return false;
   }
--- a/netwerk/protocol/http/nsHttpChannel.h
+++ b/netwerk/protocol/http/nsHttpChannel.h
@@ -258,17 +258,17 @@ class nsHttpChannel final : public HttpB
 
  public:
   void SetConnectionInfo(nsHttpConnectionInfo*);  // clones the argument
   void SetTransactionObserver(TransactionObserver* arg) {
     mTransactionObserver = arg;
   }
   TransactionObserver* GetTransactionObserver() { return mTransactionObserver; }
 
-  CacheDisposition mCacheDisposition{kCacheUnresolved};
+  CacheDisposition mCacheDisposition;
 
  protected:
   virtual ~nsHttpChannel();
 
  private:
   using nsContinueRedirectionFunc = nsresult (nsHttpChannel::*)(nsresult);
 
   // Directly call |aFunc| if the channel is not canceled and not suspended.
@@ -550,17 +550,17 @@ class nsHttpChannel final : public HttpB
   void PerformBackgroundCacheRevalidationNow();
 
  private:
   nsCOMPtr<nsICancelable> mProxyRequest;
 
   nsCOMPtr<nsIRequest> mTransactionPump;
   RefPtr<HttpTransactionShell> mTransaction;
 
-  uint64_t mLogicalOffset{0};
+  uint64_t mLogicalOffset;
 
   // cache specific data
   nsCOMPtr<nsICacheEntry> mCacheEntry;
   // This will be set during OnStopRequest() before calling CloseCacheEntry(),
   // but only if the listener wants to use alt-data (signaled by
   // HttpBaseChannel::mPreferredCachedAltDataType being not empty)
   // Needed because calling openAlternativeOutputStream needs a reference
   // to the cache entry.
@@ -569,46 +569,46 @@ class nsHttpChannel final : public HttpB
   nsCOMPtr<nsIURI> mCacheEntryURI;
   nsCString mCacheIdExtension;
 
   // We must close mCacheInputStream explicitly to avoid leaks.
   AutoClose<nsIInputStream> mCacheInputStream;
   RefPtr<nsInputStreamPump> mCachePump;
   UniquePtr<nsHttpResponseHead> mCachedResponseHead;
   nsCOMPtr<nsISupports> mCachedSecurityInfo;
-  uint32_t mPostID{0};
-  uint32_t mRequestTime{0};
+  uint32_t mPostID;
+  uint32_t mRequestTime;
 
   nsTArray<StreamFilterRequest> mStreamFilterRequests;
 
   mozilla::TimeStamp mOnStartRequestTimestamp;
   // Timestamp of the time the channel was suspended.
   mozilla::TimeStamp mSuspendTimestamp;
   mozilla::TimeStamp mOnCacheEntryCheckTimestamp;
 #ifdef MOZ_GECKO_PROFILER
   // For the profiler markers
   mozilla::TimeStamp mLastStatusReported;
 #endif
   // Total time the channel spent suspended. This value is reported to
   // telemetry in nsHttpChannel::OnStartRequest().
-  uint32_t mSuspendTotalTime{0};
+  uint32_t mSuspendTotalTime;
 
   friend class AutoRedirectVetoNotifier;
   friend class HttpAsyncAborter<nsHttpChannel>;
 
-  uint32_t mRedirectType{0};
+  uint32_t mRedirectType;
 
   static const uint32_t WAIT_FOR_CACHE_ENTRY = 1;
 
-  bool mCacheOpenWithPriority{false};
-  uint32_t mCacheQueueSizeWhenOpen{0};
+  bool mCacheOpenWithPriority;
+  uint32_t mCacheQueueSizeWhenOpen;
 
-  Atomic<bool, Relaxed> mCachedContentIsValid{false};
-  Atomic<bool> mIsAuthChannel{false};
-  Atomic<bool> mAuthRetryPending{false};
+  Atomic<bool, Relaxed> mCachedContentIsValid;
+  Atomic<bool> mIsAuthChannel;
+  Atomic<bool> mAuthRetryPending;
 
   // clang-format off
   // state flags
   MOZ_ATOMIC_BITFIELDS(mAtomicBitfields5, 32, (
     (uint32_t, CachedContentIsPartial, 1),
     (uint32_t, CacheOnlyMetadata, 1),
     (uint32_t, TransactionReplaced, 1),
     (uint32_t, ProxyAuthPending, 1),
@@ -683,22 +683,22 @@ class nsHttpChannel final : public HttpB
   ))
   // clang-format on
 
   nsTArray<nsContinueRedirectionFunc> mRedirectFuncStack;
 
   // Needed for accurate DNS timing
   RefPtr<nsDNSPrefetch> mDNSPrefetch;
 
-  uint32_t mPushedStreamId{0};
+  uint32_t mPushedStreamId;
   RefPtr<HttpTransactionShell> mTransWithPushedStream;
 
   // True if the channel's principal was found on a phishing, malware, or
   // tracking (if tracking protection is enabled) blocklist
-  bool mLocalBlocklist{false};
+  bool mLocalBlocklist;
 
   [[nodiscard]] nsresult WaitForRedirectCallback();
   void PushRedirectAsyncFunc(nsContinueRedirectionFunc func);
   void PopRedirectAsyncFunc(nsContinueRedirectionFunc func);
 
   // If this resource is eligible for tailing based on class-of-service flags
   // and load flags.  We don't tail Leaders/Unblocked/UrgentStart and top-level
   // loads.
@@ -708,44 +708,43 @@ class nsHttpChannel final : public HttpB
   // callbacks. If this channel is 1) Tail, 2) assigned a request context, 3)
   // the context is still in the tail-blocked phase, then the method will queue
   // this channel. OnTailUnblock will be called after the context is
   // tail-unblocked or canceled.
   bool WaitingForTailUnblock();
 
   // A function we trigger when untail callback is triggered by our request
   // context in case this channel was tail-blocked.
-  using TailUnblockCallback = nsresult (nsHttpChannel::*)();
-  TailUnblockCallback mOnTailUnblock{nullptr};
+  nsresult (nsHttpChannel::*mOnTailUnblock)();
   // Called on untail when tailed during AsyncOpen execution.
   nsresult AsyncOpenOnTailUnblock();
   // Called on untail when tailed because of being a tracking resource.
   nsresult ConnectOnTailUnblock();
 
   nsCString mUsername;
 
   // If non-null, warnings should be reported to this object.
   RefPtr<HttpChannelSecurityWarningReporter> mWarningReporter;
 
   // True if the channel is reading from cache.
-  Atomic<bool> mIsReadingFromCache{false};
+  Atomic<bool> mIsReadingFromCache;
 
   // These next members are only used in unit tests to delay the call to
   // cache->AsyncOpenURI in order to race the cache with the network.
   nsCOMPtr<nsITimer> mCacheOpenTimer;
   std::function<void(nsHttpChannel*)> mCacheOpenFunc;
   uint32_t mCacheOpenDelay = 0;
 
   // We need to remember which is the source of the response we are using.
   enum ResponseSource {
     RESPONSE_PENDING = 0,      // response is pending
     RESPONSE_FROM_CACHE = 1,   // response coming from cache. no network.
     RESPONSE_FROM_NETWORK = 2  // response coming from the network
   };
-  Atomic<ResponseSource, Relaxed> mFirstResponseSource{RESPONSE_PENDING};
+  Atomic<ResponseSource, Relaxed> mFirstResponseSource;
 
   // Determines if it's possible and advisable to race the network request
   // with the cache fetch, and proceeds to do so.
   void MaybeRaceCacheWithNetwork();
 
   // Creates a new cache entry when network wins the race to ensure we have
   // the latest version of the resource in the cache. Otherwise we might return
   // an old content when navigating back in history.
@@ -761,56 +760,56 @@ class nsHttpChannel final : public HttpB
   // request if retrieving the cache entry takes too long.
   nsCOMPtr<nsITimer> mNetworkTriggerTimer;
   // Is true if the network request has been triggered.
   bool mNetworkTriggered = false;
   bool mWaitingForProxy = false;
   bool mStaleRevalidation = false;
   // Will be true if the onCacheEntryAvailable callback is not called by the
   // time we send the network request
-  Atomic<bool> mRaceCacheWithNetwork{false};
-  uint32_t mRaceDelay{0};
+  Atomic<bool> mRaceCacheWithNetwork;
+  uint32_t mRaceDelay;
   // If true then OnCacheEntryAvailable should ignore the entry, because
   // SetupTransaction removed conditional headers and decisions made in
   // OnCacheEntryCheck are no longer valid.
-  bool mIgnoreCacheEntry{false};
+  bool mIgnoreCacheEntry;
   // Lock preventing SetupTransaction/MaybeCreateCacheEntryWhenRCWN and
   // OnCacheEntryCheck being called at the same time.
-  mozilla::Mutex mRCWNLock{"nsHttpChannel.mRCWNLock"};
+  mozilla::Mutex mRCWNLock;
 
   TimeStamp mNavigationStartTimeStamp;
 
   // Promise that blocks connection creation when we want to resolve the origin
   // host name to be able to give the configured proxy only the resolved IP
   // to not leak names.
   MozPromiseHolder<DNSPromise> mDNSBlockingPromise;
   // When we hit DoConnect before the resolution is done, Then() will be set
   // here to resume DoConnect.
   RefPtr<DNSPromise> mDNSBlockingThenable;
 
   // We update the value of mProxyConnectResponseCode when OnStartRequest is
   // called and reset the value when we switch to another failover proxy.
-  int32_t mProxyConnectResponseCode{0};
+  int32_t mProxyConnectResponseCode;
 
   // If mHTTPSSVCRecord has value, it means OnHTTPSRRAvailable() is called and
   // we got the result of HTTPS RR query. Otherwise, it means we are still
   // waiting for the result or the query is not performed.
   Maybe<nsCOMPtr<nsIDNSHTTPSSVCRecord>> mHTTPSSVCRecord;
 
  protected:
   virtual void DoNotifyListenerCleanup() override;
 
   // Override ReleaseListeners() because mChannelClassifier only exists
   // in nsHttpChannel and it will be released in ReleaseListeners().
   virtual void ReleaseListeners() override;
 
   virtual void DoAsyncAbort(nsresult aStatus) override;
 
  private:  // cache telemetry
-  bool mDidReval{false};
+  bool mDidReval;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsHttpChannel, NS_HTTPCHANNEL_IID)
 }  // namespace net
 }  // namespace mozilla
 
 inline nsISupports* ToSupports(mozilla::net::nsHttpChannel* aChannel) {
   return static_cast<nsIHttpChannel*>(aChannel);
--- a/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
+++ b/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
@@ -71,17 +71,24 @@ static void GetOriginAttributesSuffix(ns
   if (aChan) {
     StoragePrincipalHelper::GetOriginAttributesForNetworkState(aChan, oa);
   }
 
   oa.CreateSuffix(aSuffix);
 }
 
 nsHttpChannelAuthProvider::nsHttpChannelAuthProvider()
-    : mProxyAuth(false),
+    : mAuthChannel(nullptr),
+      mPort(-1),
+      mUsingSSL(false),
+      mProxyUsingSSL(false),
+      mIsPrivate(false),
+      mProxyAuthContinuationState(nullptr),
+      mAuthContinuationState(nullptr),
+      mProxyAuth(false),
       mTriedProxyAuth(false),
       mTriedHostAuth(false),
       mSuppressDefensiveAuth(false),
       mCrossOrigin(false),
       mConnectionBased(false),
       mHttpHandler(gHttpHandler) {}
 
 nsHttpChannelAuthProvider::~nsHttpChannelAuthProvider() {
@@ -168,33 +175,31 @@ nsHttpChannelAuthProvider::ProcessAuthen
     if (UsingSSL() && !SSLConnectFailed) {
       // we need to verify that this challenge came from the proxy
       // server itself, and not some server on the other side of the
       // SSL tunnel.
       LOG(("rejecting 407 from origin server!\n"));
       return NS_ERROR_UNEXPECTED;
     }
     rv = mAuthChannel->GetProxyChallenges(challenges);
-  } else {
+  } else
     rv = mAuthChannel->GetWWWChallenges(challenges);
-  }
   if (NS_FAILED(rv)) return rv;
 
   nsAutoCString creds;
   rv = GetCredentials(challenges.get(), mProxyAuth, creds);
   if (rv == NS_ERROR_IN_PROGRESS) return rv;
-  if (NS_FAILED(rv)) {
+  if (NS_FAILED(rv))
     LOG(("unable to authenticate\n"));
-  } else {
+  else {
     // set the authentication credentials
-    if (mProxyAuth) {
+    if (mProxyAuth)
       rv = mAuthChannel->SetProxyCredentials(creds);
-    } else {
+    else
       rv = mAuthChannel->SetWWWCredentials(creds);
-    }
   }
   return rv;
 }
 
 NS_IMETHODIMP
 nsHttpChannelAuthProvider::AddAuthorizationHeaders(
     bool aDontUseCachedWWWCreds) {
   LOG(
@@ -322,43 +327,40 @@ static void ParseUserDomain(char16_t* bu
 }
 
 // helper function for setting identity from raw user:pass
 static void SetIdent(nsHttpAuthIdentity& ident, uint32_t authFlags,
                      char16_t* userBuf, char16_t* passBuf) {
   const char16_t* user = userBuf;
   const char16_t* domain = nullptr;
 
-  if (authFlags & nsIHttpAuthenticator::IDENTITY_INCLUDES_DOMAIN) {
+  if (authFlags & nsIHttpAuthenticator::IDENTITY_INCLUDES_DOMAIN)
     ParseUserDomain(userBuf, &user, &domain);
-  }
 
   DebugOnly<nsresult> rv = ident.Set(domain, user, passBuf);
   MOZ_ASSERT(NS_SUCCEEDED(rv));
 }
 
 // helper function for getting an auth prompt from an interface requestor
 static void GetAuthPrompt(nsIInterfaceRequestor* ifreq, bool proxyAuth,
                           nsIAuthPrompt2** result) {
   if (!ifreq) return;
 
   uint32_t promptReason;
-  if (proxyAuth) {
+  if (proxyAuth)
     promptReason = nsIAuthPromptProvider::PROMPT_PROXY;
-  } else {
+  else
     promptReason = nsIAuthPromptProvider::PROMPT_NORMAL;
-  }
 
   nsCOMPtr<nsIAuthPromptProvider> promptProvider = do_GetInterface(ifreq);
-  if (promptProvider) {
+  if (promptProvider)
     promptProvider->GetAuthPrompt(promptReason, NS_GET_IID(nsIAuthPrompt2),
                                   reinterpret_cast<void**>(result));
-  } else {
+  else
     NS_QueryAuthPrompt2(ifreq, result);
-  }
 }
 
 // generate credentials for the given challenge, and update the auth cache.
 nsresult nsHttpChannelAuthProvider::GenCredsAndSetEntry(
     nsIHttpAuthenticator* auth, bool proxyAuth, const char* scheme,
     const char* host, int32_t port, const char* directory, const char* realm,
     const char* challenge, const nsHttpAuthIdentity& ident,
     nsCOMPtr<nsISupports>& sessionState, char** result) {
@@ -524,21 +526,20 @@ nsresult nsHttpChannelAuthProvider::GetC
   nsresult rv = NS_ERROR_NOT_AVAILABLE;
   bool gotCreds = false;
 
   // figure out which challenge we can handle and which authenticator to use.
   for (const char* eol = challenges - 1; eol;) {
     const char* p = eol + 1;
 
     // get the challenge string (LF separated -- see nsHttpHeaderArray)
-    if ((eol = strchr(p, '\n')) != nullptr) {
+    if ((eol = strchr(p, '\n')) != nullptr)
       challenge.Assign(p, eol - p);
-    } else {
+    else
       challenge.Assign(p);
-    }
 
     rv = GetAuthenticator(challenge.get(), authType, getter_AddRefs(auth));
     if (NS_SUCCEEDED(rv)) {
       //
       // if we've already selected an auth type from a previous challenge
       // received while processing this channel, then skip others until
       // we find a challenge corresponding to the previously tried auth
       // type.
@@ -797,21 +798,20 @@ nsresult nsHttpChannelAuthProvider::GetC
     } else if (!identFromURI) {
       // hmm... identity invalid, but no auth entry!  the realm probably
       // changed (see bug 201986).
       ident->Clear();
     }
 
     if (!entry && ident->IsEmpty()) {
       uint32_t level = nsIAuthPrompt2::LEVEL_NONE;
-      if ((!proxyAuth && mUsingSSL) || (proxyAuth && mProxyUsingSSL)) {
+      if ((!proxyAuth && mUsingSSL) || (proxyAuth && mProxyUsingSSL))
         level = nsIAuthPrompt2::LEVEL_SECURE;
-      } else if (authFlags & nsIHttpAuthenticator::IDENTITY_ENCRYPTED) {
+      else if (authFlags & nsIHttpAuthenticator::IDENTITY_ENCRYPTED)
         level = nsIAuthPrompt2::LEVEL_PW_ENCRYPTED;
-      }
 
       // Collect statistics on how frequently the various types of HTTP
       // authentication are used over SSL and non-SSL connections.
       if (Telemetry::CanRecordPrereleaseData()) {
         if ("basic"_ns.LowerCaseEqualsASCII(authType)) {
           Telemetry::Accumulate(
               Telemetry::HTTP_AUTH_TYPE_STATS,
               UsingSSL() ? HTTP_AUTH_BASIC_SECURE : HTTP_AUTH_BASIC_INSECURE);
@@ -1011,21 +1011,20 @@ bool nsHttpChannelAuthProvider::BlockPro
   }
   return false;
 }
 
 inline void GetAuthType(const char* challenge, nsCString& authType) {
   const char* p;
 
   // get the challenge type
-  if ((p = strchr(challenge, ' ')) != nullptr) {
+  if ((p = strchr(challenge, ' ')) != nullptr)
     authType.Assign(challenge, p - challenge);
-  } else {
+  else
     authType.Assign(challenge);
-  }
 }
 
 nsresult nsHttpChannelAuthProvider::GetAuthenticator(
     const char* challenge, nsCString& authType, nsIHttpAuthenticator** auth) {
   LOG(("nsHttpChannelAuthProvider::GetAuthenticator [this=%p channel=%p]\n",
        this, mAuthChannel));
 
   GetAuthType(challenge, authType);
@@ -1102,32 +1101,30 @@ void nsHttpChannelAuthProvider::ParseRea
 
     const char* end;
     if (has_quote) {
       end = p;
       while (*end) {
         if (*end == '\\') {
           // escaped character, store that one instead if not zero
           if (!*++end) break;
-        } else if (*end == '\"') {
+        } else if (*end == '\"')
           // end of string
           break;
-        }
 
         realm.Append(*end);
         ++end;
       }
     } else {
       // realm given without quotes
       end = strchr(p, ' ');
-      if (end) {
+      if (end)
         realm.Assign(p, end - p);
-      } else {
+      else
         realm.Assign(p);
-      }
     }
   }
 }
 
 class nsHTTPAuthInformation : public nsAuthInformationHolder {
  public:
   nsHTTPAuthInformation(uint32_t aFlags, const nsString& aRealm,
                         const nsCString& aAuthType)
@@ -1178,19 +1175,18 @@ nsresult nsHttpChannelAuthProvider::Prom
     if (mTriedProxyAuth) promptFlags |= nsIAuthInformation::PREVIOUS_FAILED;
     mTriedProxyAuth = true;
   } else {
     promptFlags |= nsIAuthInformation::AUTH_HOST;
     if (mTriedHostAuth) promptFlags |= nsIAuthInformation::PREVIOUS_FAILED;
     mTriedHostAuth = true;
   }
 
-  if (authFlags & nsIHttpAuthenticator::IDENTITY_INCLUDES_DOMAIN) {
+  if (authFlags & nsIHttpAuthenticator::IDENTITY_INCLUDES_DOMAIN)
     promptFlags |= nsIAuthInformation::NEED_DOMAIN;
-  }
 
   if (mCrossOrigin) {
     promptFlags |= nsIAuthInformation::CROSS_ORIGIN_SUB_RESOURCE;
   }
 
   RefPtr<nsHTTPAuthInformation> holder = new nsHTTPAuthInformation(
       promptFlags, realmU, nsDependentCString(authType));
   if (!holder) return NS_ERROR_OUT_OF_MEMORY;
@@ -1206,21 +1202,20 @@ nsresult nsHttpChannelAuthProvider::Prom
     // result is expected asynchronously
     rv = NS_ERROR_IN_PROGRESS;
   } else {
     // Fall back to synchronous prompt
     bool retval = false;
     rv = authPrompt->PromptAuth(channel, level, holder, &retval);
     if (NS_FAILED(rv)) return rv;
 
-    if (!retval) {
+    if (!retval)
       rv = NS_ERROR_ABORT;
-    } else {
+    else
       holder->SetToHttpAuthIdentity(authFlags, ident);
-    }
   }
 
   // remember that we successfully showed the user an auth dialog
   if (!proxyAuth) mSuppressDefensiveAuth = true;
 
   if (mConnectionBased) {
     // Connection can be reset by the server in the meantime user is entering
     // the credentials.  Result would be just a "Connection was reset" error.
@@ -1427,21 +1422,20 @@ NS_IMETHODIMP nsHttpChannelAuthProvider:
   rv = ContinueOnAuthAvailable(nsDependentCString(aGeneratedCreds));
   MOZ_ASSERT(NS_SUCCEEDED(rv));
   return NS_OK;
 }
 
 nsresult nsHttpChannelAuthProvider::ContinueOnAuthAvailable(
     const nsACString& creds) {
   nsresult rv;
-  if (mProxyAuth) {
+  if (mProxyAuth)
     rv = mAuthChannel->SetProxyCredentials(creds);
-  } else {
+  else
     rv = mAuthChannel->SetWWWCredentials(creds);
-  }
   if (NS_FAILED(rv)) return rv;
 
   // drop our remaining list of challenges.  We don't need them, because we
   // have now authenticated against a challenge and will be sending that
   // information to the server (or proxy).  If it doesn't accept our
   // authentication it'll respond with failure and resend the challenge list
   mRemainingChallenges.Truncate();
 
@@ -1462,26 +1456,24 @@ bool nsHttpChannelAuthProvider::ConfirmA
     return true;
   }
 
   uint32_t loadFlags;
   nsresult rv = mAuthChannel->GetLoadFlags(&loadFlags);
   if (NS_FAILED(rv)) return true;
 
   if (mSuppressDefensiveAuth ||
-      !(loadFlags & nsIChannel::LOAD_INITIAL_DOCUMENT_URI)) {
+      !(loadFlags & nsIChannel::LOAD_INITIAL_DOCUMENT_URI))
     return true;
-  }
 
   nsAutoCString userPass;
   rv = mURI->GetUserPass(userPass);
   if (NS_FAILED(rv) ||
-      (userPass.Length() < gHttpHandler->PhishyUserPassLength())) {
+      (userPass.Length() < gHttpHandler->PhishyUserPassLength()))
     return true;
-  }
 
   // we try to confirm by prompting the user.  if we cannot do so, then
   // assume the user said ok.  this is done to keep things working in
   // embedded builds, where the string bundle might not be present, etc.
 
   nsCOMPtr<nsIStringBundleService> bundleService =
       do_GetService(NS_STRINGBUNDLE_CONTRACTID);
   if (!bundleService) return true;
@@ -1578,17 +1570,17 @@ bool nsHttpChannelAuthProvider::ConfirmA
                               nullptr, msg.get(), &confirmed);
     if (NS_FAILED(rv)) return true;
   }
 
   return confirmed;
 }
 
 void nsHttpChannelAuthProvider::SetAuthorizationHeader(
-    nsHttpAuthCache* authCache, const nsHttpAtom& header, const char* scheme,
+    nsHttpAuthCache* authCache, nsHttpAtom header, const char* scheme,
     const char* host, int32_t port, const char* path,
     nsHttpAuthIdentity& ident) {
   nsHttpAuthEntry* entry = nullptr;
   nsresult rv;
 
   // set informations that depend on whether
   // we're authenticating against a proxy
   // or a webserver
@@ -1640,19 +1632,18 @@ void nsHttpChannelAuthProvider::SetAutho
         }
       }
     }
     bool identFromURI;
     if (ident.IsEmpty()) {
       rv = ident.Set(entry->Identity());
       MOZ_ASSERT(NS_SUCCEEDED(rv));
       identFromURI = false;
-    } else {
+    } else
       identFromURI = true;
-    }
 
     nsCString temp;  // this must have the same lifetime as creds
     const char* creds = entry->Creds();
     const char* challenge = entry->Challenge();
     // we can only send a preemptive Authorization header if we have either
     // stored credentials or a stored challenge from which to derive
     // credentials.  if the identity is from the URI, then we cannot use
     // the stored credentials.
@@ -1682,30 +1673,28 @@ void nsHttpChannelAuthProvider::SetAutho
         MOZ_ASSERT(NS_SUCCEEDED(rv));
       }
 
       // suppress defensive auth prompting for this channel since we know
       // that we already prompted at least once this session.  we only do
       // this for non-proxy auth since the URL's userpass is not used for
       // proxy auth.
       if (header == nsHttp::Authorization) mSuppressDefensiveAuth = true;
-    } else {
+    } else
       ident.Clear();  // don't remember the identity
-    }
   }
 }
 
 nsresult nsHttpChannelAuthProvider::GetCurrentPath(nsACString& path) {
   nsresult rv;
   nsCOMPtr<nsIURL> url = do_QueryInterface(mURI);
-  if (url) {
+  if (url)
     rv = url->GetDirectory(path);
-  } else {
+  else
     rv = mURI->GetPathQueryRef(path);
-  }
   return rv;
 }
 
 NS_IMPL_ISUPPORTS(nsHttpChannelAuthProvider, nsICancelable,
                   nsIHttpChannelAuthProvider, nsIAuthPromptCallback,
                   nsIHttpAuthenticatorCallback)
 
 }  // namespace mozilla::net
--- a/netwerk/protocol/http/nsHttpChannelAuthProvider.h
+++ b/netwerk/protocol/http/nsHttpChannelAuthProvider.h
@@ -58,42 +58,42 @@ class nsHttpChannelAuthProvider final : 
 
   [[nodiscard]] nsresult PrepareForAuthentication(bool proxyAuth);
   [[nodiscard]] nsresult GenCredsAndSetEntry(
       nsIHttpAuthenticator*, bool proxyAuth, const char* scheme,
       const char* host, int32_t port, const char* dir, const char* realm,
       const char* challenge, const nsHttpAuthIdentity& ident,
       nsCOMPtr<nsISupports>& session, char** result);
   [[nodiscard]] nsresult GetAuthenticator(const char* challenge,
-                                          nsCString& authType,
+                                          nsCString& scheme,
                                           nsIHttpAuthenticator** auth);
   void ParseRealm(const char* challenge, nsACString& realm);
   void GetIdentityFromURI(uint32_t authFlags, nsHttpAuthIdentity&);
 
   /**
    * Following three methods return NS_ERROR_IN_PROGRESS when
    * nsIAuthPrompt2.asyncPromptAuth method is called. This result indicates
    * the user's decision will be gathered in a callback and is not an actual
    * error.
    */
   [[nodiscard]] nsresult GetCredentials(const char* challenges, bool proxyAuth,
                                         nsCString& creds);
   [[nodiscard]] nsresult GetCredentialsForChallenge(const char* challenge,
-                                                    const char* authType,
+                                                    const char* scheme,
                                                     bool proxyAuth,
                                                     nsIHttpAuthenticator* auth,
                                                     nsCString& creds);
   [[nodiscard]] nsresult PromptForIdentity(uint32_t level, bool proxyAuth,
                                            const char* realm,
                                            const char* authType,
                                            uint32_t authFlags,
                                            nsHttpAuthIdentity&);
 
   bool ConfirmAuth(const char* bundleKey, bool doYesNoPrompt);
-  void SetAuthorizationHeader(nsHttpAuthCache*, const nsHttpAtom& header,
+  void SetAuthorizationHeader(nsHttpAuthCache*, nsHttpAtom header,
                               const char* scheme, const char* host,
                               int32_t port, const char* path,
                               nsHttpAuthIdentity& ident);
   [[nodiscard]] nsresult GetCurrentPath(nsACString&);
   /**
    * Return all information needed to build authorization information,
    * all parameters except proxyAuth are out parameters. proxyAuth specifies
    * with what authorization we work (WWW or proxy).
@@ -129,29 +129,29 @@ class nsHttpChannelAuthProvider final : 
   [[nodiscard]] nsresult UpdateCache(
       nsIHttpAuthenticator* aAuth, const char* aScheme, const char* aHost,
       int32_t aPort, const char* aDirectory, const char* aRealm,
       const char* aChallenge, const nsHttpAuthIdentity& aIdent,
       const char* aCreds, uint32_t aGenerateFlags, nsISupports* aSessionState,
       bool aProxyAuth);
 
  private:
-  nsIHttpAuthenticableChannel* mAuthChannel{nullptr};  // weak ref
+  nsIHttpAuthenticableChannel* mAuthChannel;  // weak ref
 
   nsCOMPtr<nsIURI> mURI;
   nsCOMPtr<nsProxyInfo> mProxyInfo;
   nsCString mHost;
-  int32_t mPort{-1};
-  bool mUsingSSL{false};
-  bool mProxyUsingSSL{false};
-  bool mIsPrivate{false};
+  int32_t mPort;
+  bool mUsingSSL;
+  bool mProxyUsingSSL;
+  bool mIsPrivate;
 
-  nsISupports* mProxyAuthContinuationState{nullptr};
+  nsISupports* mProxyAuthContinuationState;
   nsCString mProxyAuthType;
-  nsISupports* mAuthContinuationState{nullptr};
+  nsISupports* mAuthContinuationState;
   nsCString mAuthType;
   nsHttpAuthIdentity mIdent;
   nsHttpAuthIdentity mProxyIdent;
 
   // Reference to the prompt waiting in prompt queue. The channel is
   // responsible to call its cancel method when user in any way cancels
   // this request.
   nsCOMPtr<nsICancelable> mAsyncPromptAuthCancelable;
--- a/netwerk/protocol/http/nsHttpChunkedDecoder.h
+++ b/netwerk/protocol/http/nsHttpChunkedDecoder.h
@@ -10,17 +10,21 @@
 #include "nsString.h"
 #include "nsHttpHeaderArray.h"
 
 namespace mozilla {
 namespace net {
 
 class nsHttpChunkedDecoder {
  public:
-  nsHttpChunkedDecoder() = default;
+  nsHttpChunkedDecoder()
+      : mTrailers(nullptr),
+        mChunkRemaining(0),
+        mReachedEOF(false),
+        mWaitEOF(false) {}
   ~nsHttpChunkedDecoder() = default;
 
   bool ReachedEOF() { return mReachedEOF; }
 
   // called by the transaction to handle chunked content.
   [[nodiscard]] nsresult HandleChunkedContent(char* buf, uint32_t count,
                                               uint32_t* contentRead,
                                               uint32_t* contentRemaining);
@@ -33,18 +37,18 @@ class nsHttpChunkedDecoder {
   uint32_t GetChunkRemaining() { return mChunkRemaining; }
 
  private:
   [[nodiscard]] nsresult ParseChunkRemaining(char* buf, uint32_t count,
                                              uint32_t* bytesConsumed);
 
  private:
   UniquePtr<nsHttpHeaderArray> mTrailers;
-  uint32_t mChunkRemaining{0};
+  uint32_t mChunkRemaining;
   nsCString mLineBuf;  // may hold a partial line
-  bool mReachedEOF{false};
-  bool mWaitEOF{false};
+  bool mReachedEOF;
+  bool mWaitEOF;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif
--- a/netwerk/protocol/http/nsHttpConnection.cpp
+++ b/netwerk/protocol/http/nsHttpConnection.cpp
@@ -51,17 +51,63 @@ enum TlsHandshakeResult : uint32_t {
   NoEchConfigSuccessful,
   NoEchConfigFailed,
 };
 
 //-----------------------------------------------------------------------------
 // nsHttpConnection <public>
 //-----------------------------------------------------------------------------
 
-nsHttpConnection::nsHttpConnection() : mHttpHandler(gHttpHandler) {
+nsHttpConnection::nsHttpConnection()
+    : mSocketInCondition(NS_ERROR_NOT_INITIALIZED),
+      mSocketOutCondition(NS_ERROR_NOT_INITIALIZED),
+      mHttpHandler(gHttpHandler),
+      mLastReadTime(0),
+      mLastWriteTime(0),
+      mMaxHangTime(0),
+      mConsiderReusedAfterInterval(0),
+      mConsiderReusedAfterEpoch(0),
+      mCurrentBytesRead(0),
+      mMaxBytesRead(0),
+      mTotalBytesRead(0),
+      mContentBytesWritten(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),
+      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),
+      mEverUsedSpdy(false),
+      mLastHttpResponseVersion(HttpVersion::v1_1),
+      mDefaultTimeoutFactor(1),
+      mResponseTimeoutEnabled(false),
+      mTCPKeepaliveConfig(kTCPKeepaliveDisabled),
+      mForceSendPending(false),
+      m0RTTChecked(false),
+      mWaitingFor0RTTResponse(false),
+      mContentBytesWritten0RTT(0),
+      mEarlyDataNegotiated(false),
+      mDid0RTTSpdy(false) {
   LOG(("Creating nsHttpConnection @%p\n", this));
 
   // the default timeout is for when this connection has not yet processed a
   // transaction
   static const PRIntervalTime k5Sec = PR_SecondsToInterval(5);
   mIdleTimeout = (k5Sec < gHttpHandler->IdleTimeout())
                      ? k5Sec
                      : gHttpHandler->IdleTimeout();
--- a/netwerk/protocol/http/nsHttpConnection.h
+++ b/netwerk/protocol/http/nsHttpConnection.h
@@ -17,17 +17,16 @@
 #include "mozilla/Mutex.h"
 #include "ARefBase.h"
 #include "TimingStruct.h"
 #include "HttpTrafficAnalyzer.h"
 
 #include "nsIAsyncInputStream.h"
 #include "nsIAsyncOutputStream.h"
 #include "nsIInterfaceRequestor.h"
-#include "nsISupportsPriority.h"
 #include "nsITimer.h"
 
 class nsISocketTransport;
 class nsISSLSocketControl;
 
 namespace mozilla {
 namespace net {
 
@@ -244,116 +243,118 @@ class nsHttpConnection final : public Ht
  private:
   // mTransaction only points to the HTTP Transaction callbacks if the
   // transaction is open, otherwise it is null.
   RefPtr<nsAHttpTransaction> mTransaction;
 
   nsCOMPtr<nsIAsyncInputStream> mSocketIn;
   nsCOMPtr<nsIAsyncOutputStream> mSocketOut;
 
-  nsresult mSocketInCondition{NS_ERROR_NOT_INITIALIZED};
-  nsresult mSocketOutCondition{NS_ERROR_NOT_INITIALIZED};
+  nsresult mSocketInCondition;
+  nsresult mSocketOutCondition;
 
   nsCOMPtr<nsIInputStream> mProxyConnectStream;
   nsCOMPtr<nsIInputStream> mRequestStream;
 
   RefPtr<TLSFilterTransaction> mTLSFilter;
   nsWeakPtr mWeakTrans;  // SpdyConnectTransaction *
 
   RefPtr<nsHttpHandler> mHttpHandler;  // keep gHttpHandler alive
 
-  PRIntervalTime mLastReadTime{0};
-  PRIntervalTime mLastWriteTime{0};
-  // max download time before dropping keep-alive status
-  PRIntervalTime mMaxHangTime{0};
+  PRIntervalTime mLastReadTime;
+  PRIntervalTime mLastWriteTime;
+  PRIntervalTime
+      mMaxHangTime;  // max download time before dropping keep-alive status
   PRIntervalTime mIdleTimeout;  // value of keep-alive: timeout=
-  PRIntervalTime mConsiderReusedAfterInterval{0};
-  PRIntervalTime mConsiderReusedAfterEpoch{0};
-  int64_t mCurrentBytesRead{0};     // data read per activation
-  int64_t mMaxBytesRead{0};         // max read in 1 activation
-  int64_t mTotalBytesRead{0};       // total data read
-  int64_t mContentBytesWritten{0};  // does not include CONNECT tunnel or TLS
+  PRIntervalTime mConsiderReusedAfterInterval;
+  PRIntervalTime mConsiderReusedAfterEpoch;
+  int64_t mCurrentBytesRead;     // data read per activation
+  int64_t mMaxBytesRead;         // max read in 1 activation
+  int64_t mTotalBytesRead;       // total data read
+  int64_t mContentBytesWritten;  // does not include CONNECT tunnel or TLS
 
   RefPtr<nsIAsyncInputStream> mInputOverflow;
 
   // Whether the first non-null transaction dispatched on this connection was
   // urgent-start or not
-  bool mUrgentStartPreferred{false};
+  bool mUrgentStartPreferred;
   // A flag to prevent reset of mUrgentStartPreferred by subsequent transactions
-  bool mUrgentStartPreferredKnown{false};
-  bool mConnectedTransport{false};
-  // assume to keep-alive by default
-  bool mKeepAlive{true};
-  bool mKeepAliveMask{true};
-  bool mDontReuse{false};
-  bool mIsReused{false};
-  bool mCompletedProxyConnect{false};
-  bool mLastTransactionExpectedNoContent{false};
-  bool mIdleMonitoring{false};
-  bool mProxyConnectInProgress{false};
-  bool mInSpdyTunnel{false};
-  bool mForcePlainText{false};
+  bool mUrgentStartPreferredKnown;
+  bool mConnectedTransport;
+  bool mKeepAlive;
+  bool mKeepAliveMask;
+  bool mDontReuse;
+  bool mIsReused;
+  bool mCompletedProxyConnect;
+  bool mLastTransactionExpectedNoContent;
+  bool mIdleMonitoring;
+  bool mProxyConnectInProgress;
+  bool mInSpdyTunnel;
+  bool mForcePlainText;
 
   // A snapshot of current number of transfered bytes
-  int64_t mTrafficCount{0};
-  bool mTrafficStamp{false};  // true then the above is set
+  int64_t mTrafficCount;
+  bool mTrafficStamp;  // true then the above is set
 
   // The number of <= HTTP/1.1 transactions performed on this connection. This
   // excludes spdy transactions.
-  uint32_t mHttp1xTransactionCount{0};
+  uint32_t mHttp1xTransactionCount;
 
   // Keep-Alive: max="mRemainingConnectionUses" provides the number of future
   // transactions (including the current one) that the server expects to allow
   // on this persistent connection.
-  uint32_t mRemainingConnectionUses{0xffffffff};
+  uint32_t mRemainingConnectionUses;
 
   // SPDY related
-  bool mNPNComplete{false};
-  bool mSetupSSLCalled{false};
+  bool mNPNComplete;
+  bool mSetupSSLCalled;
 
   // version level in use, 0 if unused
-  SpdyVersion mUsingSpdyVersion{SpdyVersion::NONE};
+  SpdyVersion mUsingSpdyVersion;
 
   RefPtr<ASpdySession> mSpdySession;
-  int32_t mPriority{nsISupportsPriority::PRIORITY_NORMAL};
-  bool mReportedSpdy{false};
+  int32_t mPriority;
+  bool mReportedSpdy;
 
   // mUsingSpdyVersion is cleared when mSpdySession is freed, this is permanent
-  bool mEverUsedSpdy{false};
+  bool mEverUsedSpdy;
 
   // mLastHttpResponseVersion stores the last response's http version seen.
-  HttpVersion mLastHttpResponseVersion{HttpVersion::v1_1};
+  HttpVersion mLastHttpResponseVersion;
 
   // If a large keepalive has been requested for any trans,
   // scale the default by this factor
-  uint32_t mDefaultTimeoutFactor{1};
+  uint32_t mDefaultTimeoutFactor;
 
-  bool mResponseTimeoutEnabled{false};
+  bool mResponseTimeoutEnabled;
 
   // Flag to indicate connection is in inital keepalive period (fast detect).
-  uint32_t mTCPKeepaliveConfig{kTCPKeepaliveDisabled};
+  uint32_t mTCPKeepaliveConfig;
   nsCOMPtr<nsITimer> mTCPKeepaliveTransitionTimer;
 
  private:
   // For ForceSend()
   static void ForceSendIO(nsITimer* aTimer, void* aClosure);
   [[nodiscard]] nsresult MaybeForceSendIO();
-  bool mForceSendPending{false};
+  bool mForceSendPending;
   nsCOMPtr<nsITimer> mForceSendTimer;
 
   // Helper variable for 0RTT handshake;
-  // Possible 0RTT has been checked.
-  bool m0RTTChecked{false};
-  // We have are sending 0RTT data and we are waiting
-  // for the end of the handsake.
-  bool mWaitingFor0RTTResponse{false};
-  int64_t mContentBytesWritten0RTT{0};
-  bool mEarlyDataNegotiated{false};  // Only used for telemetry
+  bool m0RTTChecked;             // Possible 0RTT has been
+                                 // checked.
+  bool mWaitingFor0RTTResponse;  // We have are
+                                 // sending 0RTT
+                                 // data and we
+                                 // are waiting
+                                 // for the end of
+                                 // the handsake.
+  int64_t mContentBytesWritten0RTT;
+  bool mEarlyDataNegotiated;  // Only used for telemetry
   nsCString mEarlyNegotiatedALPN;
-  bool mDid0RTTSpdy{false};
+  bool mDid0RTTSpdy;
 
   nsresult mErrorBeforeConnect = NS_OK;
 
   nsCOMPtr<nsISocketTransport> mSocketTransport;
 
  private:
   bool mThroughCaptivePortal;
   int64_t mTotalBytesWritten = 0;  // does not include CONNECT tunnel
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -48,17 +48,45 @@ namespace mozilla {
 namespace net {
 
 //-----------------------------------------------------------------------------
 
 NS_IMPL_ISUPPORTS(nsHttpConnectionMgr, nsIObserver)
 
 //-----------------------------------------------------------------------------
 
-nsHttpConnectionMgr::nsHttpConnectionMgr() {
+nsHttpConnectionMgr::nsHttpConnectionMgr()
+    : mReentrantMonitor("nsHttpConnectionMgr.mReentrantMonitor"),
+      mMaxUrgentExcessiveConns(0),
+      mMaxConns(0),
+      mMaxPersistConnsPerHost(0),
+      mMaxPersistConnsPerProxy(0),
+      mMaxRequestDelay(0),
+      mThrottleEnabled(false),
+      mThrottleVersion(2),
+      mThrottleSuspendFor(0),
+      mThrottleResumeFor(0),
+      mThrottleReadLimit(0),
+      mThrottleReadInterval(0),
+      mThrottleHoldTime(0),
+      mThrottleMaxTime(nullptr),
+      mBeConservativeForProxy(true),
+      mIsShuttingDown(false),
+      mNumActiveConns(0),
+      mNumIdleConns(0),
+      mNumSpdyHttp3ActiveConns(0),
+      mNumDnsAndConnectSockets(0),
+      mTimeOfNextWakeUp(UINT64_MAX),
+      mPruningNoTraffic(false),
+      mTimeoutTickArmed(false),
+      mTimeoutTickNext(1),
+      mCurrentTopBrowsingContextId(0),
+      mThrottlingInhibitsReading(false),
+      mActiveTabTransactionsExist(false),
+      mActiveTabUnthrottledTransactionsExist(false) {
   LOG(("Creating nsHttpConnectionMgr @%p\n", this));
 }
 
 nsHttpConnectionMgr::~nsHttpConnectionMgr() {
   LOG(("Destroying nsHttpConnectionMgr @%p\n", this));
   MOZ_ASSERT(mCoalescingHash.Count() == 0);
   if (mTimeoutTick) mTimeoutTick->Cancel();
 }
@@ -115,21 +143,21 @@ nsresult nsHttpConnectionMgr::Init(
     mIsShuttingDown = false;
   }
 
   return EnsureSocketThreadTarget();
 }
 
 class BoolWrapper : public ARefBase {
  public:
-  BoolWrapper() = default;
+  BoolWrapper() : mBool(false) {}
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BoolWrapper, override)
 
  public:  // intentional!
-  bool mBool{false};
+  bool mBool;
 
  private:
   virtual ~BoolWrapper() = default;
 };
 
 nsresult nsHttpConnectionMgr::Shutdown() {
   LOG(("nsHttpConnectionMgr::Shutdown\n"));
 
@@ -380,23 +408,23 @@ nsresult nsHttpConnectionMgr::DoShiftRel
 
   RefPtr<nsHttpConnectionInfo> ci = aCI->Clone();
   return PostEvent(&nsHttpConnectionMgr::OnMsgDoShiftReloadConnectionCleanup, 0,
                    ci);
 }
 
 class SpeculativeConnectArgs : public ARefBase {
  public:
-  SpeculativeConnectArgs() = default;
+  SpeculativeConnectArgs() : mFetchHTTPSRR(false) {}
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SpeculativeConnectArgs, override)
 
  public:  // intentional!
   RefPtr<SpeculativeTransaction> mTrans;
 
-  bool mFetchHTTPSRR{false};
+  bool mFetchHTTPSRR;
 
  private:
   virtual ~SpeculativeConnectArgs() = default;
   NS_DECL_OWNINGTHREAD
 };
 
 nsresult nsHttpConnectionMgr::SpeculativeConnect(
     nsHttpConnectionInfo* ci, nsIInterfaceRequestor* callbacks, uint32_t caps,
--- a/netwerk/protocol/http/nsHttpConnectionMgr.h
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.h
@@ -195,35 +195,35 @@ class nsHttpConnectionMgr final : public
  private:
   friend class DnsAndConnectSocket;
   friend class PendingTransactionInfo;
 
   //-------------------------------------------------------------------------
   // NOTE: these members may be accessed from any thread (use mReentrantMonitor)
   //-------------------------------------------------------------------------
 
-  ReentrantMonitor mReentrantMonitor{"nsHttpConnectionMgr.mReentrantMonitor"};
+  ReentrantMonitor mReentrantMonitor;
   nsCOMPtr<nsIEventTarget> mSocketThreadTarget;
 
   // connection limits
-  uint16_t mMaxUrgentExcessiveConns{0};
-  uint16_t mMaxConns{0};
-  uint16_t mMaxPersistConnsPerHost{0};
-  uint16_t mMaxPersistConnsPerProxy{0};
-  uint16_t mMaxRequestDelay{0};  // in seconds
-  bool mThrottleEnabled{false};
-  uint32_t mThrottleVersion{2};
-  uint32_t mThrottleSuspendFor{0};
-  uint32_t mThrottleResumeFor{0};
-  uint32_t mThrottleReadLimit{0};
-  uint32_t mThrottleReadInterval{0};
-  uint32_t mThrottleHoldTime{0};
+  uint16_t mMaxUrgentExcessiveConns;
+  uint16_t mMaxConns;
+  uint16_t mMaxPersistConnsPerHost;
+  uint16_t mMaxPersistConnsPerProxy;
+  uint16_t mMaxRequestDelay;  // in seconds
+  bool mThrottleEnabled;
+  uint32_t mThrottleVersion;
+  uint32_t mThrottleSuspendFor;
+  uint32_t mThrottleResumeFor;
+  uint32_t mThrottleReadLimit;
+  uint32_t mThrottleReadInterval;
+  uint32_t mThrottleHoldTime;
   TimeDuration mThrottleMaxTime;
-  bool mBeConservativeForProxy{true};
-  Atomic<bool, mozilla::Relaxed> mIsShuttingDown{false};
+  bool mBeConservativeForProxy;
+  Atomic<bool, mozilla::Relaxed> mIsShuttingDown;
 
   //-------------------------------------------------------------------------
   // NOTE: these members are only accessed on the socket transport thread
   //-------------------------------------------------------------------------
 
   [[nodiscard]] bool ProcessPendingQForEntry(ConnectionEntry*,
                                              bool considerAll);
   bool DispatchPendingQ(nsTArray<RefPtr<PendingTransactionInfo>>& pendingQ,
@@ -319,41 +319,41 @@ class nsHttpConnectionMgr final : public
   void OnMsgUpdateRequestTokenBucket(int32_t, ARefBase*);
   void OnMsgVerifyTraffic(int32_t, ARefBase*);
   void OnMsgPruneNoTraffic(int32_t, ARefBase*);
   void OnMsgUpdateCurrentTopBrowsingContextId(int32_t, ARefBase*);
   void OnMsgClearConnectionHistory(int32_t, ARefBase*);
 
   // Total number of active connections in all of the ConnectionEntry objects
   // that are accessed from mCT connection table.
-  uint16_t mNumActiveConns{0};
+  uint16_t mNumActiveConns;
   // Total number of idle connections in all of the ConnectionEntry objects
   // that are accessed from mCT connection table.
-  uint16_t mNumIdleConns{0};
+  uint16_t mNumIdleConns;
   // Total number of spdy or http3 connections which are a subset of the active
   // conns
-  uint16_t mNumSpdyHttp3ActiveConns{0};
+  uint16_t mNumSpdyHttp3ActiveConns;
   // Total number of connections in DnsAndConnectSockets ConnectionEntry objects
   // that are accessed from mCT connection table
-  uint32_t mNumDnsAndConnectSockets{0};
+  uint32_t mNumDnsAndConnectSockets;
 
   // Holds time in seconds for next wake-up to prune dead connections.
-  uint64_t mTimeOfNextWakeUp{UINT64_MAX};
+  uint64_t mTimeOfNextWakeUp;
   // Timer for next pruning of dead connections.
   nsCOMPtr<nsITimer> mTimer;
   // Timer for pruning stalled connections after changed network.
   nsCOMPtr<nsITimer> mTrafficTimer;
-  bool mPruningNoTraffic{false};
+  bool mPruningNoTraffic;
 
   // A 1s tick to call nsHttpConnection::ReadTimeoutTick on
   // active http/1 connections and check for orphaned half opens.
   // Disabled when there are no active or half open connections.
   nsCOMPtr<nsITimer> mTimeoutTick;
-  bool mTimeoutTickArmed{false};
-  uint32_t mTimeoutTickNext{1};
+  bool mTimeoutTickArmed;
+  uint32_t mTimeoutTickNext;
 
   //
   // the connection table
   //
   // this table is indexed by connection key.  each entry is a
   // ConnectionEntry object. It is unlocked and therefore must only
   // be accessed from the socket thread.
   //
@@ -361,17 +361,17 @@ class nsHttpConnectionMgr final : public
 
   // Read Timeout Tick handlers
   void TimeoutTick();
 
   // For diagnostics
   void OnMsgPrintDiagnostics(int32_t, ARefBase*);
 
   nsCString mLogData;
-  uint64_t mCurrentTopBrowsingContextId{0};
+  uint64_t mCurrentTopBrowsingContextId;
 
   // Called on a pref change
   void SetThrottlingEnabled(bool aEnable);
 
   // we only want to throttle for a limited amount of time after a new
   // active transaction is added so that we don't block downloads on comet,
   // socket and any kind of longstanding requests that don't need bandwidth.
   // these methods track this time.
@@ -383,17 +383,17 @@ class nsHttpConnectionMgr final : public
   // throttle status. mActiveTransactions[0] are all unthrottled transactions,
   // mActiveTransactions[1] throttled.
   nsClassHashtable<nsUint64HashKey, nsTArray<RefPtr<nsHttpTransaction>>>
       mActiveTransactions[2];
 
   // V1 specific
   // Whether we are inside the "stop reading" interval, altered by the throttle
   // ticker
-  bool mThrottlingInhibitsReading{false};
+  bool mThrottlingInhibitsReading;
 
   TimeStamp mThrottlingWindowEndsAt;
 
   // ticker for the 'stop reading'/'resume reading' signal
   nsCOMPtr<nsITimer> mThrottleTicker;
   // Checks if the combination of active transactions requires the ticker.
   bool IsThrottleTickerNeeded();
   // The method also unschedules the delayed resume of background tabs timer
@@ -431,18 +431,18 @@ class nsHttpConnectionMgr final : public
   // @param excludeActive: skip active tabid transactions.
   void ResumeReadOf(
       nsClassHashtable<nsUint64HashKey, nsTArray<RefPtr<nsHttpTransaction>>>&,
       bool excludeForActiveTab = false);
   void ResumeReadOf(nsTArray<RefPtr<nsHttpTransaction>>*);
 
   // Cached status of the active tab active transactions existence,
   // saves a lot of hashtable lookups
-  bool mActiveTabTransactionsExist{false};
-  bool mActiveTabUnthrottledTransactionsExist{false};
+  bool mActiveTabTransactionsExist;
+  bool mActiveTabUnthrottledTransactionsExist;
 
   void LogActiveTransactions(char);
 
   // When current active tab is changed, this function uses
   // |previousId| to select background transactions and
   // |mCurrentTopBrowsingContextId| to select foreground transactions.
   // Then, it notifies selected transactions' connection of the new active tab
   // id.
--- a/netwerk/protocol/http/nsHttpDigestAuth.cpp
+++ b/netwerk/protocol/http/nsHttpDigestAuth.cpp
@@ -339,21 +339,20 @@ nsHttpDigestAuth::GenerateCredentials(
   authString.AppendLiteral(", nonce=");
   rv = AppendQuotedString(nonce, authString);
   NS_ENSURE_SUCCESS(rv, rv);
 
   authString.AppendLiteral(", uri=\"");
   authString += path;
   if (algorithm & ALGO_SPECIFIED) {
     authString.AppendLiteral("\", algorithm=");
-    if (algorithm & ALGO_MD5_SESS) {
+    if (algorithm & ALGO_MD5_SESS)
       authString.AppendLiteral("MD5-sess");
-    } else {
+    else
       authString.AppendLiteral("MD5");
-    }
   } else {
     authString += '\"';
   }
   authString.AppendLiteral(", response=\"");
   authString += response_digest;
   authString += '\"';
 
   if (!opaque.IsEmpty()) {
@@ -393,67 +392,63 @@ nsHttpDigestAuth::GetAuthFlags(uint32_t*
 nsresult nsHttpDigestAuth::CalculateResponse(
     const char* ha1_digest, const char* ha2_digest, const nsCString& nonce,
     uint16_t qop, const char* nonce_count, const nsCString& cnonce,
     char* result) {
   uint32_t len = 2 * EXPANDED_DIGEST_LENGTH + nonce.Length() + 2;
 
   if (qop & QOP_AUTH || qop & QOP_AUTH_INT) {
     len += cnonce.Length() + NONCE_COUNT_LENGTH + 3;
-    if (qop & QOP_AUTH_INT) {
+    if (qop & QOP_AUTH_INT)
       len += 8;  // length of "auth-int"
-    } else {
+    else
       len += 4;  // length of "auth"
-    }
   }
 
   nsAutoCString contents;
   contents.SetCapacity(len);
 
   contents.Append(ha1_digest, EXPANDED_DIGEST_LENGTH);
   contents.Append(':');
   contents.Append(nonce);
   contents.Append(':');
 
   if (qop & QOP_AUTH || qop & QOP_AUTH_INT) {
     contents.Append(nonce_count, NONCE_COUNT_LENGTH);
     contents.Append(':');
     contents.Append(cnonce);
     contents.Append(':');
-    if (qop & QOP_AUTH_INT) {
+    if (qop & QOP_AUTH_INT)
       contents.AppendLiteral("auth-int:");
-    } else {
+    else
       contents.AppendLiteral("auth:");
-    }
   }
 
   contents.Append(ha2_digest, EXPANDED_DIGEST_LENGTH);
 
   nsresult rv = MD5Hash(contents.get(), contents.Length());
   if (NS_SUCCEEDED(rv)) rv = ExpandToHex(mHashBuf, result);
   return rv;
 }
 
 nsresult nsHttpDigestAuth::ExpandToHex(const char* digest, char* result) {
   int16_t index, value;
 
   for (index = 0; index < DIGEST_LENGTH; index++) {
     value = (digest[index] >> 4) & 0xf;
-    if (value < 10) {
+    if (value < 10)
       result[index * 2] = value + '0';
-    } else {
+    else
       result[index * 2] = value - 10 + 'a';
-    }
 
     value = digest[index] & 0xf;
-    if (value < 10) {
+    if (value < 10)
       result[(index * 2) + 1] = value + '0';
-    } else {
+    else
       result[(index * 2) + 1] = value - 10 + 'a';
-    }
   }
 
   result[EXPANDED_DIGEST_LENGTH] = 0;
   return NS_OK;
 }
 
 nsresult nsHttpDigestAuth::CalculateHA1(const nsCString& username,
                                         const nsCString& password,
@@ -586,55 +581,47 @@ nsresult nsHttpDigestAuth::ParseChalleng
     } else if (nameLength == 5 &&
                nsCRT::strncasecmp(challenge + nameStart, "nonce", 5) == 0) {
       nonce.Assign(challenge + valueStart, valueLength);
     } else if (nameLength == 6 &&
                nsCRT::strncasecmp(challenge + nameStart, "opaque", 6) == 0) {
       opaque.Assign(challenge + valueStart, valueLength);
     } else if (nameLength == 5 &&
                nsCRT::strncasecmp(challenge + nameStart, "stale", 5) == 0) {
-      if (nsCRT::strncasecmp(challenge + valueStart, "true", 4) == 0) {
+      if (nsCRT::strncasecmp(challenge + valueStart, "true", 4) == 0)
         *stale = true;
-      } else {
+      else
         *stale = false;
-      }
     } else if (nameLength == 9 &&
                nsCRT::strncasecmp(challenge + nameStart, "algorithm", 9) == 0) {
       // we want to clear the default, so we use = not |= here
       *algorithm = ALGO_SPECIFIED;
       if (valueLength == 3 &&
-          nsCRT::strncasecmp(challenge + valueStart, "MD5", 3) == 0) {
+          nsCRT::strncasecmp(challenge + valueStart, "MD5", 3) == 0)
         *algorithm |= ALGO_MD5;
-      } else if (valueLength == 8 && nsCRT::strncasecmp(challenge + valueStart,
-                                                        "MD5-sess", 8) == 0) {
+      else if (valueLength == 8 &&
+               nsCRT::strncasecmp(challenge + valueStart, "MD5-sess", 8) == 0)
         *algorithm |= ALGO_MD5_SESS;
-      }
     } else if (nameLength == 3 &&
                nsCRT::strncasecmp(challenge + nameStart, "qop", 3) == 0) {
       int32_t ipos = valueStart;
       while (ipos < valueStart + valueLength) {
-        while (
-            ipos < valueStart + valueLength &&
-            (nsCRT::IsAsciiSpace(challenge[ipos]) || challenge[ipos] == ',')) {
+        while (ipos < valueStart + valueLength &&
+               (nsCRT::IsAsciiSpace(challenge[ipos]) || challenge[ipos] == ','))
           ipos++;
-        }
         int32_t algostart = ipos;
         while (ipos < valueStart + valueLength &&
-               !nsCRT::IsAsciiSpace(challenge[ipos]) &&
-               challenge[ipos] != ',') {
+               !nsCRT::IsAsciiSpace(challenge[ipos]) && challenge[ipos] != ',')
           ipos++;
-        }
         if ((ipos - algostart) == 4 &&
-            nsCRT::strncasecmp(challenge + algostart, "auth", 4) == 0) {
+            nsCRT::strncasecmp(challenge + algostart, "auth", 4) == 0)
           *qop |= QOP_AUTH;
-        } else if ((ipos - algostart) == 8 &&
-                   nsCRT::strncasecmp(challenge + algostart, "auth-int", 8) ==
-                       0) {
+        else if ((ipos - algostart) == 8 &&
+                 nsCRT::strncasecmp(challenge + algostart, "auth-int", 8) == 0)
           *qop |= QOP_AUTH_INT;
-        }
       }
     }
   }
   return NS_OK;
 }
 
 nsresult nsHttpDigestAuth::AppendQuotedString(const nsACString& value,
                                               nsACString& aHeaderLine) {
--- a/netwerk/protocol/http/nsHttpDigestAuth.h
+++ b/netwerk/protocol/http/nsHttpDigestAuth.h
@@ -56,17 +56,17 @@ class nsHttpDigestAuth final : public ns
                                       const nsCString& password,
                                       const nsCString& realm,
                                       uint16_t algorithm,
                                       const nsCString& nonce,
                                       const nsCString& cnonce, char* result);
 
   [[nodiscard]] nsresult CalculateHA2(const nsCString& http_method,
                                       const nsCString& http_uri_path,
-                                      uint16_t qop, const char* bodyDigest,
+                                      uint16_t qop, const char* body_digest,
                                       char* result);
 
   [[nodiscard]] nsresult ParseChallenge(const char* challenge,
                                         nsACString& realm, nsACString& domain,
                                         nsACString& nonce, nsACString& opaque,
                                         bool* stale, uint16_t* algorithm,
                                         uint16_t* qop);
 
@@ -77,17 +77,17 @@ class nsHttpDigestAuth final : public ns
                                           nsCString&, nsCString&);
 
   // append the quoted version of value to aHeaderLine
   [[nodiscard]] nsresult AppendQuotedString(const nsACString& value,
                                             nsACString& aHeaderLine);
 
  protected:
   nsCOMPtr<nsICryptoHash> mVerifier;
-  char mHashBuf[DIGEST_LENGTH]{0};
+  char mHashBuf[DIGEST_LENGTH];
 
   static StaticRefPtr<nsHttpDigestAuth> gSingleton;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // nsHttpDigestAuth_h__
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -205,37 +205,119 @@ static nsCString DocumentAcceptHeader(co
   nsPrintfCString mimeTypes(
       "text/html,application/xhtml+xml,application/xml;q=0.9,%s;q=0.8",
       aImageAcceptHeader.get());
 
   return std::move(mimeTypes);
 }
 
 nsHttpHandler::nsHttpHandler()
-    : mIdleTimeout(PR_SecondsToInterval(10)),
+    : mHttpVersion(HttpVersion::v1_1),
+      mProxyHttpVersion(HttpVersion::v1_1),
+      mCapabilities(NS_HTTP_ALLOW_KEEPALIVE),
+      mFastFallbackToIPv4(false),
+      mIdleTimeout(PR_SecondsToInterval(10)),
       mSpdyTimeout(PR_SecondsToInterval(180)),
       mResponseTimeout(PR_SecondsToInterval(300)),
+      mResponseTimeoutEnabled(false),
+      mNetworkChangedTimeout(5000),
+      mMaxRequestAttempts(6),
+      mMaxRequestDelay(10),
+      mIdleSynTimeout(250),
+      mFallbackSynTimeout(5),
+      mH2MandatorySuiteEnabled(false),
+      mMaxUrgentExcessiveConns(3),
+      mMaxConnections(24),
+      mMaxPersistentConnectionsPerServer(2),
+      mMaxPersistentConnectionsPerProxy(4),
+      mThrottleEnabled(true),
+      mThrottleVersion(2),
+      mThrottleSuspendFor(3000),
+      mThrottleResumeFor(200),
+      mThrottleReadLimit(8000),
+      mThrottleReadInterval(500),
+      mThrottleHoldTime(600),
+      mThrottleMaxTime(3000),
+      mSendWindowSize(1024),
+      mUrgentStartEnabled(true),
+      mTailBlockingEnabled(true),
+      mTailDelayQuantum(600),
+      mTailDelayQuantumAfterDCL(100),
+      mTailDelayMax(6000),
+      mTailTotalMax(0),
+      mRedirectionLimit(10),
+      mBeConservativeForProxy(true),
+      mPhishyUserPassLength(1),
+      mQoSBits(0x00),
+      mEnforceAssocReq(false),
       mImageAcceptHeader(ImageAcceptHeader()),
       mDocumentAcceptHeader(DocumentAcceptHeader(ImageAcceptHeader())),
       mLastUniqueID(NowInSeconds()),
+      mSessionStartTime(0),
+      mLegacyAppName("Mozilla"),
+      mLegacyAppVersion("5.0"),
+      mProduct("Gecko"),
+      mCompatFirefoxEnabled(false),
+      mUserAgentIsDirty(true),
+      mAcceptLanguagesIsDirty(true),
+      mPromptTempRedirect(true),
+      mEnablePersistentHttpsCaching(false),
+      mSafeHintEnabled(false),
+      mParentalControlEnabled(false),
+      mHandlerActive(false),
       mDebugObservations(false),
       mEnableSpdy(false),
       mHttp2Enabled(true),
       mUseH2Deps(true),
       mEnforceHttp2TlsProfile(true),
       mCoalesceSpdy(true),
       mSpdyPersistentSettings(false),
       mAllowPush(true),
       mEnableAltSvc(false),
       mEnableAltSvcOE(false),
       mEnableOriginExtension(false),
       mEnableH2Websockets(true),
       mDumpHpackTables(false),
+      mSpdySendingChunkSize(ASpdySession::kSendingChunkSize),
+      mSpdySendBufferSize(ASpdySession::kTCPSendBufferSize),
+      mSpdyPushAllowance(131072)  // match default pref
+      ,
+      mSpdyPullAllowance(ASpdySession::kInitialRwin),
+      mDefaultSpdyConcurrent(ASpdySession::kDefaultMaxConcurrent),
       mSpdyPingThreshold(PR_SecondsToInterval(58)),
-      mSpdyPingTimeout(PR_SecondsToInterval(8)) {
+      mSpdyPingTimeout(PR_SecondsToInterval(8)),
+      mConnectTimeout(90000),
+      mTLSHandshakeTimeout(30000),
+      mParallelSpeculativeConnectLimit(6),
+      mRequestTokenBucketEnabled(true),
+      mRequestTokenBucketMinParallelism(6),
+      mRequestTokenBucketHz(100),
+      mRequestTokenBucketBurst(32),
+      mCriticalRequestPrioritization(true),
+      mTCPKeepaliveShortLivedEnabled(false),
+      mTCPKeepaliveShortLivedTimeS(60),
+      mTCPKeepaliveShortLivedIdleTimeS(10),
+      mTCPKeepaliveLongLivedEnabled(false),
+      mTCPKeepaliveLongLivedIdleTimeS(600),
+      mEnforceH1Framing(FRAMECHECK_BARELY),
+      mDefaultHpackBuffer(4096),
+      mBug1563538(true),
+      mHttp3Enabled(true),
+      mQpackTableSize(4096),
+      mHttp3MaxBlockedStreams(10),
+      mMaxHttpResponseHeaderSize(393216),
+      mFocusedWindowTransactionRatio(0.9f),
+      mSpeculativeConnectEnabled(false),
+      mActiveTabPriority(true),
+      mProcessId(0),
+      mNextChannelId(1),
+      mLastActiveTabLoadOptimizationLock(
+          "nsHttpConnectionMgr::LastActiveTabLoadOptimization"),
+      mHttpExclusionLock("nsHttpHandler::HttpExclusion"),
+      mThroughCaptivePortal(false) {
   LOG(("Creating nsHttpHandler [this=%p].\n", this));
 
   mUserAgentOverride.SetIsVoid(true);
 
   MOZ_ASSERT(!gHttpHandler, "HTTP handler already created!");
 
   nsCOMPtr<nsIXULRuntime> runtime = do_GetService("@mozilla.org/xre/runtime;1");
   if (runtime) {
--- a/netwerk/protocol/http/nsHttpHandler.h
+++ b/netwerk/protocol/http/nsHttpHandler.h
@@ -562,114 +562,114 @@ class nsHttpHandler final : public nsIHt
   RefPtr<HttpConnectionMgrShell> mConnMgr;
 
   UniquePtr<AltSvcCache> mAltSvcCache;
 
   //
   // prefs
   //
 
-  enum HttpVersion mHttpVersion { HttpVersion::v1_1 };
-  enum HttpVersion mProxyHttpVersion { HttpVersion::v1_1 };
-  uint32_t mCapabilities{NS_HTTP_ALLOW_KEEPALIVE};
+  enum HttpVersion mHttpVersion;
+  enum HttpVersion mProxyHttpVersion;
+  uint32_t mCapabilities;
 
-  bool mFastFallbackToIPv4{false};
+  bool mFastFallbackToIPv4;
   PRIntervalTime mIdleTimeout;
   PRIntervalTime mSpdyTimeout;
   PRIntervalTime mResponseTimeout;
-  Atomic<bool, Relaxed> mResponseTimeoutEnabled{false};
-  uint32_t mNetworkChangedTimeout{5000};  // milliseconds
-  uint16_t mMaxRequestAttempts{6};
-  uint16_t mMaxRequestDelay{10};
-  uint16_t mIdleSynTimeout{250};
-  uint16_t mFallbackSynTimeout{5};  // seconds
+  Atomic<bool, Relaxed> mResponseTimeoutEnabled;
+  uint32_t mNetworkChangedTimeout;  // milliseconds
+  uint16_t mMaxRequestAttempts;
+  uint16_t mMaxRequestDelay;
+  uint16_t mIdleSynTimeout;
+  uint16_t mFallbackSynTimeout;  // seconds
 
-  bool mH2MandatorySuiteEnabled{false};
-  uint16_t mMaxUrgentExcessiveConns{3};
-  uint16_t mMaxConnections{24};
-  uint8_t mMaxPersistentConnectionsPerServer{2};
-  uint8_t mMaxPersistentConnectionsPerProxy{4};
+  bool mH2MandatorySuiteEnabled;
+  uint16_t mMaxUrgentExcessiveConns;
+  uint16_t mMaxConnections;
+  uint8_t mMaxPersistentConnectionsPerServer;
+  uint8_t mMaxPersistentConnectionsPerProxy;
 
-  bool mThrottleEnabled{true};
-  uint32_t mThrottleVersion{2};
-  uint32_t mThrottleSuspendFor{3000};
-  uint32_t mThrottleResumeFor{200};
-  uint32_t mThrottleReadLimit{8000};
-  uint32_t mThrottleReadInterval{500};
-  uint32_t mThrottleHoldTime{600};
-  uint32_t mThrottleMaxTime{3000};
+  bool mThrottleEnabled;
+  uint32_t mThrottleVersion;
+  uint32_t mThrottleSuspendFor;
+  uint32_t mThrottleResumeFor;
+  uint32_t mThrottleReadLimit;
+  uint32_t mThrottleReadInterval;
+  uint32_t mThrottleHoldTime;
+  uint32_t mThrottleMaxTime;
 
-  int32_t mSendWindowSize{1024};
+  int32_t mSendWindowSize;
 
-  bool mUrgentStartEnabled{true};
-  bool mTailBlockingEnabled{true};
-  uint32_t mTailDelayQuantum{600};
-  uint32_t mTailDelayQuantumAfterDCL{100};
-  uint32_t mTailDelayMax{6000};
-  uint32_t mTailTotalMax{0};
+  bool mUrgentStartEnabled;
+  bool mTailBlockingEnabled;
+  uint32_t mTailDelayQuantum;
+  uint32_t mTailDelayQuantumAfterDCL;
+  uint32_t mTailDelayMax;
+  uint32_t mTailTotalMax;
 
-  uint8_t mRedirectionLimit{10};
+  uint8_t mRedirectionLimit;
 
-  bool mBeConservativeForProxy{true};
+  bool mBeConservativeForProxy;
 
   // we'll warn the user if we load an URL containing a userpass field
   // unless its length is less than this threshold.  this warning is
   // intended to protect the user against spoofing attempts that use
   // the userpass field of the URL to obscure the actual origin server.
-  uint8_t mPhishyUserPassLength{1};
+  uint8_t mPhishyUserPassLength;
 
-  uint8_t mQoSBits{0x00};
+  uint8_t mQoSBits;
 
-  bool mEnforceAssocReq{false};
+  bool mEnforceAssocReq;
 
   nsCString mImageAcceptHeader;
   nsCString mDocumentAcceptHeader;
 
   nsCString mAcceptLanguages;
   nsCString mHttpAcceptEncodings;
   nsCString mHttpsAcceptEncodings;
 
   nsCString mDefaultSocketType;
 
   // cache support
   uint32_t mLastUniqueID;
-  uint32_t mSessionStartTime{0};
+  uint32_t mSessionStartTime;
 
   // useragent components
-  nsCString mLegacyAppName{"Mozilla"};
-  nsCString mLegacyAppVersion{"5.0"};
+  nsCString mLegacyAppName;
+  nsCString mLegacyAppVersion;
   nsCString mPlatform;
   nsCString mOscpu;
   nsCString mMisc;
-  nsCString mProduct{"Gecko"};
+  nsCString mProduct;
   nsCString mProductSub;
   nsCString mAppName;
   nsCString mAppVersion;
   nsCString mCompatFirefox;
-  bool mCompatFirefoxEnabled{false};
+  bool mCompatFirefoxEnabled;
   nsCString mCompatDevice;
   nsCString mDeviceModelId;
 
   nsCString mUserAgent;
   nsCString mSpoofedUserAgent;
   nsCString mUserAgentOverride;
-  bool mUserAgentIsDirty{true};  // true if mUserAgent should be rebuilt
-  bool mAcceptLanguagesIsDirty{true};
+  bool mUserAgentIsDirty;  // true if mUserAgent should be rebuilt
+  bool mAcceptLanguagesIsDirty;
 
-  bool mPromptTempRedirect{true};
+  bool mPromptTempRedirect;
 
   // Persistent HTTPS caching flag
-  bool mEnablePersistentHttpsCaching{false};
+  bool mEnablePersistentHttpsCaching;
 
   // for broadcasting safe hint;
-  bool mSafeHintEnabled{false};
-  bool mParentalControlEnabled{false};
+  bool mSafeHintEnabled;
+  bool mParentalControlEnabled;
 
   // true in between init and shutdown states
-  Atomic<bool, Relaxed> mHandlerActive{false};
+  Atomic<bool, Relaxed> mHandlerActive;
 
   // The value of 'hidden' network.http.debug-observations : 1;
   uint32_t mDebugObservations : 1;
 
   uint32_t mEnableSpdy : 1;
   uint32_t mHttp2Enabled : 1;
   uint32_t mUseH2Deps : 1;
   uint32_t mEnforceHttp2TlsProfile : 1;
@@ -680,93 +680,93 @@ class nsHttpHandler final : public nsIHt
   uint32_t mEnableAltSvcOE : 1;
   uint32_t mEnableOriginExtension : 1;
   uint32_t mEnableH2Websockets : 1;
   uint32_t mDumpHpackTables : 1;
 
   // Try to use SPDY features instead of HTTP/1.1 over SSL
   SpdyInformation mSpdyInfo;
 
-  uint32_t mSpdySendingChunkSize{ASpdySession::kSendingChunkSize};
-  uint32_t mSpdySendBufferSize{ASpdySession::kTCPSendBufferSize};
-  uint32_t mSpdyPushAllowance{131072};  // match default pref
-  uint32_t mSpdyPullAllowance{ASpdySession::kInitialRwin};
-  uint32_t mDefaultSpdyConcurrent{ASpdySession::kDefaultMaxConcurrent};
+  uint32_t mSpdySendingChunkSize;
+  uint32_t mSpdySendBufferSize;
+  uint32_t mSpdyPushAllowance;
+  uint32_t mSpdyPullAllowance;
+  uint32_t mDefaultSpdyConcurrent;
   PRIntervalTime mSpdyPingThreshold;
   PRIntervalTime mSpdyPingTimeout;
 
   // The maximum amount of time to wait for socket transport to be
   // established. In milliseconds.
-  uint32_t mConnectTimeout{90000};
+  uint32_t mConnectTimeout;
 
   // The maximum amount of time to wait for a tls handshake to be
   // established. In milliseconds.
-  uint32_t mTLSHandshakeTimeout{30000};
+  uint32_t mTLSHandshakeTimeout;
 
   // The maximum number of current global half open sockets allowable
   // when starting a new speculative connection.
-  uint32_t mParallelSpeculativeConnectLimit{6};
+  uint32_t mParallelSpeculativeConnectLimit;
 
   // For Rate Pacing of HTTP/1 requests through a netwerk/base/EventTokenBucket
   // Active requests <= *MinParallelism are not subject to the rate pacing
-  bool mRequestTokenBucketEnabled{true};
-  uint16_t mRequestTokenBucketMinParallelism{6};
-  uint32_t mRequestTokenBucketHz{100};    // EventTokenBucket HZ
-  uint32_t mRequestTokenBucketBurst{32};  // EventTokenBucket Burst
+  bool mRequestTokenBucketEnabled;
+  uint16_t mRequestTokenBucketMinParallelism;
+  uint32_t mRequestTokenBucketHz;     // EventTokenBucket HZ
+  uint32_t mRequestTokenBucketBurst;  // EventTokenBucket Burst
 
   // Whether or not to block requests for non head js/css items (e.g. media)
   // while those elements load.
-  bool mCriticalRequestPrioritization{true};
+  bool mCriticalRequestPrioritization;
 
   // TCP Keepalive configuration values.
 
   // True if TCP keepalive is enabled for short-lived conns.
-  bool mTCPKeepaliveShortLivedEnabled{false};
+  bool mTCPKeepaliveShortLivedEnabled;
   // Time (secs) indicating how long a conn is considered short-lived.
-  int32_t mTCPKeepaliveShortLivedTimeS{60};
+  int32_t mTCPKeepaliveShortLivedTimeS;
   // Time (secs) before first keepalive probe; between successful probes.
-  int32_t mTCPKeepaliveShortLivedIdleTimeS{10};
+  int32_t mTCPKeepaliveShortLivedIdleTimeS;
 
   // True if TCP keepalive is enabled for long-lived conns.
-  bool mTCPKeepaliveLongLivedEnabled{false};
+  bool mTCPKeepaliveLongLivedEnabled;
   // Time (secs) before first keepalive probe; between successful probes.
-  int32_t mTCPKeepaliveLongLivedIdleTimeS{600};
+  int32_t mTCPKeepaliveLongLivedIdleTimeS;
 
   // if true, generate NS_ERROR_PARTIAL_TRANSFER for h1 responses with
   // incorrect content lengths or malformed chunked encodings
-  FrameCheckLevel mEnforceH1Framing{FRAMECHECK_BARELY};
+  FrameCheckLevel mEnforceH1Framing;
 
   nsCOMPtr<nsIRequestContextService> mRequestContextService;
 
   // The default size (in bytes) of the HPACK decompressor table.
-  uint32_t mDefaultHpackBuffer{4096};
+  uint32_t mDefaultHpackBuffer;
 
   // Pref for the whole fix that bug provides
-  Atomic<bool, Relaxed> mBug1563538{true};
+  Atomic<bool, Relaxed> mBug1563538;
 
-  Atomic<bool, Relaxed> mHttp3Enabled{true};
+  Atomic<bool, Relaxed> mHttp3Enabled;
   // Http3 parameters
-  Atomic<uint32_t, Relaxed> mQpackTableSize{4096};
-  // uint16_t is enough here, but Atomic only supports uint32_t or uint64_t.
-  Atomic<uint32_t, Relaxed> mHttp3MaxBlockedStreams{10};
-
+  Atomic<uint32_t, Relaxed> mQpackTableSize;
+  Atomic<uint32_t, Relaxed>
+      mHttp3MaxBlockedStreams;  // uint16_t is enough here, but Atomic only
+                                // supports uint32_t or uint64_t.
   nsCString mHttp3QlogDir;
 
   // The max size (in bytes) for received Http response header.
-  uint32_t mMaxHttpResponseHeaderSize{393216};
+  uint32_t mMaxHttpResponseHeaderSize;
 
   // The ratio for dispatching transactions from the focused window.
-  float mFocusedWindowTransactionRatio{0.9f};
+  float mFocusedWindowTransactionRatio;
 
   // We may disable speculative connect if the browser has user certificates
   // installed as that might randomly popup the certificate choosing window.
-  Atomic<bool, Relaxed> mSpeculativeConnectEnabled{false};
+  Atomic<bool, Relaxed> mSpeculativeConnectEnabled;
 
   // If true, the transactions from active tab will be dispatched first.
-  bool mActiveTabPriority{true};
+  bool mActiveTabPriority;
 
   HttpTrafficAnalyzer mHttpTrafficAnalyzer;
 
  private:
   // For Rate Pacing Certain Network Events. Only assign this pointer on
   // socket thread.
   void MakeNewRequestTokenBucket();
   RefPtr<EventTokenBucket> mRequestTokenBucket;
@@ -801,33 +801,32 @@ class nsHttpHandler final : public nsIHt
   void TickleWifi(nsIInterfaceRequestor* cb);
 
  private:
   [[nodiscard]] nsresult SpeculativeConnectInternal(
       nsIURI* aURI, nsIPrincipal* aPrincipal, nsIInterfaceRequestor* aCallbacks,
       bool anonymous);
 
   // State for generating channelIds
-  uint32_t mProcessId{0};
-  Atomic<uint32_t, Relaxed> mNextChannelId{1};
+  uint32_t mProcessId;
+  Atomic<uint32_t, Relaxed> mNextChannelId;
 
   // The last time any of the active tab page load optimization took place.
   // This is accessed on multiple threads, hence a lock is needed.
   // On the parent process this is updated to now every time a scheduling
   // or rate optimization related to the active/background tab is hit.
   // We carry this value through each http channel's onstoprequest notification
   // to the parent process.  On the content process then we just update this
   // value from ipc onstoprequest arguments.  This is a sufficent way of passing
   // it down to the content process, since the value will be used only after
   // onstoprequest notification coming from an http channel.
-  Mutex mLastActiveTabLoadOptimizationLock{
-      "nsHttpConnectionMgr::LastActiveTabLoadOptimization"};
+  Mutex mLastActiveTabLoadOptimizationLock;
   TimeStamp mLastActiveTabLoadOptimizationHit;
 
-  Mutex mHttpExclusionLock{"nsHttpHandler::HttpExclusion"};
+  Mutex mHttpExclusionLock;
 
  public:
   [[nodiscard]] nsresult NewChannelId(uint64_t& channelId);
   void AddHttpChannel(uint64_t aId, nsISupports* aChannel);
   void RemoveHttpChannel(uint64_t aId);
   nsWeakPtr GetWeakHttpChannel(uint64_t aId);
 
   void ExcludeHttp2(const nsHttpConnectionInfo* ci);
@@ -839,17 +838,17 @@ class nsHttpHandler final : public nsIHt
   [[nodiscard]] bool IsHostExcludedForHTTPSRR(const nsACString& aHost);
 
  private:
   nsTHashSet<nsCString> mExcludedHttp2Origins;
   nsTHashSet<nsCString> mExcludedHttp3Origins;
   // A set of hosts that we should not upgrade to HTTPS with HTTPS RR.
   nsTHashSet<nsCString> mExcludedHostsForHTTPSRRUpgrade;
 
-  Atomic<bool, Relaxed> mThroughCaptivePortal{false};
+  Atomic<bool, Relaxed> mThroughCaptivePortal;
 
   // The mapping of channel id and the weak pointer of nsHttpChannel.
   nsTHashMap<nsUint64HashKey, nsWeakPtr> mIDToHttpChannelMap;
 
   // This is parsed pref network.http.http3.alt-svc-mapping-for-testing.
   // The pref set artificial altSvc-s for origin for testing.
   // This maps an origin to an altSvc.
   nsClassHashtable<nsCStringHashKey, nsCString> mAltSvcMappingTemptativeMap;
--- a/netwerk/protocol/http/nsHttpHeaderArray.cpp
+++ b/netwerk/protocol/http/nsHttpHeaderArray.cpp
@@ -66,18 +66,17 @@ nsresult nsHttpHeaderArray::SetHeader(
 
   MOZ_ASSERT(!entry || variety != eVarietyRequestDefault,
              "Cannot set default entry which overrides existing entry!");
   if (!entry) {
     return SetHeader_internal(header, headerName, value, variety);
   }
   if (merge && !IsSingletonHeader(header)) {
     return MergeHeader(header, entry, value, variety);
-  }
-  if (!IsIgnoreMultipleHeader(header)) {
+  } else if (!IsIgnoreMultipleHeader(header)) {
     // Replace the existing string with the new value
     if (entry->variety == eVarietyResponseNetOriginalAndResponse) {
       MOZ_ASSERT(variety == eVarietyResponse);
       entry->variety = eVarietyResponseNetOriginal;
       return SetHeader_internal(header, headerName, value, variety);
     }
     entry->value = value;
     entry->variety = variety;
@@ -157,18 +156,17 @@ nsresult nsHttpHeaderArray::SetHeaderFro
     if (NS_FAILED(rv)) {
       return rv;
     }
     if (response) {
       rv = SetHeader_internal(header, headerNameOriginal, value,
                               eVarietyResponseNetOriginal);
     }
     return rv;
-  }
-  if (!IsIgnoreMultipleHeader(header)) {
+  } else if (!IsIgnoreMultipleHeader(header)) {
     // Multiple instances of non-mergeable header received from network
     // - ignore if same value
     if (!entry->value.Equals(value)) {
       if (IsSuspectDuplicateHeader(header)) {
         // reply may be corrupt/hacked (ex: CLRF injection attacks)
         return NS_ERROR_CORRUPTED_CONTENT;
       }  // else silently drop value: keep value from 1st header seen
       LOG(("Header %s silently dropped as non mergeable header\n",
--- a/netwerk/protocol/http/nsHttpHeaderArray.h
+++ b/netwerk/protocol/http/nsHttpHeaderArray.h
@@ -78,23 +78,22 @@ class nsHttpHeaderArray {
 
   [[nodiscard]] nsresult GetHeader(const nsHttpAtom& header,
                                    nsACString& result) const;
   [[nodiscard]] nsresult GetOriginalHeader(const nsHttpAtom& aHeader,
                                            nsIHttpHeaderVisitor* aVisitor);
   void ClearHeader(const nsHttpAtom& h);
 
   // Find the location of the given header value, or null if none exists.
-  const char* FindHeaderValue(const nsHttpAtom& header,
-                              const char* value) const {
+  const char* FindHeaderValue(nsHttpAtom header, const char* value) const {
     return nsHttp::FindToken(PeekHeader(header), value, HTTP_HEADER_VALUE_SEPS);
   }
 
   // Determine if the given header value exists.
-  bool HasHeaderValue(const nsHttpAtom& header, const char* value) const {
+  bool HasHeaderValue(nsHttpAtom header, const char* value) const {
     return FindHeaderValue(header, value) != nullptr;
   }
 
   bool HasHeader(const nsHttpAtom& header) const;
 
   enum VisitorFilter {
     eFilterAll,
     eFilterSkipDefault,
@@ -141,109 +140,108 @@ class nsHttpHeaderArray {
 
   bool operator==(const nsHttpHeaderArray& aOther) const {
     return mHeaders == aOther.mHeaders;
   }
 
  private:
   // LookupEntry function will never return eVarietyResponseNetOriginal.
   // It will ignore original headers from the network.
-  int32_t LookupEntry(const nsHttpAtom& header, const nsEntry**) const;
-  int32_t LookupEntry(const nsHttpAtom& header, nsEntry**);
-  [[nodiscard]] nsresult MergeHeader(const nsHttpAtom& header, nsEntry* entry,
+  int32_t LookupEntry(nsHttpAtom header, const nsEntry**) const;
+  int32_t LookupEntry(nsHttpAtom header, nsEntry**);
+  [[nodiscard]] nsresult MergeHeader(nsHttpAtom header, nsEntry* entry,
                                      const nsACString& value,
                                      HeaderVariety variety);
   [[nodiscard]] nsresult SetHeader_internal(const nsHttpAtom& header,
                                             const nsACString& headerName,
                                             const nsACString& value,
                                             HeaderVariety variety);
 
   // Header cannot be merged: only one value possible
-  bool IsSingletonHeader(const nsHttpAtom& header);
+  bool IsSingletonHeader(nsHttpAtom header);
   // Header cannot be merged, and subsequent values should be ignored
-  bool IsIgnoreMultipleHeader(const nsHttpAtom& header);
+  bool IsIgnoreMultipleHeader(nsHttpAtom header);
 
   // Subset of singleton headers: should never see multiple, different
   // instances of these, else something fishy may be going on (like CLRF
   // injection)
-  bool IsSuspectDuplicateHeader(const nsHttpAtom& header);
+  bool IsSuspectDuplicateHeader(nsHttpAtom header);
 
   // All members must be copy-constructable and assignable
   CopyableTArray<nsEntry> mHeaders;
 
   friend struct IPC::ParamTraits<nsHttpHeaderArray>;
   friend class nsHttpRequestHead;
 };
 
 //-----------------------------------------------------------------------------
 // nsHttpHeaderArray <private>: inline functions
 //-----------------------------------------------------------------------------
 
-inline int32_t nsHttpHeaderArray::LookupEntry(const nsHttpAtom& header,
+inline int32_t nsHttpHeaderArray::LookupEntry(nsHttpAtom header,
                                               const nsEntry** entry) const {
   uint32_t index = 0;
   while (index != UINT32_MAX) {
     index = mHeaders.IndexOf(header, index, nsEntry::MatchHeader());
     if (index != UINT32_MAX) {
       if ((&mHeaders[index])->variety != eVarietyResponseNetOriginal) {
         *entry = &mHeaders[index];
         return index;
       }
       index++;
     }
   }
 
   return index;
 }
 
-inline int32_t nsHttpHeaderArray::LookupEntry(const nsHttpAtom& header,
+inline int32_t nsHttpHeaderArray::LookupEntry(nsHttpAtom header,
                                               nsEntry** entry) {
   uint32_t index = 0;
   while (index != UINT32_MAX) {
     index = mHeaders.IndexOf(header, index, nsEntry::MatchHeader());
     if (index != UINT32_MAX) {
       if ((&mHeaders[index])->variety != eVarietyResponseNetOriginal) {
         *entry = &mHeaders[index];
         return index;
       }
       index++;
     }
   }
   return index;
 }
 
-inline bool nsHttpHeaderArray::IsSingletonHeader(const nsHttpAtom& header) {
+inline bool nsHttpHeaderArray::IsSingletonHeader(nsHttpAtom header) {
   return header == nsHttp::Content_Type ||
          header == nsHttp::Content_Disposition ||
          header == nsHttp::Content_Length || header == nsHttp::User_Agent ||
          header == nsHttp::Referer || header == nsHttp::Host ||
          header == nsHttp::Authorization ||
          header == nsHttp::Proxy_Authorization ||
          header == nsHttp::If_Modified_Since ||
          header == nsHttp::If_Unmodified_Since || header == nsHttp::From ||
          header == nsHttp::Location || header == nsHttp::Max_Forwards ||
          // Ignore-multiple-headers are singletons in the sense that they
          // shouldn't be merged.
          IsIgnoreMultipleHeader(header);
 }
 
 // These are headers for which, in the presence of multiple values, we only
 // consider the first.
-inline bool nsHttpHeaderArray::IsIgnoreMultipleHeader(
-    const nsHttpAtom& header) {
+inline bool nsHttpHeaderArray::IsIgnoreMultipleHeader(nsHttpAtom header) {
   // https://tools.ietf.org/html/rfc6797#section-8:
   //
   //     If a UA receives more than one STS header field in an HTTP
   //     response message over secure transport, then the UA MUST process
   //     only the first such header field.
   return header == nsHttp::Strict_Transport_Security;
 }
 
 [[nodiscard]] inline nsresult nsHttpHeaderArray::MergeHeader(
-    const nsHttpAtom& header, nsEntry* entry, const nsACString& value,
+    nsHttpAtom header, nsEntry* entry, const nsACString& value,
     nsHttpHeaderArray::HeaderVariety variety) {
   if (value.IsEmpty()) return NS_OK;  // merge of empty header = no-op
 
   nsCString newValue = entry->value;
   if (!newValue.IsEmpty()) {
     // Append the new value to the existing value
     if (header == nsHttp::Set_Cookie || header == nsHttp::WWW_Authenticate ||
         header == nsHttp::Proxy_Authenticate) {
@@ -271,18 +269,17 @@ inline bool nsHttpHeaderArray::IsIgnoreM
     }
   } else {
     entry->value = newValue;
     entry->variety = variety;
   }
   return NS_OK;
 }
 
-inline bool nsHttpHeaderArray::IsSuspectDuplicateHeader(
-    const nsHttpAtom& header) {
+inline bool nsHttpHeaderArray::IsSuspectDuplicateHeader(nsHttpAtom header) {
   bool retval = header == nsHttp::Content_Length ||
                 header == nsHttp::Content_Disposition ||
                 header == nsHttp::Location;
 
   MOZ_ASSERT(!retval || IsSingletonHeader(header),
              "Only non-mergeable headers should be in this list\n");
 
   return retval;
--- a/netwerk/protocol/http/nsHttpNTLMAuth.cpp
+++ b/netwerk/protocol/http/nsHttpNTLMAuth.cpp
@@ -108,19 +108,18 @@ static bool CanUseDefaultCredentials(nsI
       return false;
     }
   }
 
   nsCOMPtr<nsIURI> uri;
   Unused << channel->GetURI(getter_AddRefs(uri));
 
   bool allowNonFqdn;
-  if (NS_FAILED(prefs->GetBoolPref(kAllowNonFqdn, &allowNonFqdn))) {
+  if (NS_FAILED(prefs->GetBoolPref(kAllowNonFqdn, &allowNonFqdn)))
     allowNonFqdn = false;
-  }
   if (allowNonFqdn && uri && IsNonFqdn(uri)) {
     LOG(("Host is non-fqdn, default credentials are allowed\n"));
     return true;
   }
 
   bool isTrustedHost = (uri && auth::URIMatchesPrefPattern(uri, kTrustedURIs));
   LOG(("Default credentials allowed for host: %d\n", isTrustedHost));
   return isTrustedHost;
--- a/netwerk/protocol/http/nsHttpNTLMAuth.h
+++ b/netwerk/protocol/http/nsHttpNTLMAuth.h
@@ -11,26 +11,26 @@
 namespace mozilla {
 namespace net {
 
 class nsHttpNTLMAuth : public nsIHttpAuthenticator {
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIHTTPAUTHENTICATOR
 
-  nsHttpNTLMAuth() = default;
+  nsHttpNTLMAuth() : mUseNative(false) {}
 
   static already_AddRefed<nsIHttpAuthenticator> GetOrCreate();
 
  private:
   virtual ~nsHttpNTLMAuth() = default;
 
   // This flag indicates whether we are using the native NTLM implementation
   // or the internal one.
-  bool mUseNative{false};
+  bool mUseNative;
 
   static StaticRefPtr<nsHttpNTLMAuth> gSingleton;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // !nsHttpNTLMAuth_h__
--- a/netwerk/protocol/http/nsHttpRequestHead.cpp
+++ b/netwerk/protocol/http/nsHttpRequestHead.cpp
@@ -11,17 +11,25 @@
 
 //-----------------------------------------------------------------------------
 // nsHttpRequestHead
 //-----------------------------------------------------------------------------
 
 namespace mozilla {
 namespace net {
 
-nsHttpRequestHead::nsHttpRequestHead() { MOZ_COUNT_CTOR(nsHttpRequestHead); }
+nsHttpRequestHead::nsHttpRequestHead()
+    : mMethod("GET"_ns),
+      mVersion(HttpVersion::v1_1),
+      mParsedMethod(kMethod_Get),
+      mHTTPS(false),
+      mRecursiveMutex("nsHttpRequestHead.mRecursiveMutex"),
+      mInVisitHeaders(false) {
+  MOZ_COUNT_CTOR(nsHttpRequestHead);
+}
 
 nsHttpRequestHead::nsHttpRequestHead(const nsHttpRequestHead& aRequestHead)
     : mRecursiveMutex("nsHttpRequestHead.mRecursiveMutex"),
       mInVisitHeaders(false) {
   nsHttpRequestHead& other = const_cast<nsHttpRequestHead&>(aRequestHead);
   RecursiveMutexAutoLock monitor(other.mRecursiveMutex);
 
   mHeaders = other.mHeaders;
@@ -136,30 +144,30 @@ nsresult nsHttpRequestHead::SetHeader(co
   if (mInVisitHeaders) {
     return NS_ERROR_FAILURE;
   }
 
   return mHeaders.SetHeader(h, v, m,
                             nsHttpHeaderArray::eVarietyRequestOverride);
 }
 
-nsresult nsHttpRequestHead::SetHeader(const nsHttpAtom& h, const nsACString& v,
+nsresult nsHttpRequestHead::SetHeader(nsHttpAtom h, const nsACString& v,
                                       bool m /*= false*/) {
   RecursiveMutexAutoLock mon(mRecursiveMutex);
 
   if (mInVisitHeaders) {
     return NS_ERROR_FAILURE;
   }
 
   return mHeaders.SetHeader(h, v, m,
                             nsHttpHeaderArray::eVarietyRequestOverride);
 }
 
 nsresult nsHttpRequestHead::SetHeader(
-    const nsHttpAtom& h, const nsACString& v, bool m,
+    nsHttpAtom h, const nsACString& v, bool m,
     nsHttpHeaderArray::HeaderVariety variety) {
   RecursiveMutexAutoLock mon(mRecursiveMutex);
 
   if (mInVisitHeaders) {
     return NS_ERROR_FAILURE;
   }
 
   return mHeaders.SetHeader(h, v, m, variety);
@@ -170,23 +178,23 @@ nsresult nsHttpRequestHead::SetEmptyHead
 
   if (mInVisitHeaders) {
     return NS_ERROR_FAILURE;
   }
 
   return mHeaders.SetEmptyHeader(h, nsHttpHeaderArray::eVarietyRequestOverride);
 }
 
-nsresult nsHttpRequestHead::GetHeader(const nsHttpAtom& h, nsACString& v) {
+nsresult nsHttpRequestHead::GetHeader(nsHttpAtom h, nsACString& v) {
   v.Truncate();
   RecursiveMutexAutoLock mon(mRecursiveMutex);
   return mHeaders.GetHeader(h, v);
 }
 
-nsresult nsHttpRequestHead::ClearHeader(const nsHttpAtom& h) {
+nsresult nsHttpRequestHead::ClearHeader(nsHttpAtom h) {
   RecursiveMutexAutoLock mon(mRecursiveMutex);
 
   if (mInVisitHeaders) {
     return NS_ERROR_FAILURE;
   }
 
   mHeaders.ClearHeader(h);
   return NS_OK;
@@ -197,27 +205,27 @@ void nsHttpRequestHead::ClearHeaders() {
 
   if (mInVisitHeaders) {
     return;
   }
 
   mHeaders.Clear();
 }
 
-bool nsHttpRequestHead::HasHeader(const nsHttpAtom& h) {
+bool nsHttpRequestHead::HasHeader(nsHttpAtom h) {
   RecursiveMutexAutoLock mon(mRecursiveMutex);
   return mHeaders.HasHeader(h);
 }
 
-bool nsHttpRequestHead::HasHeaderValue(const nsHttpAtom& h, const char* v) {
+bool nsHttpRequestHead::HasHeaderValue(nsHttpAtom h, const char* v) {
   RecursiveMutexAutoLock mon(mRecursiveMutex);
   return mHeaders.HasHeaderValue(h, v);
 }
 
-nsresult nsHttpRequestHead::SetHeaderOnce(const nsHttpAtom& h, const char* v,
+nsresult nsHttpRequestHead::SetHeaderOnce(nsHttpAtom h, const char* v,
                                           bool merge /*= false */) {
   RecursiveMutexAutoLock mon(mRecursiveMutex);
 
   if (mInVisitHeaders) {
     return NS_ERROR_FAILURE;
   }
 
   if (!merge || !mHeaders.HasHeaderValue(h, v)) {
--- a/netwerk/protocol/http/nsHttpRequestHead.h
+++ b/netwerk/protocol/http/nsHttpRequestHead.h
@@ -64,35 +64,34 @@ class nsHttpRequestHead {
   bool IsHTTPS();
 
   void SetOrigin(const nsACString& scheme, const nsACString& host,
                  int32_t port);
   void Origin(nsACString& aOrigin);
 
   [[nodiscard]] nsresult SetHeader(const nsACString& h, const nsACString& v,
                                    bool m = false);
-  [[nodiscard]] nsresult SetHeader(const nsHttpAtom& h, const nsACString& v,
+  [[nodiscard]] nsresult SetHeader(nsHttpAtom h, const nsACString& v,
                                    bool m = false);
-  [[nodiscard]] nsresult SetHeader(const nsHttpAtom& h, const nsACString& v,
-                                   bool m,
+  [[nodiscard]] nsresult SetHeader(nsHttpAtom h, const nsACString& v, bool m,
                                    nsHttpHeaderArray::HeaderVariety variety);
   [[nodiscard]] nsresult SetEmptyHeader(const nsACString& h);
-  [[nodiscard]] nsresult GetHeader(const nsHttpAtom& h, nsACString& v);
+  [[nodiscard]] nsresult GetHeader(nsHttpAtom h, nsACString& v);
 
-  [[nodiscard]] nsresult ClearHeader(const nsHttpAtom& h);
+  [[nodiscard]] nsresult ClearHeader(nsHttpAtom h);
   void ClearHeaders();
 
-  bool HasHeaderValue(const nsHttpAtom& h, const char* v);
+  bool HasHeaderValue(nsHttpAtom h, const char* v);
   // This function returns true if header is set even if it is an empty
   // header.
-  bool HasHeader(const nsHttpAtom& h);
+  bool HasHeader(nsHttpAtom h);
   void Flatten(nsACString&, bool pruneProxyHeaders = false);
 
   // Don't allow duplicate values
-  [[nodiscard]] nsresult SetHeaderOnce(const nsHttpAtom& h, const char* v,
+  [[nodiscard]] nsresult SetHeaderOnce(nsHttpAtom h, const char* v,
                                        bool merge = false);
 
   bool IsSafeMethod();
 
   enum ParsedMethodType {
     kMethod_Custom,
     kMethod_Get,
     kMethod_Post,
@@ -115,34 +114,34 @@ class nsHttpRequestHead {
   bool IsHead() { return EqualsMethod(kMethod_Head); }
   bool IsPut() { return EqualsMethod(kMethod_Put); }
   bool IsTrace() { return EqualsMethod(kMethod_Trace); }
   void ParseHeaderSet(const char* buffer);
 
  private:
   // All members must be copy-constructable and assignable
   nsHttpHeaderArray mHeaders;
-  nsCString mMethod{"GET"_ns};
-  HttpVersion mVersion{HttpVersion::v1_1};
+  nsCString mMethod;
+  HttpVersion mVersion;
 
   // mRequestURI and mPath are strings instead of an nsIURI
   // because this is used off the main thread
   nsCString mRequestURI;
   nsCString mPath;
 
   nsCString mOrigin;
-  ParsedMethodType mParsedMethod{kMethod_Get};
-  bool mHTTPS{false};
+  ParsedMethodType mParsedMethod;
+  bool mHTTPS;
 
   // We are using RecursiveMutex instead of a Mutex because VisitHeader
   // function calls nsIHttpHeaderVisitor::VisitHeader while under lock.
-  RecursiveMutex mRecursiveMutex{"nsHttpRequestHead.mRecursiveMutex"};
+  RecursiveMutex mRecursiveMutex;
 
   // During VisitHeader we sould not allow cal to SetHeader.
-  bool mInVisitHeaders{false};
+  bool mInVisitHeaders;
 
   friend struct IPC::ParamTraits<nsHttpRequestHead>;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // nsHttpRequestHead_h__
--- a/netwerk/protocol/http/nsHttpResponseHead.cpp
+++ b/netwerk/protocol/http/nsHttpResponseHead.cpp
@@ -22,17 +22,19 @@ namespace mozilla {
 namespace net {
 
 //-----------------------------------------------------------------------------
 // nsHttpResponseHead <public>
 //-----------------------------------------------------------------------------
 
 // Note that the code below MUST be synchronized with the IPC
 // serialization/deserialization in PHttpChannelParams.h.
-nsHttpResponseHead::nsHttpResponseHead(const nsHttpResponseHead& aOther) {
+nsHttpResponseHead::nsHttpResponseHead(const nsHttpResponseHead& aOther)
+    : mRecursiveMutex("nsHttpResponseHead.mRecursiveMutex"),
+      mInVisitHeaders(false) {
   nsHttpResponseHead& other = const_cast<nsHttpResponseHead&>(aOther);
   RecursiveMutexAutoLock monitor(other.mRecursiveMutex);
 
   mHeaders = other.mHeaders;
   mVersion = other.mVersion;
   mStatus = other.mStatus;
   mStatusText = other.mStatusText;
   mContentLength = other.mContentLength;
--- a/netwerk/protocol/http/nsHttpResponseHead.h
+++ b/netwerk/protocol/http/nsHttpResponseHead.h
@@ -33,17 +33,33 @@ namespace net {
 
 //-----------------------------------------------------------------------------
 // nsHttpResponseHead represents the status line and headers from an HTTP
 // response.
 //-----------------------------------------------------------------------------
 
 class nsHttpResponseHead {
  public:
-  nsHttpResponseHead() = default;
+  nsHttpResponseHead()
+      : mVersion(HttpVersion::v1_1),
+        mStatus(200),
+        mContentLength(-1),
+        mHasCacheControl(false),
+        mCacheControlPublic(false),
+        mCacheControlPrivate(false),
+        mCacheControlNoStore(false),
+        mCacheControlNoCache(false),
+        mCacheControlImmutable(false),
+        mCacheControlStaleWhileRevalidateSet(false),
+        mCacheControlStaleWhileRevalidate(0),
+        mCacheControlMaxAgeSet(false),
+        mCacheControlMaxAge(0),
+        mPragmaNoCache(false),
+        mRecursiveMutex("nsHttpResponseHead.mRecursiveMutex"),
+        mInVisitHeaders(false) {}
 
   nsHttpResponseHead(const nsHttpResponseHead& aOther);
   nsHttpResponseHead& operator=(const nsHttpResponseHead& aOther);
 
   void Enter() { mRecursiveMutex.Lock(); }
   void Exit() { mRecursiveMutex.Unlock(); }
 
   HttpVersion Version();
@@ -182,39 +198,39 @@ class nsHttpResponseHead {
     // We ignore Pragma: no-cache if Cache-Control is set.
     MOZ_ASSERT_IF(mCacheControlNoCache, mHasCacheControl);
     return mHasCacheControl ? mCacheControlNoCache : mPragmaNoCache;
   }
 
  private:
   // All members must be copy-constructable and assignable
   nsHttpHeaderArray mHeaders;
-  HttpVersion mVersion{HttpVersion::v1_1};
-  uint16_t mStatus{200};
+  HttpVersion mVersion;
+  uint16_t mStatus;
   nsCString mStatusText;
-  int64_t mContentLength{-1};
+  int64_t mContentLength;
   nsCString mContentType;
   nsCString mContentCharset;
-  bool mHasCacheControl{false};
-  bool mCacheControlPublic{false};
-  bool mCacheControlPrivate{false};
-  bool mCacheControlNoStore{false};
-  bool mCacheControlNoCache{false};
-  bool mCacheControlImmutable{false};
-  bool mCacheControlStaleWhileRevalidateSet{false};
-  uint32_t mCacheControlStaleWhileRevalidate{0};
-  bool mCacheControlMaxAgeSet{false};
-  uint32_t mCacheControlMaxAge{0};
-  bool mPragmaNoCache{false};
+  bool mHasCacheControl;
+  bool mCacheControlPublic;
+  bool mCacheControlPrivate;
+  bool mCacheControlNoStore;
+  bool mCacheControlNoCache;
+  bool mCacheControlImmutable;
+  bool mCacheControlStaleWhileRevalidateSet;
+  uint32_t mCacheControlStaleWhileRevalidate;
+  bool mCacheControlMaxAgeSet;
+  uint32_t mCacheControlMaxAge;
+  bool mPragmaNoCache;
 
   // We are using RecursiveMutex instead of a Mutex because VisitHeader
   // function calls nsIHttpHeaderVisitor::VisitHeader while under lock.
-  mutable RecursiveMutex mRecursiveMutex{"nsHttpResponseHead.mRecursiveMutex"};
+  mutable RecursiveMutex mRecursiveMutex;
   // During VisitHeader we sould not allow cal to SetHeader.
-  bool mInVisitHeaders{false};
+  bool mInVisitHeaders;
 
   friend struct IPC::ParamTraits<nsHttpResponseHead>;
 };
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // nsHttpResponseHead_h__
--- a/netwerk/protocol/http/nsHttpTransaction.cpp
+++ b/netwerk/protocol/http/nsHttpTransaction.cpp
@@ -69,17 +69,92 @@ using namespace mozilla::net;
 
 namespace mozilla {
 namespace net {
 
 //-----------------------------------------------------------------------------
 // nsHttpTransaction <public>
 //-----------------------------------------------------------------------------
 
-nsHttpTransaction::nsHttpTransaction() {
+nsHttpTransaction::nsHttpTransaction()
+    : mLock("transaction lock"),
+      mChannelId(0),
+      mRequestSize(0),
+      mRequestHead(nullptr),
+      mResponseHead(nullptr),
+      mReader(nullptr),
+      mWriter(nullptr),
+      mContentLength(-1),
+      mContentRead(0),
+      mTransferSize(0),
+      mInvalidResponseBytesRead(0),
+      mPushedStream(nullptr),
+      mInitialRwin(0),
+      mChunkedDecoder(nullptr),
+      mStatus(NS_OK),
+      mPriority(0),
+      mRestartCount(0),
+      mCaps(0),
+      mHttpVersion(HttpVersion::UNKNOWN),
+      mHttpResponseCode(0),
+      mCurrentHttpResponseHeaderSize(0),
+      mThrottlingReadAllowance(THROTTLE_NO_LIMIT),
+      mCapsToClear(0),
+      mResponseIsComplete(false),
+      mClosed(false),
+      mReadingStopped(false),
+      mConnected(false),
+      mActivated(false),
+      mHaveStatusLine(false),
+      mHaveAllHeaders(false),
+      mTransactionDone(false),
+      mDidContentStart(false),
+      mNoContent(false),
+      mSentData(false),
+      mReceivedData(false),
+      mStatusEventPending(false),
+      mHasRequestBody(false),
+      mProxyConnectFailed(false),
+      mHttpResponseMatched(false),
+      mPreserveStream(false),
+      mDispatchedAsBlocking(false),
+      mResponseTimeoutEnabled(true),
+      mForceRestart(false),
+      mReuseOnRestart(false),
+      mContentDecoding(false),
+      mContentDecodingCheck(false),
+      mDeferredSendProgress(false),
+      mWaitingOnPipeOut(false),
+      mDoNotRemoveAltSvc(false),
+      mReportedStart(false),
+      mReportedResponseHeader(false),
+      mResponseHeadTaken(false),
+      mForTakeResponseTrailers(nullptr),
+      mResponseTrailersTaken(false),
+      mRestarted(false),
+      mTopBrowsingContextId(0),
+      mSubmittedRatePacing(false),
+      mPassedRatePacing(false),
+      mSynchronousRatePaceRequest(false),
+      mClassOfService(0),
+      mResolvedByTRR(false),
+      mEchConfigUsed(false),
+      m0RTTInProgress(false),
+      mDoNotTryEarlyData(false),
+      mEarlyDataDisposition(EARLY_NONE),
+      mTrafficCategory(HttpTrafficCategory::eInvalid),
+      mProxyConnectResponseCode(0),
+      mHTTPSSVCReceivedStage(HTTPSSVC_NOT_USED),
+      m421Received(false),
+      mDontRetryWithDirectRoute(false),
+      mFastFallbackTriggered(false),
+      mAllRecordsInH3ExcludedListBefore(false),
+      mHttp3BackupTimerCreated(false) {
+  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/http/nsHttpTransaction.h
+++ b/netwerk/protocol/http/nsHttpTransaction.h
@@ -289,165 +289,165 @@ class nsHttpTransaction final : public n
       return NS_OK;
     }
 
    private:
     RefPtr<nsHttpTransaction> mTrans;
     nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
   };
 
-  Mutex mLock{"transaction lock"};
+  Mutex mLock;
 
   nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
   nsCOMPtr<nsITransportEventSink> mTransportSink;
   nsCOMPtr<nsIEventTarget> mConsumerTarget;
   nsCOMPtr<nsISupports> mSecurityInfo;
   nsCOMPtr<nsIAsyncInputStream> mPipeIn;
   nsCOMPtr<nsIAsyncOutputStream> mPipeOut;
   nsCOMPtr<nsIRequestContext> mRequestContext;
 
-  uint64_t mChannelId{0};
+  uint64_t mChannelId;
   nsCOMPtr<nsIHttpActivityObserver> mActivityDistributor;
 
   nsCString mReqHeaderBuf;  // flattened request headers
   nsCOMPtr<nsIInputStream> mRequestStream;
-  int64_t mRequestSize{0};
+  int64_t mRequestSize;
 
   RefPtr<nsAHttpConnection> mConnection;
   RefPtr<nsHttpConnectionInfo> mConnInfo;
   // This is only set in UpdateConnectionInfo() when we have received a SVCB RR.
   // When echConfig is not used and the connection is failed, this transaction
   // will be restarted with this origin connection info directly.
   // When echConfig is enabled, there are two cases below.
   // 1. If all records have echConfig, we will retry other records except the
   // failed one. In the case all other records with echConfig are failed and the
   // pref network.dns.echconfig.fallback_to_origin_when_all_failed is true, this
   // origin connection info will be used.
   // 2. If only some records have echConfig and some not, we always fallback to
   // this origin conn info.
   RefPtr<nsHttpConnectionInfo> mOrigConnInfo;
-  nsHttpRequestHead* mRequestHead{nullptr};    // weak ref
-  nsHttpResponseHead* mResponseHead{nullptr};  // owning pointer
+  nsHttpRequestHead* mRequestHead;    // weak ref
+  nsHttpResponseHead* mResponseHead;  // owning pointer
 
-  nsAHttpSegmentReader* mReader{nullptr};
-  nsAHttpSegmentWriter* mWriter{nullptr};
+  nsAHttpSegmentReader* mReader;
+  nsAHttpSegmentWriter* mWriter;
 
   nsCString mLineBuf;  // may contain a partial line
 
-  int64_t mContentLength{-1};  // equals -1 if unknown
-  int64_t mContentRead{0};     // count of consumed content bytes
-  Atomic<int64_t, ReleaseAcquire> mTransferSize{0};  // count of received bytes
+  int64_t mContentLength;  // equals -1 if unknown
+  int64_t mContentRead;    // count of consumed content bytes
+  Atomic<int64_t, ReleaseAcquire> mTransferSize;  // count of received bytes
 
   // After a 304/204 or other "no-content" style response we will skip over
   // up to MAX_INVALID_RESPONSE_BODY_SZ bytes when looking for the next
   // response header to deal with servers that actually sent a response
   // body where they should not have. This member tracks how many bytes have
   // so far been skipped.
-  uint32_t mInvalidResponseBytesRead{0};
+  uint32_t mInvalidResponseBytesRead;
 
   RefPtr<Http2PushedStreamWrapper> mPushedStream;
-  uint32_t mInitialRwin{0};
+  uint32_t mInitialRwin;
 
-  nsHttpChunkedDecoder* mChunkedDecoder{nullptr};
+  nsHttpChunkedDecoder* mChunkedDecoder;
 
   TimingStruct mTimings;
 
-  nsresult mStatus{NS_OK};
+  nsresult mStatus;
 
-  int16_t mPriority{0};
+  int16_t mPriority;
 
-  uint16_t mRestartCount{
-      0};  // the number of times this transaction has been restarted
-  uint32_t mCaps{0};
+  uint16_t
+      mRestartCount;  // the number of times this transaction has been restarted
+  uint32_t mCaps;
 
-  HttpVersion mHttpVersion{HttpVersion::UNKNOWN};
-  uint16_t mHttpResponseCode{0};
+  HttpVersion mHttpVersion;
+  uint16_t mHttpResponseCode;
   nsCString mFlat407Headers;
 
-  uint32_t mCurrentHttpResponseHeaderSize{0};
+  uint32_t mCurrentHttpResponseHeaderSize;
 
   int32_t const THROTTLE_NO_LIMIT = -1;
   // This can have 3 possible values:
   // * THROTTLE_NO_LIMIT - this means the transaction is not in any way limited
   //                       to read the response, this is the default
   // * a positive number - a limit is set because the transaction is obligated
   //                       to throttle the response read, this is decresed with
   //                       every piece of data the transaction receives
   // * zero - when the transaction depletes the limit for reading, this makes it
   //          stop reading and return WOULD_BLOCK from WriteSegments;
   //          transaction then waits for a call of ResumeReading that resets
   //          this member back to THROTTLE_NO_LIMIT
-  int32_t mThrottlingReadAllowance{THROTTLE_NO_LIMIT};
+  int32_t mThrottlingReadAllowance;
 
   // mCapsToClear holds flags that should be cleared in mCaps, e.g. unset
   // NS_HTTP_REFRESH_DNS when DNS refresh request has completed to avoid
   // redundant requests on the network. The member itself is atomic, but
   // access to it from the networking thread may happen either before or
   // after the main thread modifies it. To deal with raciness, only unsetting
   // bitfields should be allowed: 'lost races' will thus err on the
   // conservative side, e.g. by going ahead with a 2nd DNS refresh.
-  Atomic<uint32_t> mCapsToClear{0};
-  Atomic<bool, ReleaseAcquire> mResponseIsComplete{false};
-  Atomic<bool, ReleaseAcquire> mClosed{false};
+  Atomic<uint32_t> mCapsToClear;
+  Atomic<bool, ReleaseAcquire> mResponseIsComplete;
+  Atomic<bool, ReleaseAcquire> mClosed;
 
   // True iff WriteSegments was called while this transaction should be
   // throttled (stop reading) Used to resume read on unblock of reading.  Conn
   // manager is responsible for calling back to resume reading.
-  bool mReadingStopped{false};
+  bool mReadingStopped;
 
   // state flags, all logically boolean, but not packed together into a
   // bitfield so as to avoid bitfield-induced races.  See bug 560579.
-  bool mConnected{false};
-  bool mActivated{false};
-  bool mHaveStatusLine{false};
-  bool mHaveAllHeaders{false};
-  bool mTransactionDone{false};
-  bool mDidContentStart{false};
-  bool mNoContent{false};  // expecting an empty entity body
-  bool mSentData{false};
-  bool mReceivedData{false};
-  bool mStatusEventPending{false};
-  bool mHasRequestBody{false};
-  bool mProxyConnectFailed{false};
-  bool mHttpResponseMatched{false};
-  bool mPreserveStream{false};
-  bool mDispatchedAsBlocking{false};
-  bool mResponseTimeoutEnabled{true};
-  bool mForceRestart{false};
-  bool mReuseOnRestart{false};
-  bool mContentDecoding{false};
-  bool mContentDecodingCheck{false};
-  bool mDeferredSendProgress{false};
-  bool mWaitingOnPipeOut{false};
+  bool mConnected;
+  bool mActivated;
+  bool mHaveStatusLine;
+  bool mHaveAllHeaders;
+  bool mTransactionDone;
+  bool mDidContentStart;
+  bool mNoContent;  // expecting an empty entity body
+  bool mSentData;
+  bool mReceivedData;
+  bool mStatusEventPending;
+  bool mHasRequestBody;
+  bool mProxyConnectFailed;
+  bool mHttpResponseMatched;
+  bool mPreserveStream;
+  bool mDispatchedAsBlocking;
+  bool mResponseTimeoutEnabled;
+  bool mForceRestart;
+  bool mReuseOnRestart;
+  bool mContentDecoding;
+  bool mContentDecodingCheck;
+  bool mDeferredSendProgress;
+  bool mWaitingOnPipeOut;
 
   bool mIsHttp3Used = false;
-  bool mDoNotRemoveAltSvc{false};
+  bool mDoNotRemoveAltSvc;
 
   // mClosed           := transaction has been explicitly closed
   // mTransactionDone  := transaction ran to completion or was interrupted
   // mResponseComplete := transaction ran to completion
 
   // For Restart-In-Progress Functionality
-  bool mReportedStart{false};
-  bool mReportedResponseHeader{false};
+  bool mReportedStart;
+  bool mReportedResponseHeader;
 
   // protected by nsHttp::GetLock()
-  bool mResponseHeadTaken{false};
+  bool mResponseHeadTaken;
   UniquePtr<nsHttpHeaderArray> mForTakeResponseTrailers;
-  bool mResponseTrailersTaken{false};
+  bool mResponseTrailersTaken;
 
   // Set when this transaction was restarted by call to Restart().  Used to tell
   // the http channel to reset proxy authentication.
-  Atomic<bool> mRestarted{false};
+  Atomic<bool> mRestarted;
 
   // The time when the transaction was submitted to the Connection Manager
   TimeStamp mPendingTime;
   TimeDuration mPendingDurationTime;
 
-  uint64_t mTopBrowsingContextId{0};
+  uint64_t mTopBrowsingContextId;
 
   // For Rate Pacing via an EventTokenBucket
  public:
   // called by the connection manager to run this transaction through the
   // token bucket. If the token bucket admits the transaction immediately it
   // returns true. The function is called repeatedly until it returns true.
   bool TryToRunPacedRequest();
 
@@ -468,28 +468,28 @@ class nsHttpTransaction final : public n
   // previously throttled transaction has to be resumed.
   void ResumeReading();
 
   // This examins classification of this transaction whether the Throttleable
   // class has been set while Leader, Unblocked, DontThrottle has not.
   bool EligibleForThrottling() const;
 
  private:
-  bool mSubmittedRatePacing{false};
-  bool mPassedRatePacing{false};
-  bool mSynchronousRatePaceRequest{false};
+  bool mSubmittedRatePacing;
+  bool mPassedRatePacing;
+  bool mSynchronousRatePaceRequest;
   nsCOMPtr<nsICancelable> mTokenBucketCancel;
 
   void CollectTelemetryForUploads();
 
  public:
   uint32_t ClassOfService() { return mClassOfService; }
 
  private:
-  Atomic<uint32_t, Relaxed> mClassOfService{0};
+  Atomic<uint32_t, Relaxed> mClassOfService;
 
  public:
   // setting TunnelProvider to non-null means the transaction should only
   // be dispatched on a specific ConnectionInfo Hash Key (as opposed to a
   // generic wild card one). That means in the specific case of carrying this
   // transaction on an HTTP/2 tunnel it will only be dispatched onto an
   // existing tunnel instead of triggering creation of a new one.
   // The tunnel provider is used for ASpdySession::MaybeReTunnel() checks.
@@ -500,40 +500,40 @@ class nsHttpTransaction final : public n
   // Called when this transaction is inserted in the pending queue.
   void OnPendingQueueInserted();
 
  private:
   RefPtr<ASpdySession> mTunnelProvider;
   TransactionObserverFunc mTransactionObserver;
   NetAddr mSelfAddr;
   NetAddr mPeerAddr;
-  bool mResolvedByTRR{false};
+  bool mResolvedByTRR;
   bool mEchConfigUsed = false;
 
-  bool m0RTTInProgress{false};
-  bool mDoNotTryEarlyData{false};
+  bool m0RTTInProgress;
+  bool mDoNotTryEarlyData;
   enum {
     EARLY_NONE,
     EARLY_SENT,
     EARLY_ACCEPTED,
     EARLY_425