Merge mozilla-inbound to mozilla-central. a=merge
authorDorel Luca <dluca@mozilla.com>
Fri, 15 Jun 2018 05:39:35 +0300
changeset 422560 e51f8dbf0397
parent 422535 684094d78fb4 (current diff)
parent 422559 a165a02849d3 (diff)
child 422623 d871c3ff503a
child 422651 f7fae6dc037f
push id34138
push userdluca@mozilla.com
push dateFri, 15 Jun 2018 02:39:59 +0000
treeherdermozilla-central@e51f8dbf0397 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge mozilla-inbound to mozilla-central. a=merge
testing/web-platform/meta/webgl/bufferSubData.html.ini
testing/web-platform/meta/webgl/compressedTexImage2D.html.ini
testing/web-platform/meta/webgl/texImage2D.html.ini
testing/web-platform/meta/webgl/texSubImage2D.html.ini
testing/web-platform/meta/webgl/uniformMatrixNfv.html.ini
--- a/accessible/tests/browser/browser.ini
+++ b/accessible/tests/browser/browser.ini
@@ -6,27 +6,27 @@ support-files =
   shared-head.js
 
 [browser_shutdown_acc_reference.js]
 [browser_shutdown_doc_acc_reference.js]
 [browser_shutdown_multi_acc_reference_obj.js]
 [browser_shutdown_multi_acc_reference_doc.js]
 [browser_shutdown_multi_reference.js]
 [browser_shutdown_parent_own_reference.js]
-skip-if = !e10s || (os == 'win' && os_version == '5.1') || (verify && debug && (os == 'win')) # e10s specific test for a11y start/shutdown between parent and content.
+skip-if = !e10s || (verify && debug && (os == 'win')) # e10s specific test for a11y start/shutdown between parent and content.
 [browser_shutdown_pref.js]
 [browser_shutdown_proxy_acc_reference.js]
 skip-if = !e10s || (os == 'win') # e10s specific test for a11y start/shutdown between parent and content.
 [browser_shutdown_proxy_doc_acc_reference.js]
 skip-if = !e10s || (os == 'win') || (verify && debug) # e10s specific test for a11y start/shutdown between parent and content.
 [browser_shutdown_multi_proxy_acc_reference_doc.js]
 skip-if = !e10s || (os == 'win') || (verify && debug && (os == 'linux')) # e10s specific test for a11y start/shutdown between parent and content.
 [browser_shutdown_multi_proxy_acc_reference_obj.js]
 skip-if = !e10s || (os == 'win') || (verify && debug && (os == 'linux')) # e10s specific test for a11y start/shutdown between parent and content.
 [browser_shutdown_remote_no_reference.js]
-skip-if = !e10s || (os == 'win' && os_version == '5.1') || (verify && debug && (os == 'win')) # e10s specific test for a11y start/shutdown between parent and content.
+skip-if = !e10s || (verify && debug && (os == 'win')) # e10s specific test for a11y start/shutdown between parent and content.
 [browser_shutdown_remote_only.js]
-skip-if = !e10s || (os == 'win' && os_version == '5.1') # e10s specific test for a11y start/shutdown between parent and content.
+skip-if = !e10s # e10s specific test for a11y start/shutdown between parent and content.
 [browser_shutdown_remote_own_reference.js]
-skip-if = !e10s || (os == 'win' && os_version == '5.1') # e10s specific test for a11y start/shutdown between parent and content.
+skip-if = !e10s # e10s specific test for a11y start/shutdown between parent and content.
 [browser_shutdown_scope_lifecycle.js]
 [browser_shutdown_start_restart.js]
 skip-if = (verify && debug)
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -1621,17 +1621,23 @@ var SessionStoreInternal = {
           // Set up the list of promises that will signal a complete sessionstore
           // shutdown: either all data is saved, or we crashed or the message IPC
           // channel went away in the meantime.
           let promises = [this.flushAllWindowsAsync(progress)];
 
           const observeTopic = topic => {
             let deferred = PromiseUtils.defer();
             const cleanup = () => Services.obs.removeObserver(deferred.resolve, topic);
-            Services.obs.addObserver(deferred.resolve, topic);
+            Services.obs.addObserver(subject => {
+              // Skip abort on ipc:content-shutdown if not abnormal/crashed
+              subject.QueryInterface(Ci.nsIPropertyBag2);
+              if (!(topic == "ipc:content-shutdown" && !subject.get("abnormal"))) {
+                deferred.resolve();
+              }
+            }, topic);
             deferred.promise.then(cleanup, cleanup);
             return deferred;
           };
 
           // Build a list of deferred executions that require cleanup once the
           // Promise race is won.
           // Ensure that the timer fires earlier than the AsyncShutdown crash timer.
           let waitTimeMaxMs = Math.max(0, AsyncShutdown.DELAY_CRASH_MS - 10000);
--- a/browser/modules/BrowserWindowTracker.jsm
+++ b/browser/modules/BrowserWindowTracker.jsm
@@ -206,17 +206,19 @@ this.BrowserWindowTracker = {
   /**
    * Iterator property that yields window objects by z-index, in reverse order.
    * This means that the lastly focused window will the first item that is yielded.
    * Note: we only know the order of windows we're actively tracking, which
    * basically means _only_ browser windows.
    */
   orderedWindows: {
     * [Symbol.iterator]() {
-      for (let window of _trackedWindows)
+      // Clone the windows array immediately as it may change during iteration,
+      // we'd rather have an outdated order than skip/revisit windows.
+      for (let window of [..._trackedWindows])
         yield window;
     }
   },
 
   track(window) {
     return WindowHelper.addWindow(window);
   }
 };
--- a/dom/push/PushService.jsm
+++ b/dom/push/PushService.jsm
@@ -27,16 +27,19 @@ const CONNECTION_PROTOCOLS = (function()
     const {PushServiceAndroidGCM} = ChromeUtils.import("resource://gre/modules/PushServiceAndroidGCM.jsm");
     return [PushServiceAndroidGCM];
   }
 })();
 
 XPCOMUtils.defineLazyServiceGetter(this, "gPushNotifier",
                                    "@mozilla.org/push/Notifier;1",
                                    "nsIPushNotifier");
+XPCOMUtils.defineLazyServiceGetter(this, "eTLDService",
+                                   "@mozilla.org/network/effective-tld-service;1",
+                                   "nsIEffectiveTLDService");
 
 var EXPORTED_SYMBOLS = ["PushService"];
 
 XPCOMUtils.defineLazyGetter(this, "console", () => {
   let {ConsoleAPI} = ChromeUtils.import("resource://gre/modules/Console.jsm", {});
   return new ConsoleAPI({
     maxLogLevelPref: "dom.push.loglevel",
     prefix: "PushService",
@@ -81,43 +84,16 @@ const UNINIT_EVENT = 3;
  */
 function errorWithResult(message, result = Cr.NS_ERROR_FAILURE) {
   let error = new Error(message);
   error.result = result;
   return error;
 }
 
 /**
- * Copied from ForgetAboutSite.jsm.
- *
- * Returns true if the string passed in is part of the root domain of the
- * current string.  For example, if this is "www.mozilla.org", and we pass in
- * "mozilla.org", this will return true.  It would return false the other way
- * around.
- */
-function hasRootDomain(str, aDomain)
-{
-  let index = str.indexOf(aDomain);
-  // If aDomain is not found, we know we do not have it as a root domain.
-  if (index == -1)
-    return false;
-
-  // If the strings are the same, we obviously have a match.
-  if (str == aDomain)
-    return true;
-
-  // Otherwise, we have aDomain as our root domain iff the index of aDomain is
-  // aDomain.length subtracted from our length and (since we do not have an
-  // exact match) the character before the index is a dot or slash.
-  let prevChar = str[index - 1];
-  return (index == (str.length - aDomain.length)) &&
-         (prevChar == "." || prevChar == "/");
-}
-
-/**
  * The implementation of the push system. It uses WebSockets
  * (PushServiceWebSocket) to communicate with the server and PushDB (IndexedDB)
  * for persistence.
  */
 var PushService = {
   _service: null,
   _state: PUSH_SERVICE_UNINIT,
   _db: null,
@@ -1129,17 +1105,17 @@ var PushService = {
       });
   },
 
   clear: function(info) {
     return this._checkActivated()
       .then(_ => {
         return this._dropRegistrationsIf(record =>
           info.domain == "*" ||
-          (record.uri && hasRootDomain(record.uri.prePath, info.domain))
+          (record.uri && eTLDService.hasRootDomain(record.uri.prePath, info.domain))
         );
       })
       .catch(e => {
         console.warn("clear: Error dropping subscriptions for domain",
           info.domain, e);
         return Promise.resolve();
       });
   },
--- a/dom/serviceworkers/ServiceWorkerManager.cpp
+++ b/dom/serviceworkers/ServiceWorkerManager.cpp
@@ -4,16 +4,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ServiceWorkerManager.h"
 
 #include "nsAutoPtr.h"
 #include "nsIConsoleService.h"
 #include "nsIDocument.h"
+#include "nsIEffectiveTLDService.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsIStreamLoader.h"
 #include "nsIHttpChannel.h"
 #include "nsIHttpChannelInternal.h"
 #include "nsIHttpHeaderVisitor.h"
 #include "nsINamed.h"
 #include "nsINetworkInterceptController.h"
 #include "nsIMutableArray.h"
@@ -2796,60 +2797,16 @@ ServiceWorkerManager::RemoveRegistration
 
   // When a registration is removed, we must clear its contents since the DOM
   // object may be held by content script.
   aRegistration->Clear();
 
   RemoveScopeAndRegistration(aRegistration);
 }
 
-namespace {
-/**
- * See toolkit/modules/sessionstore/Utils.jsm function hasRootDomain().
- *
- * Returns true if the |url| passed in is part of the given root |domain|.
- * For example, if |url| is "www.mozilla.org", and we pass in |domain| as
- * "mozilla.org", this will return true. It would return false the other way
- * around.
- */
-bool
-HasRootDomain(nsIURI* aURI, const nsACString& aDomain)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(aURI);
-
-  nsAutoCString host;
-  nsresult rv = aURI->GetHost(host);
-  if (NS_WARN_IF(NS_FAILED(rv))) {
-    return false;
-  }
-
-  nsACString::const_iterator start, end;
-  host.BeginReading(start);
-  host.EndReading(end);
-  if (!FindInReadable(aDomain, start, end)) {
-    return false;
-  }
-
-  if (host.Equals(aDomain)) {
-    return true;
-  }
-
-  // Beginning of the string matches, can't look at the previous char.
-  if (start.get() == host.BeginReading()) {
-    // Equals failed so this is fine.
-    return false;
-  }
-
-  char prevChar = *(--start);
-  return prevChar == '.';
-}
-
-} // namespace
-
 NS_IMETHODIMP
 ServiceWorkerManager::GetAllRegistrations(nsIArray** aResult)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   nsCOMPtr<nsIMutableArray> array(do_CreateInstance(NS_ARRAY_CONTRACTID));
   if (!array) {
     return NS_ERROR_OUT_OF_MEMORY;
@@ -2895,25 +2852,47 @@ ServiceWorkerManager::ForceUnregister(Re
   Unregister(aRegistration->Principal(), nullptr, NS_ConvertUTF8toUTF16(aRegistration->Scope()));
 }
 
 void
 ServiceWorkerManager::Remove(const nsACString& aHost)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
+  nsCOMPtr<nsIEffectiveTLDService> tldService =
+    do_GetService(NS_EFFECTIVETLDSERVICE_CONTRACTID);
+  if (NS_WARN_IF(!tldService)) {
+    return;
+  }
+
   for (auto it1 = mRegistrationInfos.Iter(); !it1.Done(); it1.Next()) {
     ServiceWorkerManager::RegistrationDataPerPrincipal* data = it1.UserData();
     for (auto it2 = data->mInfos.Iter(); !it2.Done(); it2.Next()) {
       ServiceWorkerRegistrationInfo* reg = it2.UserData();
       nsCOMPtr<nsIURI> scopeURI;
       nsresult rv = NS_NewURI(getter_AddRefs(scopeURI), it2.Key(),
                               nullptr, nullptr);
+      if (NS_WARN_IF(NS_FAILED(rv))) {
+        continue;
+      }
+
+      nsAutoCString host;
+      rv = scopeURI->GetHost(host);
+      if (NS_WARN_IF(NS_FAILED(rv))) {
+        continue;
+      }
+
       // This way subdomains are also cleared.
-      if (NS_SUCCEEDED(rv) && HasRootDomain(scopeURI, aHost)) {
+      bool hasRootDomain = false;
+      rv = tldService->HasRootDomain(host, aHost, &hasRootDomain);
+      if (NS_WARN_IF(NS_FAILED(rv))) {
+        continue;
+      }
+
+      if (hasRootDomain) {
         ForceUnregister(data, reg);
       }
     }
   }
 }
 
 void
 ServiceWorkerManager::PropagateRemove(const nsACString& aHost)
--- a/js/public/Wrapper.h
+++ b/js/public/Wrapper.h
@@ -138,17 +138,17 @@ class JS_FRIEND_API(Wrapper) : public Fo
         LAST_USED_FLAG = CROSS_COMPARTMENT
     };
 
     static JSObject* New(JSContext* cx, JSObject* obj, const Wrapper* handler,
                          const WrapperOptions& options = WrapperOptions());
 
     static JSObject* Renew(JSObject* existing, JSObject* obj, const Wrapper* handler);
 
-    static const Wrapper* wrapperHandler(JSObject* wrapper);
+    static const Wrapper* wrapperHandler(const JSObject* wrapper);
 
     static JSObject* wrappedObject(JSObject* wrapper);
 
     unsigned flags() const {
         return mFlags;
     }
 
     static const char family;
@@ -330,17 +330,17 @@ class JS_FRIEND_API(SecurityWrapper) : p
 };
 
 typedef SecurityWrapper<CrossCompartmentWrapper> CrossCompartmentSecurityWrapper;
 
 extern JSObject*
 TransparentObjectWrapper(JSContext* cx, HandleObject existing, HandleObject obj);
 
 inline bool
-IsWrapper(JSObject* obj)
+IsWrapper(const JSObject* obj)
 {
     return IsProxy(obj) && GetProxyHandler(obj)->family() == &Wrapper::family;
 }
 
 // Given a JSObject, returns that object stripped of wrappers. If
 // stopAtWindowProxy is true, then this returns the WindowProxy if it was
 // previously wrapped. Otherwise, this returns the first object for which
 // JSObject::isWrapper returns false.
--- a/js/src/builtin/Eval.cpp
+++ b/js/src/builtin/Eval.cpp
@@ -217,18 +217,17 @@ static bool
 EvalKernel(JSContext* cx, HandleValue v, EvalType evalType, AbstractFramePtr caller,
            HandleObject env, jsbytecode* pc, MutableHandleValue vp)
 {
     MOZ_ASSERT((evalType == INDIRECT_EVAL) == !caller);
     MOZ_ASSERT((evalType == INDIRECT_EVAL) == !pc);
     MOZ_ASSERT_IF(evalType == INDIRECT_EVAL, IsGlobalLexicalEnvironment(env));
     AssertInnerizedEnvironmentChain(cx, *env);
 
-    Rooted<GlobalObject*> envGlobal(cx, &env->global());
-    if (!GlobalObject::isRuntimeCodeGenEnabled(cx, envGlobal)) {
+    if (!GlobalObject::isRuntimeCodeGenEnabled(cx, cx->global())) {
         JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_CSP_BLOCKED_EVAL);
         return false;
     }
 
     // ES5 15.1.2.1 step 1.
     if (!v.isString()) {
         vp.set(v);
         return true;
@@ -320,18 +319,17 @@ EvalKernel(JSContext* cx, HandleValue v,
 bool
 js::DirectEvalStringFromIon(JSContext* cx,
                             HandleObject env, HandleScript callerScript,
                             HandleValue newTargetValue, HandleString str,
                             jsbytecode* pc, MutableHandleValue vp)
 {
     AssertInnerizedEnvironmentChain(cx, *env);
 
-    Rooted<GlobalObject*> envGlobal(cx, &env->global());
-    if (!GlobalObject::isRuntimeCodeGenEnabled(cx, envGlobal)) {
+    if (!GlobalObject::isRuntimeCodeGenEnabled(cx, cx->global())) {
         JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_CSP_BLOCKED_EVAL);
         return false;
     }
 
     // ES5 15.1.2.1 steps 2-8.
 
     RootedLinearString linearStr(cx, str->ensureLinear(cx));
     if (!linearStr)
@@ -396,18 +394,17 @@ js::DirectEvalStringFromIon(JSContext* c
                          NullFramePtr() /* evalInFrame */, vp.address());
 }
 
 bool
 js::IndirectEval(JSContext* cx, unsigned argc, Value* vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
-    Rooted<GlobalObject*> global(cx, &args.callee().global());
-    RootedObject globalLexical(cx, &global->lexicalEnvironment());
+    RootedObject globalLexical(cx, &cx->global()->lexicalEnvironment());
 
     // Note we'll just pass |undefined| here, then return it directly (or throw
     // if runtime codegen is disabled), if no argument is provided.
     return EvalKernel(cx, args.get(0), INDIRECT_EVAL, NullFramePtr(), globalLexical, nullptr,
                       args.rval());
 }
 
 bool
--- a/js/src/builtin/Promise.cpp
+++ b/js/src/builtin/Promise.cpp
@@ -750,17 +750,17 @@ EnqueuePromiseReactionJob(JSContext* cx,
     // unwrapping and then getting the global. This is very convoluted, but
     // much better than having to store the original global as a private value
     // because we couldn't wrap it to store it as a normal JS value.
     RootedObject global(cx);
     RootedObject objectFromIncumbentGlobal(cx, reaction->incumbentGlobalObject());
     if (objectFromIncumbentGlobal) {
         objectFromIncumbentGlobal = CheckedUnwrap(objectFromIncumbentGlobal);
         MOZ_ASSERT(objectFromIncumbentGlobal);
-        global = &objectFromIncumbentGlobal->global();
+        global = &objectFromIncumbentGlobal->nonCCWGlobal();
     }
 
     // Note: the global we pass here might be from a different compartment
     // than job and promise. While it's somewhat unusual to pass objects
     // from multiple compartments, in this case we specifically need the
     // global to be unwrapped because wrapping and unwrapping aren't
     // necessarily symmetric for globals.
     return cx->runtime()->enqueuePromiseJob(cx, job, promise, global);
@@ -1022,17 +1022,17 @@ RejectMaybeWrappedPromise(JSContext *cx,
         // rejection handler.
         if (!promise->compartment()->wrap(cx, &reason))
             return false;
         if (reason.isObject() && !CheckedUnwrap(&reason.toObject())) {
             // Report the existing reason, so we don't just drop it on the
             // floor.
             RootedObject realReason(cx, UncheckedUnwrap(&reason.toObject()));
             RootedValue realReasonVal(cx, ObjectValue(*realReason));
-            RootedObject realGlobal(cx, &realReason->global());
+            RootedObject realGlobal(cx, &realReason->nonCCWGlobal());
             ReportErrorToGlobal(cx, realGlobal, realReasonVal);
 
             // Async stacks are only properly adopted if there's at least one
             // interpreter frame active right now. If a thenable job with a
             // throwing `then` function got us here, that'll not be the case,
             // so we add one by throwing the error from self-hosted code.
             if (!GetInternalError(cx, JSMSG_PROMISE_ERROR_IN_WRAPPED_REJECTION_REASON, &reason))
                 return false;
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -5173,17 +5173,17 @@ ObjectGlobal(JSContext* cx, unsigned arg
     }
 
     RootedObject obj(cx, &args[0].toObject());
     if (IsWrapper(obj)) {
         args.rval().setNull();
         return true;
     }
 
-    obj = ToWindowProxyIfWindow(&obj->global());
+    obj = ToWindowProxyIfWindow(&obj->nonCCWGlobal());
 
     args.rval().setObject(*obj);
     return true;
 }
 
 JSScript*
 js::TestingFunctionArgumentToScript(JSContext* cx,
                                     HandleValue v,
--- a/js/src/jit/BaselineIC.cpp
+++ b/js/src/jit/BaselineIC.cpp
@@ -2345,19 +2345,17 @@ DoCallFallback(JSContext* cx, BaselineFr
             }
         }
     }
 
     if (constructing) {
         if (!ConstructFromStack(cx, callArgs))
             return false;
         res.set(callArgs.rval());
-    } else if ((op == JSOP_EVAL || op == JSOP_STRICTEVAL) &&
-               frame->environmentChain()->global().valueIsEval(callee))
-    {
+    } else if ((op == JSOP_EVAL || op == JSOP_STRICTEVAL) && cx->global()->valueIsEval(callee)) {
         if (!DirectEval(cx, callArgs.get(0), res))
             return false;
     } else {
         MOZ_ASSERT(op == JSOP_CALL ||
                    op == JSOP_CALL_IGNORES_RV ||
                    op == JSOP_CALLITER ||
                    op == JSOP_FUNCALL ||
                    op == JSOP_FUNAPPLY ||
--- a/js/src/jit/CacheIR.cpp
+++ b/js/src/jit/CacheIR.cpp
@@ -1106,17 +1106,17 @@ GetPropIRGenerator::tryAttachCrossCompar
 
     // If we allowed different zones we would have to wrap strings.
     if (unwrapped->compartment()->zone() != cx_->compartment()->zone())
         return false;
 
     // Take the unwrapped object's global, and wrap in a
     // this-compartment wrapper. This is what will be stored in the IC
     // keep the compartment alive.
-    RootedObject wrappedTargetGlobal(cx_, &unwrapped->global());
+    RootedObject wrappedTargetGlobal(cx_, &unwrapped->deprecatedGlobal());
     if (!cx_->compartment()->wrap(cx_, &wrappedTargetGlobal))
         return false;
 
     bool isWindowProxy = false;
     RootedShape shape(cx_);
     RootedNativeObject holder(cx_);
 
     // Enter realm of target since some checks have side-effects
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -1210,17 +1210,17 @@ JS_IdToProtoKey(JSContext* cx, HandleId 
     return static_cast<JSProtoKey>(stdnm - standard_class_names);
 }
 
 JS_PUBLIC_API(JSObject*)
 JS_GetGlobalForObject(JSContext* cx, JSObject* obj)
 {
     AssertHeapIsIdle();
     assertSameCompartment(cx, obj);
-    return &obj->global();
+    return &obj->deprecatedGlobal();
 }
 
 extern JS_PUBLIC_API(bool)
 JS_IsGlobalObject(JSObject* obj)
 {
     return obj->is<GlobalObject>();
 }
 
--- a/js/src/jsfriendapi.cpp
+++ b/js/src/jsfriendapi.cpp
@@ -380,17 +380,17 @@ JS_FRIEND_API(bool)
 js::IsFunctionObject(JSObject* obj)
 {
     return obj->is<JSFunction>();
 }
 
 JS_FRIEND_API(JSObject*)
 js::GetGlobalForObjectCrossCompartment(JSObject* obj)
 {
-    return &obj->global();
+    return &obj->deprecatedGlobal();
 }
 
 JS_FRIEND_API(JSObject*)
 js::GetPrototypeNoProxy(JSObject* obj)
 {
     MOZ_ASSERT(!obj->is<js::ProxyObject>());
     return obj->staticPrototype();
 }
@@ -528,21 +528,19 @@ js::GetObjectProto(JSContext* cx, JS::Ha
 JS_FRIEND_API(JSObject*)
 js::GetStaticPrototype(JSObject* obj)
 {
     MOZ_ASSERT(obj->hasStaticPrototype());
     return obj->staticPrototype();
 }
 
 JS_FRIEND_API(bool)
-js::GetOriginalEval(JSContext* cx, HandleObject scope, MutableHandleObject eval)
+js::GetRealmOriginalEval(JSContext* cx, MutableHandleObject eval)
 {
-    assertSameCompartment(cx, scope);
-    Rooted<GlobalObject*> global(cx, &scope->global());
-    return GlobalObject::getOrCreateEval(cx, global, eval);
+    return GlobalObject::getOrCreateEval(cx, cx->global(), eval);
 }
 
 JS_FRIEND_API(void)
 js::SetReservedSlotWithBarrier(JSObject* obj, size_t slot, const js::Value& value)
 {
     if (IsProxy(obj))
         obj->as<ProxyObject>().setReservedSlot(slot, value);
     else
@@ -1500,17 +1498,17 @@ js::SetWindowProxy(JSContext* cx, Handle
     MOZ_ASSERT(IsWindowProxy(windowProxy));
     global->as<GlobalObject>().setWindowProxy(windowProxy);
 }
 
 JS_FRIEND_API(JSObject*)
 js::ToWindowIfWindowProxy(JSObject* obj)
 {
     if (IsWindowProxy(obj))
-        return &obj->global();
+        return &obj->nonCCWGlobal();
     return obj;
 }
 
 JS_FRIEND_API(JSObject*)
 js::detail::ToWindowProxyIfWindowSlow(JSObject* obj)
 {
     if (JSObject* windowProxy = obj->as<GlobalObject>().maybeWindowProxy())
         return windowProxy;
--- a/js/src/jsfriendapi.h
+++ b/js/src/jsfriendapi.h
@@ -670,17 +670,17 @@ InheritanceProtoKeyForStandardClass(JSPr
     // Otherwise, we inherit [Object].
     return JSProto_Object;
 }
 
 JS_FRIEND_API(bool)
 IsFunctionObject(JSObject* obj);
 
 JS_FRIEND_API(bool)
-IsCrossCompartmentWrapper(JSObject* obj);
+IsCrossCompartmentWrapper(const JSObject* obj);
 
 static MOZ_ALWAYS_INLINE JS::Compartment*
 GetObjectCompartment(JSObject* obj)
 {
     JS::Realm* realm = reinterpret_cast<shadow::Object*>(obj)->group->realm;
     return JS::GetCompartmentForRealm(realm);
 }
 
@@ -738,18 +738,17 @@ FunctionHasNativeReserved(JSObject* fun)
 
 JS_FRIEND_API(bool)
 GetObjectProto(JSContext* cx, JS::HandleObject obj, JS::MutableHandleObject proto);
 
 extern JS_FRIEND_API(JSObject*)
 GetStaticPrototype(JSObject* obj);
 
 JS_FRIEND_API(bool)
-GetOriginalEval(JSContext* cx, JS::HandleObject scope,
-                JS::MutableHandleObject eval);
+GetRealmOriginalEval(JSContext* cx, JS::MutableHandleObject eval);
 
 inline void*
 GetObjectPrivate(JSObject* obj)
 {
     MOZ_ASSERT(GetObjectClass(obj)->flags & JSCLASS_HAS_PRIVATE);
     const shadow::Object* nobj = reinterpret_cast<const shadow::Object*>(obj);
     void** addr = reinterpret_cast<void**>(&nobj->fixedSlots()[nobj->numFixedSlots()]);
     return *addr;
--- a/js/src/proxy/CrossCompartmentWrapper.cpp
+++ b/js/src/proxy/CrossCompartmentWrapper.cpp
@@ -487,17 +487,17 @@ CrossCompartmentWrapper::boxedValue_unbo
            NOTHING,
            Wrapper::boxedValue_unbox(cx, wrapper, vp),
            cx->compartment()->wrap(cx, vp));
 }
 
 const CrossCompartmentWrapper CrossCompartmentWrapper::singleton(0u);
 
 bool
-js::IsCrossCompartmentWrapper(JSObject* obj)
+js::IsCrossCompartmentWrapper(const JSObject* obj)
 {
     return IsWrapper(obj) &&
            !!(Wrapper::wrapperHandler(obj)->flags() & Wrapper::CROSS_COMPARTMENT);
 }
 
 static void
 NukeRemovedCrossCompartmentWrapper(JSContext* cx, JSObject* wrapper)
 {
--- a/js/src/proxy/Wrapper.cpp
+++ b/js/src/proxy/Wrapper.cpp
@@ -325,17 +325,17 @@ Wrapper::New(JSContext* cx, JSObject* ob
 JSObject*
 Wrapper::Renew(JSObject* existing, JSObject* obj, const Wrapper* handler)
 {
     existing->as<ProxyObject>().renew(handler, ObjectValue(*obj));
     return existing;
 }
 
 const Wrapper*
-Wrapper::wrapperHandler(JSObject* wrapper)
+Wrapper::wrapperHandler(const JSObject* wrapper)
 {
     MOZ_ASSERT(wrapper->is<WrapperObject>());
     return static_cast<const Wrapper*>(wrapper->as<ProxyObject>().handler());
 }
 
 JSObject*
 Wrapper::wrappedObject(JSObject* wrapper)
 {
--- a/js/src/vm/Compartment.cpp
+++ b/js/src/vm/Compartment.cpp
@@ -193,25 +193,25 @@ Compartment::wrap(JSContext* cx, Mutable
     bi.set(copy);
     return true;
 }
 #endif
 
 bool
 Compartment::getNonWrapperObjectForCurrentCompartment(JSContext* cx, MutableHandleObject obj)
 {
-    // Ensure that we have entered a compartment.
+    // Ensure that we have entered a realm.
     MOZ_ASSERT(cx->global());
 
     // If we have a cross-compartment wrapper, make sure that the cx isn't
-    // associated with the self-hosting global. We don't want to create
+    // associated with the self-hosting zone. We don't want to create
     // wrappers for objects in other runtimes, which may be the case for the
-    // self-hosting global.
-    MOZ_ASSERT(!cx->runtime()->isSelfHostingGlobal(cx->global()));
-    MOZ_ASSERT(!cx->runtime()->isSelfHostingGlobal(&obj->global()));
+    // self-hosting zone.
+    MOZ_ASSERT(!cx->runtime()->isSelfHostingZone(cx->zone()));
+    MOZ_ASSERT(!cx->runtime()->isSelfHostingZone(obj->zone()));
 
     // The object is already in the right compartment. Normally same-
     // compartment returns the object itself, however, windows are always
     // wrapped by a proxy, so we have to check for that case here manually.
     if (obj->compartment() == this) {
         obj.set(ToWindowProxyIfWindow(obj));
         return true;
     }
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -3946,18 +3946,18 @@ Debugger::construct(JSContext* cx, unsig
             return false;
 
         debugger = dbg.release();
         obj->setPrivate(debugger); // owns the released pointer
     }
 
     /* Add the initial debuggees, if any. */
     for (unsigned i = 0; i < args.length(); i++) {
-        Rooted<GlobalObject*>
-            debuggee(cx, &args[i].toObject().as<ProxyObject>().private_().toObject().global());
+        JSObject& wrappedObj = args[i].toObject().as<ProxyObject>().private_().toObject();
+        Rooted<GlobalObject*> debuggee(cx, &wrappedObj.deprecatedGlobal());
         if (!debugger->addDebuggeeGlobal(cx, debuggee))
             return false;
     }
 
     args.rval().setObject(*obj);
     return true;
 }
 
@@ -9955,17 +9955,17 @@ DebuggerObject::getClassName(JSContext* 
 
 /* static */ bool
 DebuggerObject::getGlobal(JSContext* cx, HandleDebuggerObject object,
                           MutableHandleDebuggerObject result)
 {
     RootedObject referent(cx, object->referent());
     Debugger* dbg = object->owner();
 
-    RootedObject global(cx, &referent->global());
+    RootedObject global(cx, &referent->deprecatedGlobal());
     return dbg->wrapDebuggeeObject(cx, global, result);
 }
 
 JSAtom*
 DebuggerObject::name(JSContext* cx) const
 {
     MOZ_ASSERT(isFunction());
 
@@ -10816,17 +10816,17 @@ DebuggerEnvironment_checkThis(JSContext*
     }
 
     /*
      * Forbid access to Debugger.Environment objects that are not debuggee
      * environments.
      */
     if (requireDebuggee) {
         Rooted<Env*> env(cx, static_cast<Env*>(nthisobj->getPrivate()));
-        if (!Debugger::fromChildJSObject(nthisobj)->observesGlobal(&env->global())) {
+        if (!Debugger::fromChildJSObject(nthisobj)->observesGlobal(&env->nonCCWGlobal())) {
             JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_DEBUG_NOT_DEBUGGEE,
                                       "Debugger.Environment", "environment");
             return nullptr;
         }
     }
 
     return nthisobj;
 }
@@ -11166,17 +11166,17 @@ DebuggerEnvironment::getCallee(JSContext
 }
 
 bool
 DebuggerEnvironment::isDebuggee() const
 {
     MOZ_ASSERT(referent());
     MOZ_ASSERT(!referent()->is<EnvironmentObject>());
 
-    return owner()->observesGlobal(&referent()->global());
+    return owner()->observesGlobal(&referent()->nonCCWGlobal());
 }
 
 bool
 DebuggerEnvironment::isOptimized() const
 {
     return referent()->is<DebugEnvironmentProxy>() &&
            referent()->as<DebugEnvironmentProxy>().isOptimizedOut();
 }
--- a/js/src/vm/EnvironmentObject-inl.h
+++ b/js/src/vm/EnvironmentObject-inl.h
@@ -73,12 +73,12 @@ JSObject::enclosingEnvironment() const
 
     if (is<js::DebugEnvironmentProxy>())
         return &as<js::DebugEnvironmentProxy>().enclosingEnvironment();
 
     if (is<js::GlobalObject>())
         return nullptr;
 
     MOZ_ASSERT_IF(is<JSFunction>(), as<JSFunction>().isInterpreted());
-    return &global();
+    return &nonCCWGlobal();
 }
 
 #endif /* vm_EnvironmentObject_inl_h */
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -228,17 +228,17 @@ GetNameOperation(JSContext* cx, Interpre
      * used for GNAME opcodes where the bytecode emitter has determined a
      * name access must be on the global. It also insulates us from bugs
      * in the emitter: type inference will assume that GNAME opcodes are
      * accessing the global object, and the inferred behavior should match
      * the actual behavior even if the id could be found on the env chain
      * before the global object.
      */
     if (IsGlobalOp(JSOp(*pc)) && !fp->script()->hasNonSyntacticScope())
-        envChain = &envChain->global().lexicalEnvironment();
+        envChain = &cx->global()->lexicalEnvironment();
 
     /* Kludge to allow (typeof foo == "undefined") tests. */
     JSOp op2 = JSOp(pc[JSOP_GETNAME_LENGTH]);
     if (op2 == JSOP_TYPEOF)
         return GetEnvironmentName<GetNameMode::TypeOf>(cx, envChain, name, vp);
     return GetEnvironmentName<GetNameMode::Normal>(cx, envChain, name, vp);
 }
 
@@ -3024,17 +3024,17 @@ END_CASE(JSOP_SETELEM_SUPER)
 
 CASE(JSOP_EVAL)
 CASE(JSOP_STRICTEVAL)
 {
     static_assert(JSOP_EVAL_LENGTH == JSOP_STRICTEVAL_LENGTH,
                   "eval and stricteval must be the same size");
 
     CallArgs args = CallArgsFromSp(GET_ARGC(REGS.pc), REGS.sp);
-    if (REGS.fp()->environmentChain()->global().valueIsEval(args.calleev())) {
+    if (cx->global()->valueIsEval(args.calleev())) {
         if (!DirectEval(cx, args.get(0), args.rval()))
             goto error;
     } else {
         if (!CallFromStack(cx, args))
             goto error;
     }
 
     REGS.sp = args.spAfterCall();
--- a/js/src/vm/JSFunction.cpp
+++ b/js/src/vm/JSFunction.cpp
@@ -1745,17 +1745,17 @@ const JSFunctionSpec js::function_method
 // ES2018 draft rev 2aea8f3e617b49df06414eb062ab44fad87661d3
 // 19.2.1.1.1 CreateDynamicFunction( constructor, newTarget, kind, args )
 static bool
 CreateDynamicFunction(JSContext* cx, const CallArgs& args, GeneratorKind generatorKind,
                       FunctionAsyncKind asyncKind)
 {
     // Steps 1-5.
     // Block this call if security callbacks forbid it.
-    Rooted<GlobalObject*> global(cx, &args.callee().global());
+    Handle<GlobalObject*> global = cx->global();
     if (!GlobalObject::isRuntimeCodeGenEnabled(cx, global)) {
         JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_CSP_BLOCKED_FUNCTION);
         return false;
     }
 
     bool isGenerator = generatorKind == GeneratorKind::Generator;
     bool isAsync = asyncKind == FunctionAsyncKind::AsyncFunction;
 
--- a/js/src/vm/JSObject-inl.h
+++ b/js/src/vm/JSObject-inl.h
@@ -386,18 +386,26 @@ SetNewObjectMetadata(JSContext* cx, T* o
     }
 
     return obj;
 }
 
 } // namespace js
 
 inline js::GlobalObject&
-JSObject::global() const
+JSObject::deprecatedGlobal() const
 {
+    return *realm()->unsafeUnbarrieredMaybeGlobal();
+}
+
+inline js::GlobalObject&
+JSObject::nonCCWGlobal() const
+{
+    MOZ_ASSERT(!js::IsCrossCompartmentWrapper(this));
+
     /*
      * The global is read-barriered so that it is kept live by access through
      * the Realm. When accessed through a JSObject, however, the global will be
      * already kept live by the black JSObject's group pointer, so does not
      * need to be read-barriered.
      */
     return *realm()->unsafeUnbarrieredMaybeGlobal();
 }
--- a/js/src/vm/JSObject.cpp
+++ b/js/src/vm/JSObject.cpp
@@ -2194,17 +2194,17 @@ js::GetObjectFromIncumbentGlobal(JSConte
         return false;
 
     return true;
 }
 
 static bool
 IsStandardPrototype(JSObject* obj, JSProtoKey key)
 {
-    Value v = obj->global().getPrototype(key);
+    Value v = obj->nonCCWGlobal().getPrototype(key);
     return v.isObject() && obj == &v.toObject();
 }
 
 JSProtoKey
 JS::IdentifyStandardInstance(JSObject* obj)
 {
     // Note: The prototype shares its JSClass with instances.
     MOZ_ASSERT(!obj->is<CrossCompartmentWrapperObject>());
@@ -2236,17 +2236,17 @@ JS::IdentifyStandardConstructor(JSObject
 {
     // Note that NATIVE_CTOR does not imply that we are a standard constructor,
     // but the converse is true (at least until we start having self-hosted
     // constructors for standard classes). This lets us avoid a costly loop for
     // many functions (which, depending on the call site, may be the common case).
     if (!obj->is<JSFunction>() || !(obj->as<JSFunction>().flags() & JSFunction::NATIVE_CTOR))
         return JSProto_Null;
 
-    GlobalObject& global = obj->global();
+    GlobalObject& global = obj->as<JSFunction>().global();
     for (size_t k = 0; k < JSProto_LIMIT; ++k) {
         JSProtoKey key = static_cast<JSProtoKey>(k);
         if (global.getConstructor(key) == ObjectValue(*obj))
             return key;
     }
 
     return JSProto_Null;
 }
@@ -3554,19 +3554,24 @@ JSObject::uninlinedNonProxyIsExtensible(
 {
     return nonProxyIsExtensible();
 }
 
 void
 JSObject::dump(js::GenericPrinter& out) const
 {
     const JSObject* obj = this;
-    JSObject* globalObj = &global();
     out.printf("object %p\n", obj);
-    out.printf("  global %p [%s]\n", globalObj, globalObj->getClass()->name);
+
+    if (IsCrossCompartmentWrapper(this)) {
+        out.printf("  compartment %p\n", compartment());
+    } else {
+        JSObject* globalObj = &nonCCWGlobal();
+        out.printf("  global %p [%s]\n", globalObj, globalObj->getClass()->name);
+    }
 
     const Class* clasp = obj->getClass();
     out.printf("  class %p %s\n", clasp, clasp->name);
 
     if (obj->hasLazyGroup()) {
         out.put("  lazy group\n");
     } else {
         const ObjectGroup* group = obj->group();
--- a/js/src/vm/JSObject.h
+++ b/js/src/vm/JSObject.h
@@ -424,17 +424,22 @@ class JSObject : public js::gc::Cell
     /*
      * Get the enclosing environment of an object. When called on a
      * non-EnvironmentObject, this will just be the global (the name
      * "enclosing environment" still applies in this situation because
      * non-EnvironmentObjects can be on the environment chain).
      */
     inline JSObject* enclosingEnvironment() const;
 
-    inline js::GlobalObject& global() const;
+    // Deprecated: call nonCCWGlobal or NativeObject::global() instead!
+    inline js::GlobalObject& deprecatedGlobal() const;
+
+    // Cross-compartment wrappers are not associated with a single realm/global,
+    // so this method asserts the object is not a CCW.
+    inline js::GlobalObject& nonCCWGlobal() const;
 
     // In some rare cases the global object's compartment's global may not be
     // the same global object. For this reason, we need to take extra care when
     // tracing.
     //
     // These cases are:
     //  1) The off-thread parsing task uses a dummy global since it cannot
     //     share with the actual global being used concurrently on the active
--- a/js/src/vm/NativeObject-inl.h
+++ b/js/src/vm/NativeObject-inl.h
@@ -664,16 +664,22 @@ NativeObject::allocKindForTenure() const
     using namespace js::gc;
     AllocKind kind = GetGCObjectFixedSlotsKind(numFixedSlots());
     MOZ_ASSERT(!IsBackgroundFinalized(kind));
     if (!CanBeFinalizedInBackground(kind, getClass()))
         return kind;
     return GetBackgroundAllocKind(kind);
 }
 
+inline js::GlobalObject&
+NativeObject::global() const
+{
+    return nonCCWGlobal();
+}
+
 inline js::gc::AllocKind
 PlainObject::allocKindForTenure() const
 {
     using namespace js::gc;
     AllocKind kind = GetGCObjectFixedSlotsKind(numFixedSlots());
     MOZ_ASSERT(!IsBackgroundFinalized(kind));
     MOZ_ASSERT(CanBeFinalizedInBackground(kind, getClass()));
     return GetBackgroundAllocKind(kind);
--- a/js/src/vm/NativeObject.h
+++ b/js/src/vm/NativeObject.h
@@ -1467,16 +1467,20 @@ class NativeObject : public ShapedObject
 
     /* Return the allocKind we would use if we were to tenure this object. */
     inline js::gc::AllocKind allocKindForTenure() const;
 
     void updateShapeAfterMovingGC();
     void sweepDictionaryListPointer();
     void updateDictionaryListPointerAfterMinorGC(NativeObject* old);
 
+    // Native objects are never wrappers, so a native object always has a realm
+    // and global.
+    inline js::GlobalObject& global() const;
+
     /* JIT Accessors */
     static size_t offsetOfElements() { return offsetof(NativeObject, elements_); }
     static size_t offsetOfFixedElements() {
         return sizeof(NativeObject) + sizeof(ObjectElements);
     }
 
     static size_t getFixedSlotOffset(size_t slot) {
         return sizeof(NativeObject) + slot * sizeof(Value);
--- a/js/src/vm/Shape.cpp
+++ b/js/src/vm/Shape.cpp
@@ -2016,17 +2016,17 @@ Shape::dumpSubtree(int level, js::Generi
             }
         }
     }
 }
 
 #endif
 
 static bool
-IsOriginalProto(GlobalObject* global, JSProtoKey key, JSObject& proto)
+IsOriginalProto(GlobalObject* global, JSProtoKey key, NativeObject& proto)
 {
     if (global->getPrototype(key) != ObjectValue(proto))
         return false;
 
     if (key == JSProto_Object) {
         MOZ_ASSERT(proto.staticPrototypeIsImmutable(),
                    "proto should be Object.prototype, whose prototype is "
                    "immutable");
@@ -2046,19 +2046,19 @@ IsOriginalProto(GlobalObject* global, JS
     MOZ_ASSERT(protoProto->staticPrototype() == nullptr,
                "Object.prototype must have null prototype");
     return true;
 }
 
 static JSProtoKey
 GetInitialShapeProtoKey(TaggedProto proto, JSContext* cx)
 {
-    if (proto.isObject() && proto.toObject()->hasStaticPrototype()) {
+    if (proto.isObject() && proto.toObject()->isNative()) {
         GlobalObject* global = cx->global();
-        JSObject& obj = *proto.toObject();
+        NativeObject& obj = proto.toObject()->as<NativeObject>();
         MOZ_ASSERT(global == &obj.global());
 
         if (IsOriginalProto(global, JSProto_Object, obj))
             return JSProto_Object;
         if (IsOriginalProto(global, JSProto_Function, obj))
             return JSProto_Function;
         if (IsOriginalProto(global, JSProto_Array, obj))
             return JSProto_Array;
--- a/js/src/vm/Stack-inl.h
+++ b/js/src/vm/Stack-inl.h
@@ -19,29 +19,30 @@
 #include "vm/GeneratorObject.h"
 #include "vm/JSContext.h"
 #include "vm/JSScript.h"
 #include "wasm/WasmInstance.h"
 
 #include "jit/BaselineFrame-inl.h"
 #include "vm/JSObject-inl.h"
 #include "vm/JSScript-inl.h"
+#include "vm/NativeObject-inl.h"
 
 namespace js {
 
 inline HandleObject
 InterpreterFrame::environmentChain() const
 {
     return HandleObject::fromMarkedLocation(&envChain_);
 }
 
 inline GlobalObject&
 InterpreterFrame::global() const
 {
-    return environmentChain()->global();
+    return script()->global();
 }
 
 inline JSObject&
 InterpreterFrame::varObj() const
 {
     JSObject* obj = environmentChain();
     while (!obj->isQualifiedVarObj())
         obj = obj->enclosingEnvironment();
--- a/js/src/wasm/WasmTypes.cpp
+++ b/js/src/wasm/WasmTypes.cpp
@@ -19,16 +19,17 @@
 #include "wasm/WasmTypes.h"
 
 #include "vm/ArrayBufferObject.h"
 #include "wasm/WasmBaselineCompile.h"
 #include "wasm/WasmInstance.h"
 #include "wasm/WasmSerialize.h"
 
 #include "vm/JSObject-inl.h"
+#include "vm/NativeObject-inl.h"
 
 using namespace js;
 using namespace js::jit;
 using namespace js::wasm;
 
 using mozilla::IsPowerOfTwo;
 using mozilla::MakeEnumeratedRange;
 
--- a/js/xpconnect/wrappers/XrayWrapper.cpp
+++ b/js/xpconnect/wrappers/XrayWrapper.cpp
@@ -1433,17 +1433,17 @@ XrayTraits::resolveOwnProperty(JSContext
             RootedObject constructor(cx);
             if (!JS_GetClassObject(cx, key, &constructor))
                 return false;
             MOZ_ASSERT(constructor);
             desc.value().set(ObjectValue(*constructor));
             found = true;
         } else if (id == GetJSIDByIndex(cx, XPCJSContext::IDX_EVAL)) {
             RootedObject eval(cx);
-            if (!js::GetOriginalEval(cx, target, &eval))
+            if (!js::GetRealmOriginalEval(cx, &eval))
                 return false;
             desc.value().set(ObjectValue(*eval));
             found = true;
         }
     }
 
     if (found) {
         if (!JS_WrapPropertyDescriptor(cx, desc))
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -973,19 +973,22 @@ Loader::CreateSheet(nsIURI* aURI,
       // This sheet came from the XUL cache or our per-document hashtable; it
       // better be a complete sheet.
       NS_ASSERTION(sheet->IsComplete(),
                    "Sheet thinks it's not complete while we think it is");
 
       // Make sure it hasn't been forced to have a unique inner;
       // that is an indication that its rules have been exposed to
       // CSSOM and so we can't use it.
-      if (sheet->HasForcedUniqueInner()) {
+      //
+      // Similarly, if the sheet doesn't have the right parsing mode just bail.
+      if (sheet->HasForcedUniqueInner() ||
+          sheet->ParsingMode() != aParsingMode) {
         LOG(("  Not cloning completed sheet %p because it has a "
-             "forced unique inner",
+             "forced unique inner or the wrong parsing mode",
              sheet.get()));
         sheet = nullptr;
         fromCompleteSheets = false;
       }
     }
 
     // Then loading sheets
     if (!sheet && !aSyncLoad) {
--- a/layout/style/nsCSSScanner.h
+++ b/layout/style/nsCSSScanner.h
@@ -158,17 +158,26 @@ struct nsCSSToken {
 
   void AppendToString(nsString& aBuffer) const;
 };
 
 // Represents an nsCSSScanner's saved position in the input buffer.
 class nsCSSScannerPosition {
   friend class nsCSSScanner;
 public:
-  nsCSSScannerPosition() : mInitialized(false) { }
+  nsCSSScannerPosition()
+    : mOffset(0)
+    , mLineNumber(0)
+    , mLineOffset(0)
+    , mTokenLineNumber(0)
+    , mTokenLineOffset(0)
+    , mTokenOffset(0)
+    , mInitialized(false)
+  {
+  }
 
   uint32_t LineNumber() {
     MOZ_ASSERT(mInitialized);
     return mLineNumber;
   }
 
   uint32_t LineOffset() {
     MOZ_ASSERT(mInitialized);
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -317,16 +317,19 @@ nsComputedDOMStyle::nsComputedDOMStyle(d
   : mDocumentWeak(nullptr)
   , mOuterFrame(nullptr)
   , mInnerFrame(nullptr)
   , mPresShell(nullptr)
   , mStyleType(aStyleType)
   , mComputedStyleGeneration(0)
   , mExposeVisitedStyle(false)
   , mResolvedComputedStyle(false)
+#ifdef DEBUG
+  , mFlushedPendingReflows(false)
+#endif
 {
   MOZ_ASSERT(aElement && aPresShell);
   MOZ_ASSERT(aPresShell->GetPresContext());
 
   mDocumentWeak = do_GetWeakReference(aPresShell->GetDocument());
   mContent = aElement;
   mPseudo = nsCSSPseudoElements::GetPseudoAtom(aPseudoElt);
 }
--- a/layout/style/nsFontFaceLoader.cpp
+++ b/layout/style/nsFontFaceLoader.cpp
@@ -47,20 +47,21 @@ GetShortFallbackDelay()
 {
   return Preferences::GetInt("gfx.downloadable_fonts.fallback_delay_short", 100);
 }
 
 nsFontFaceLoader::nsFontFaceLoader(gfxUserFontEntry* aUserFontEntry,
                                    nsIURI* aFontURI,
                                    FontFaceSet* aFontFaceSet,
                                    nsIChannel* aChannel)
-  : mUserFontEntry(aUserFontEntry),
-    mFontURI(aFontURI),
-    mFontFaceSet(aFontFaceSet),
-    mChannel(aChannel)
+  : mUserFontEntry(aUserFontEntry)
+  , mFontURI(aFontURI)
+  , mFontFaceSet(aFontFaceSet)
+  , mChannel(aChannel)
+  , mStreamLoader(nullptr)
 {
   MOZ_ASSERT(mFontFaceSet,
              "We should get a valid FontFaceSet from the caller!");
   mStartTime = TimeStamp::Now();
 }
 
 nsFontFaceLoader::~nsFontFaceLoader()
 {
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -2284,16 +2284,17 @@ CachedBorderImageData::GetSubImage(uint8
 }
 
 // --------------------
 // nsStyleImage
 //
 
 nsStyleImage::nsStyleImage()
   : mType(eStyleImageType_Null)
+  , mImage(nullptr)
   , mCropRect(nullptr)
 {
   MOZ_COUNT_CTOR(nsStyleImage);
 }
 
 nsStyleImage::~nsStyleImage()
 {
   MOZ_COUNT_DTOR(nsStyleImage);
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -867,17 +867,25 @@ struct nsCSSShadowItem
   nscoord mYOffset;
   nscoord mRadius;
   nscoord mSpread;
 
   nscolor      mColor;
   bool mHasColor; // Whether mColor should be used
   bool mInset;
 
-  nsCSSShadowItem() : mHasColor(false) {
+  nsCSSShadowItem()
+    : mXOffset(0)
+    , mYOffset(0)
+    , mRadius(0)
+    , mSpread(0)
+    , mColor(NS_RGB(0, 0, 0))
+    , mHasColor(false)
+    , mInset(false)
+  {
     MOZ_COUNT_CTOR(nsCSSShadowItem);
   }
   ~nsCSSShadowItem() {
     MOZ_COUNT_DTOR(nsCSSShadowItem);
   }
 
   bool operator==(const nsCSSShadowItem& aOther) const {
     return (mXOffset == aOther.mXOffset &&
--- a/layout/style/nsStyleTransformMatrix.h
+++ b/layout/style/nsStyleTransformMatrix.h
@@ -69,28 +69,40 @@ namespace nsStyleTransformMatrix {
    * those continuations. (This behavior is not currently in a spec.)
    */
   class MOZ_STACK_CLASS TransformReferenceBox final {
   public:
     typedef nscoord (TransformReferenceBox::*DimensionGetter)();
 
     explicit TransformReferenceBox()
       : mFrame(nullptr)
+      , mX(0)
+      , mY(0)
+      , mWidth(0)
+      , mHeight(0)
       , mIsCached(false)
     {}
 
     explicit TransformReferenceBox(const nsIFrame* aFrame)
       : mFrame(aFrame)
+      , mX(0)
+      , mY(0)
+      , mWidth(0)
+      , mHeight(0)
       , mIsCached(false)
     {
       MOZ_ASSERT(mFrame);
     }
 
     explicit TransformReferenceBox(const nsIFrame* aFrame,
                                    const nsSize& aFallbackDimensions)
+      : mX(0)
+      , mY(0)
+      , mWidth(0)
+      , mHeight(0)
     {
       mFrame = aFrame;
       mIsCached = false;
       if (!mFrame) {
         Init(aFallbackDimensions);
       }
     }
 
--- a/layout/style/nsTimingFunction.h
+++ b/layout/style/nsTimingFunction.h
@@ -27,18 +27,20 @@ struct nsTimingFunction
   // and thus will have mFunc filled in.
   static bool IsSplineType(Type aType)
   {
     return aType != Type::StepStart &&
            aType != Type::StepEnd &&
            aType != Type::Frames;
   }
 
-  explicit nsTimingFunction(int32_t aTimingFunctionType
-                              = NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE)
+  explicit nsTimingFunction(
+    int32_t aTimingFunctionType = NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE)
+    : mType(Type::Ease)
+    , mFunc{}
   {
     AssignFromKeyword(aTimingFunctionType);
   }
 
   nsTimingFunction(float x1, float y1, float x2, float y2)
     : mType(Type::CubicBezier)
   {
     mFunc.mX1 = x1;
--- a/layout/svg/nsSVGImageFrame.h
+++ b/layout/svg/nsSVGImageFrame.h
@@ -21,21 +21,16 @@
 #include "SVGContentUtils.h"
 #include "SVGGeometryFrame.h"
 #include "SVGImageContext.h"
 #include "mozilla/dom/SVGImageElement.h"
 #include "nsContentUtils.h"
 #include "nsIReflowCallback.h"
 #include "mozilla/Unused.h"
 
-using namespace mozilla;
-using namespace mozilla::dom;
-using namespace mozilla::gfx;
-using namespace mozilla::image;
-
 class nsSVGImageFrame;
 
 class nsSVGImageListener final : public imgINotificationObserver
 {
 public:
   explicit nsSVGImageListener(nsSVGImageFrame *aFrame);
 
   NS_DECL_ISUPPORTS
@@ -45,17 +40,17 @@ public:
 
 private:
   ~nsSVGImageListener() {}
 
   nsSVGImageFrame *mFrame;
 };
 
 class nsSVGImageFrame final
-  : public SVGGeometryFrame
+  : public mozilla::SVGGeometryFrame
   , public nsIReflowCallback
 {
   friend nsIFrame*
   NS_NewSVGImageFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle);
 
 protected:
   explicit nsSVGImageFrame(ComputedStyle* aStyle)
     : SVGGeometryFrame(aStyle, kClassID)
@@ -105,19 +100,19 @@ public:
   // nsIReflowCallback
   virtual bool ReflowFinished() override;
   virtual void ReflowCallbackCanceled() override;
 
   /// Always sync decode our image when painting if @aForce is true.
   void SetForceSyncDecoding(bool aForce) { mForceSyncDecoding = aForce; }
 
 private:
-  gfx::Matrix GetRasterImageTransform(int32_t aNativeWidth,
-                                      int32_t aNativeHeight);
-  gfx::Matrix GetVectorImageTransform();
+  mozilla::gfx::Matrix GetRasterImageTransform(int32_t aNativeWidth,
+                                               int32_t aNativeHeight);
+  mozilla::gfx::Matrix GetVectorImageTransform();
   bool TransformContextForPainting(gfxContext* aGfxContext,
                                    const gfxMatrix& aTransform);
 
   nsCOMPtr<imgINotificationObserver> mListener;
 
   nsCOMPtr<imgIContainer> mImageContainer;
 
   bool mReflowCallbackPosted;
--- a/layout/tables/nsTableFrame.h
+++ b/layout/tables/nsTableFrame.h
@@ -29,18 +29,16 @@ namespace mozilla {
 class WritingMode;
 class LogicalMargin;
 struct TableReflowInput;
 namespace layers {
 class StackingContextHelper;
 }
 } // namespace mozilla
 
-using namespace mozilla;
-
 struct BCPropertyData;
 
 static inline bool
 IS_TABLE_CELL(mozilla::LayoutFrameType frameType)
 {
   return frameType == mozilla::LayoutFrameType::TableCell ||
          frameType == mozilla::LayoutFrameType::BCTableCell;
 }
--- a/layout/xul/nsListItemFrame.cpp
+++ b/layout/xul/nsListItemFrame.cpp
@@ -10,16 +10,18 @@
 
 #include "nsCOMPtr.h"
 #include "nsNameSpaceManager.h"
 #include "nsGkAtoms.h"
 #include "nsDisplayList.h"
 #include "nsBoxLayout.h"
 #include "nsIContent.h"
 
+using namespace mozilla;
+
 nsListItemFrame::nsListItemFrame(ComputedStyle* aStyle,
                                  bool aIsRoot,
                                  nsBoxLayout* aLayoutManager)
   : nsGridRowLeafFrame(aStyle, aIsRoot, aLayoutManager, kClassID)
 {
 }
 
 nsListItemFrame::~nsListItemFrame()
--- a/layout/xul/nsListItemFrame.h
+++ b/layout/xul/nsListItemFrame.h
@@ -2,20 +2,18 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/Attributes.h"
 #include "nsGridRowLeafFrame.h"
 
-using namespace mozilla;
-
 nsIFrame* NS_NewListItemFrame(nsIPresShell* aPresShell,
-                              ComputedStyle* aStyle);
+                              mozilla::ComputedStyle* aStyle);
 
 class nsListItemFrame final : public nsGridRowLeafFrame
 {
 public:
   NS_DECL_FRAMEARENA_HELPERS(nsListItemFrame)
 
   friend nsIFrame* NS_NewListItemFrame(nsIPresShell* aPresShell,
                                        ComputedStyle* aStyle);
--- a/netwerk/base/Dashboard.cpp
+++ b/netwerk/base/Dashboard.cpp
@@ -142,17 +142,20 @@ public:
       aName.AssignLiteral("net::ConnectionData");
       return NS_OK;
     }
 
 
     void StartTimer(uint32_t aTimeout);
     void StopTimer();
 
-    explicit ConnectionData(Dashboard *target)
+    explicit ConnectionData(Dashboard* target)
+        : mPort(0)
+        , mProtocol(nullptr)
+        , mTimeout(0)
     {
         mEventTarget = nullptr;
         mDashboard = target;
     }
 
     nsCOMPtr<nsISocketTransport> mSocket;
     nsCOMPtr<nsIInputStream> mStreamIn;
     nsCOMPtr<nsITimer> mTimer;
@@ -282,17 +285,21 @@ class LookupHelper final
             mCancel->Cancel(NS_ERROR_ABORT);
         }
     }
 
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIDNSLISTENER
 
-    LookupHelper() = default;
+    LookupHelper()
+        : mEventTarget{ nullptr }
+        , mStatus{ NS_ERROR_NOT_INITIALIZED }
+    {
+    }
 
     nsresult ConstructAnswer(LookupArgument *aArgument);
 public:
     nsCOMPtr<nsICancelable> mCancel;
     nsMainThreadPtrHandle<NetDashboardCallback> mCallback;
     nsIEventTarget *mEventTarget;
     nsresult mStatus;
 };
--- a/netwerk/base/MemoryDownloader.cpp
+++ b/netwerk/base/MemoryDownloader.cpp
@@ -12,16 +12,17 @@ namespace mozilla {
 namespace net {
 
 NS_IMPL_ISUPPORTS(MemoryDownloader,
 		  nsIStreamListener,
 		  nsIRequestObserver)
 
 MemoryDownloader::MemoryDownloader(IObserver* aObserver)
 : mObserver(aObserver)
+, mStatus(NS_ERROR_NOT_INITIALIZED)
 {
 }
 
 NS_IMETHODIMP
 MemoryDownloader::OnStartRequest(nsIRequest* aRequest, nsISupports* aCtxt)
 {
   MOZ_ASSERT(!mData);
   mData.reset(new FallibleTArray<uint8_t>());
--- a/netwerk/base/Predictor.cpp
+++ b/netwerk/base/Predictor.cpp
@@ -257,16 +257,19 @@ NS_IMPL_ISUPPORTS(Predictor,
                   nsIObserver,
                   nsISpeculativeConnectionOverrider,
                   nsIInterfaceRequestor,
                   nsICacheEntryMetaDataVisitor,
                   nsINetworkPredictorVerifier)
 
 Predictor::Predictor()
   :mInitialized(false)
+  ,mCleanedUp(false)
+  ,mStartupTime(0)
+  ,mLastStartupTime(0)
   ,mStartupCount(1)
 {
   MOZ_ASSERT(!sSelf, "multiple Predictor instances!");
   sSelf = this;
 }
 
 Predictor::~Predictor()
 {
--- a/netwerk/base/RequestContextService.cpp
+++ b/netwerk/base/RequestContextService.cpp
@@ -459,17 +459,18 @@ RequestContext::CancelTailPendingRequest
 }
 
 //nsIRequestContextService
 RequestContextService *RequestContextService::sSelf = nullptr;
 
 NS_IMPL_ISUPPORTS(RequestContextService, nsIRequestContextService, nsIObserver)
 
 RequestContextService::RequestContextService()
-  : mNextRCID(1)
+  : mRCIDNamespace(0)
+  , mNextRCID(1)
 {
   MOZ_ASSERT(!sSelf, "multiple rcs instances!");
   MOZ_ASSERT(NS_IsMainThread());
   sSelf = this;
 
   nsCOMPtr<nsIXULRuntime> runtime = do_GetService("@mozilla.org/xre/runtime;1");
   runtime->GetProcessID(&mRCIDNamespace);
 }
--- a/netwerk/base/TCPFastOpenLayer.cpp
+++ b/netwerk/base/TCPFastOpenLayer.cpp
@@ -53,17 +53,27 @@ static PRIOMethods   *sTCPFastOpenLayerM
 
 class TCPFastOpenSecret
 {
 public:
   TCPFastOpenSecret()
     : mState(WAITING_FOR_CONNECT)
     , mFirstPacketBufLen(0)
     , mCondition(0)
-  {}
+  {
+    this->mAddr.raw.family = 0;
+    this->mAddr.inet.family = 0;
+    this->mAddr.inet.port = 0;
+    this->mAddr.inet.ip = 0;
+    this->mAddr.ipv6.family = 0;
+    this->mAddr.ipv6.port = 0;
+    this->mAddr.ipv6.flowinfo = 0;
+    this->mAddr.ipv6.scope_id = 0;
+    this->mAddr.local.family = 0;
+  }
 
   enum {
     CONNECTED,
     WAITING_FOR_CONNECTCONTINUE,
     COLLECT_DATA_FOR_FIRST_PACKET,
     WAITING_FOR_CONNECT,
     SOCKET_ERROR_STATE
   } mState;
--- a/netwerk/base/nsAsyncStreamCopier.cpp
+++ b/netwerk/base/nsAsyncStreamCopier.cpp
@@ -69,16 +69,18 @@ private:
 //-----------------------------------------------------------------------------
 
 nsAsyncStreamCopier::nsAsyncStreamCopier()
     : mLock("nsAsyncStreamCopier.mLock")
     , mMode(NS_ASYNCCOPY_VIA_READSEGMENTS)
     , mChunkSize(nsIOService::gDefaultSegmentSize)
     , mStatus(NS_OK)
     , mIsPending(false)
+    , mCloseSource{ false }
+    , mCloseSink{ false }
     , mShouldSniffBuffering(false)
 {
     LOG(("Creating nsAsyncStreamCopier @%p\n", this));
 }
 
 nsAsyncStreamCopier::~nsAsyncStreamCopier()
 {
     LOG(("Destroying nsAsyncStreamCopier @%p\n", this));
--- a/netwerk/base/nsBaseChannel.cpp
+++ b/netwerk/base/nsBaseChannel.cpp
@@ -54,16 +54,17 @@ nsBaseChannel::nsBaseChannel()
   : NeckoTargetHolder(nullptr)
   , mPumpingData(false)
   , mLoadFlags(LOAD_NORMAL)
   , mQueriedProgressSink(true)
   , mSynthProgressEvents(false)
   , mAllowThreadRetargeting(true)
   , mWaitingOnAsyncRedirect(false)
   , mOpenRedirectChannel(false)
+  , mRedirectFlags{ 0 }
   , mStatus(NS_OK)
   , mContentDispositionHint(UINT32_MAX)
   , mContentLength(-1)
   , mWasOpened(false)
 {
   mContentType.AssignLiteral(UNKNOWN_CONTENT_TYPE);
 }
 
--- a/netwerk/base/nsBufferedStreams.cpp
+++ b/netwerk/base/nsBufferedStreams.cpp
@@ -41,17 +41,18 @@ using namespace mozilla::ipc;
 using mozilla::Maybe;
 using mozilla::Nothing;
 using mozilla::Some;
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsBufferedStream
 
 nsBufferedStream::nsBufferedStream()
-    : mBuffer(nullptr),
+    : mBufferSize(0),
+      mBuffer(nullptr),
       mBufferStartOffset(0),
       mCursor(0),
       mFillPoint(0),
       mStream(nullptr),
       mBufferDisabled(false),
       mEOF(false),
       mGetBufferCount(0)
 {
--- a/netwerk/base/nsIURIMutatorUtils.cpp
+++ b/netwerk/base/nsIURIMutatorUtils.cpp
@@ -13,12 +13,13 @@ GetURIMutator(nsIURI* aURI, nsIURIMutato
 
 NS_MutateURI::NS_MutateURI(nsIURI* aURI)
 {
   mStatus = GetURIMutator(aURI, getter_AddRefs(mMutator));
   NS_ENSURE_SUCCESS_VOID(mStatus);
 }
 
 NS_MutateURI::NS_MutateURI(const char * aContractID)
+  : mStatus(NS_ERROR_NOT_INITIALIZED)
 {
   mMutator = do_CreateInstance(aContractID, &mStatus);
   MOZ_ASSERT(NS_SUCCEEDED(mStatus), "Called with wrong aContractID");
 }
--- a/netwerk/base/nsInputStreamPump.cpp
+++ b/netwerk/base/nsInputStreamPump.cpp
@@ -33,19 +33,23 @@ static mozilla::LazyLogModule gStreamPum
 
 //-----------------------------------------------------------------------------
 // nsInputStreamPump methods
 //-----------------------------------------------------------------------------
 
 nsInputStreamPump::nsInputStreamPump()
     : mState(STATE_IDLE)
     , mStreamOffset(0)
+    , mStreamLength(0)
+    , mSegSize(0)
+    , mSegCount(0)
     , mStatus(NS_OK)
     , mSuspendCount(0)
     , mLoadFlags(LOAD_NORMAL)
+    , mIsPending(false)
     , mProcessingCallbacks(false)
     , mWaitingForInputStreamReady(false)
     , mCloseWhenDone(false)
     , mRetargeting(false)
     , mAsyncStreamIsBuffered(false)
     , mMutex("nsInputStreamPump")
 {
 }
--- a/netwerk/base/nsPACMan.cpp
+++ b/netwerk/base/nsPACMan.cpp
@@ -272,16 +272,17 @@ private:
 
 //-----------------------------------------------------------------------------
 
 PendingPACQuery::PendingPACQuery(nsPACMan* pacMan,
                                  nsIURI* uri,
                                  nsPACManCallback* callback,
                                  bool mainThreadResponse)
   : Runnable("net::PendingPACQuery")
+  , mPort(0)
   , mPACMan(pacMan)
   , mCallback(callback)
   , mOnMainThreadOnly(mainThreadResponse)
 {
   uri->GetAsciiSpec(mSpec);
   uri->GetAsciiHost(mHost);
   uri->GetScheme(mScheme);
   uri->GetPort(&mPort);
--- a/netwerk/base/nsServerSocket.cpp
+++ b/netwerk/base/nsServerSocket.cpp
@@ -39,16 +39,25 @@ PostEvent(nsServerSocket *s, nsServerSoc
 //-----------------------------------------------------------------------------
 
 nsServerSocket::nsServerSocket()
   : mFD(nullptr)
   , mLock("nsServerSocket.mLock")
   , mAttached(false)
   , mKeepWhenOffline(false)
 {
+  this->mAddr.raw.family = 0;
+  this->mAddr.inet.family = 0;
+  this->mAddr.inet.port = 0;
+  this->mAddr.inet.ip = 0;
+  this->mAddr.ipv6.family = 0;
+  this->mAddr.ipv6.port = 0;
+  this->mAddr.ipv6.flowinfo = 0;
+  this->mAddr.ipv6.scope_id = 0;
+  this->mAddr.local.family = 0;
   // we want to be able to access the STS directly, and it may not have been
   // constructed yet.  the STS constructor sets gSocketTransportService.
   if (!gSocketTransportService)
   {
     // This call can fail if we're offline, for example.
     nsCOMPtr<nsISocketTransportService> sts =
         do_GetService(NS_SOCKETTRANSPORTSERVICE_CONTRACTID);
   }
--- a/netwerk/base/nsSocketTransport2.cpp
+++ b/netwerk/base/nsSocketTransport2.cpp
@@ -789,16 +789,20 @@ nsSocketTransport::nsSocketTransport()
     , mKeepaliveRetryIntervalS(-1)
     , mKeepaliveProbeCount(-1)
     , mFastOpenCallback(nullptr)
     , mFastOpenLayerHasBufferedData(false)
     , mFastOpenStatus(TFO_NOT_SET)
     , mFirstRetryError(NS_OK)
     , mDoNotRetryToConnect(false)
 {
+    this->mNetAddr.raw.family = 0;
+    this->mNetAddr.inet = {};
+    this->mSelfAddr.raw.family = 0;
+    this->mSelfAddr.inet = {};
     SOCKET_LOG(("creating nsSocketTransport @%p\n", this));
 
     mTimeouts[TIMEOUT_CONNECT]    = UINT16_MAX; // no timeout
     mTimeouts[TIMEOUT_READ_WRITE] = UINT16_MAX; // no timeout
 }
 
 nsSocketTransport::~nsSocketTransport()
 {
--- a/netwerk/base/nsStandardURL.h
+++ b/netwerk/base/nsStandardURL.h
@@ -469,17 +469,19 @@ public:
             nsresult rv = uri->SetFile(aFile);
             if (NS_FAILED(rv)) {
                 return rv;
             }
             BaseURIMutator<T>::mURI.swap(uri);
             return NS_OK;
         }
 
-        explicit TemplatedMutator() = default;
+        explicit TemplatedMutator() : mMarkedFileURL(false)
+        {
+        }
     private:
         virtual ~TemplatedMutator() = default;
 
         bool mMarkedFileURL = false;
 
         friend T;
     };
 
--- a/netwerk/base/nsUDPSocket.cpp
+++ b/netwerk/base/nsUDPSocket.cpp
@@ -259,16 +259,17 @@ nsUDPMessage::GetDataAsTArray()
 nsUDPSocket::nsUDPSocket()
   : mLock("nsUDPSocket.mLock")
   , mFD(nullptr)
   , mOriginAttributes()
   , mAttached(false)
   , mByteReadCount(0)
   , mByteWriteCount(0)
 {
+  this->mAddr.inet = {};
   mAddr.raw.family = PR_AF_UNSPEC;
   // we want to be able to access the STS directly, and it may not have been
   // constructed yet.  the STS constructor sets gSocketTransportService.
   if (!gSocketTransportService)
   {
     // This call can fail if we're offline, for example.
     nsCOMPtr<nsISocketTransportService> sts =
         do_GetService(NS_SOCKETTRANSPORTSERVICE_CONTRACTID);
--- a/netwerk/cache/nsCacheEntry.cpp
+++ b/netwerk/cache/nsCacheEntry.cpp
@@ -22,23 +22,26 @@ using namespace mozilla;
 
 nsCacheEntry::nsCacheEntry(const nsACString &   key,
                            bool                 streamBased,
                            nsCacheStoragePolicy storagePolicy)
     : mKey(key),
       mFetchCount(0),
       mLastFetched(0),
       mLastModified(0),
+      mLastValidated(0),
       mExpirationTime(nsICache::NO_EXPIRATION_TIME),
       mFlags(0),
       mPredictedDataSize(-1),
       mDataSize(0),
       mCacheDevice(nullptr),
       mCustomDevice(nullptr),
-      mData(nullptr)
+      mData(nullptr),
+      mRequestQ{},
+      mDescriptorQ{}
 {
     MOZ_COUNT_CTOR(nsCacheEntry);
     PR_INIT_CLIST(this);
     PR_INIT_CLIST(&mRequestQ);
     PR_INIT_CLIST(&mDescriptorQ);
 
     if (streamBased) MarkStreamBased();
     SetStoragePolicy(storagePolicy);
--- a/netwerk/cache/nsCacheEntryDescriptor.h
+++ b/netwerk/cache/nsCacheEntryDescriptor.h
@@ -118,16 +118,17 @@ private:
      public:
          NS_DECL_ISUPPORTS_INHERITED
 
          nsDecompressInputStreamWrapper(nsCacheEntryDescriptor * desc,
                                       uint32_t off)
           : nsInputStreamWrapper(desc, off)
           , mReadBuffer(nullptr)
           , mReadBufferLen(0)
+          , mZstream{}
           , mStreamInitialized(false)
           , mStreamEnded(false)
          {
          }
          NS_IMETHOD Read(char* buf, uint32_t count, uint32_t * result) override;
          NS_IMETHOD Close() override;
      private:
          virtual ~nsDecompressInputStreamWrapper()
@@ -198,16 +199,17 @@ private:
      public:
          NS_DECL_ISUPPORTS_INHERITED
 
          nsCompressOutputStreamWrapper(nsCacheEntryDescriptor * desc,
                                        uint32_t off)
           : nsOutputStreamWrapper(desc, off)
           , mWriteBuffer(nullptr)
           , mWriteBufferLen(0)
+          , mZstream{}
           , mStreamInitialized(false)
           , mStreamEnded(false)
           , mUncompressedCount(0)
          {
          }
          NS_IMETHOD Write(const char* buf, uint32_t count, uint32_t * result) override;
          NS_IMETHOD Close() override;
      private:
--- a/netwerk/cache/nsCacheService.cpp
+++ b/netwerk/cache/nsCacheService.cpp
@@ -1098,19 +1098,21 @@ nsCacheService::nsCacheService()
       mLock("nsCacheService.mLock"),
       mCondVar(mLock, "nsCacheService.mCondVar"),
       mNotified(false),
       mTimeStampLock("nsCacheService.mTimeStampLock"),
       mInitialized(false),
       mClearingEntries(false),
       mEnableMemoryDevice(true),
       mEnableDiskDevice(true),
+      mEnableOfflineDevice(false),
       mMemoryDevice(nullptr),
       mDiskDevice(nullptr),
       mOfflineDevice(nullptr),
+      mDoomedEntries{},
       mTotalEntries(0),
       mCacheHits(0),
       mCacheMisses(0),
       mMaxKeyLength(0),
       mMaxDataSize(0),
       mMaxMetaSize(0),
       mDeactivateFailures(0),
       mDeactivatedUnboundEntries(0)
--- a/netwerk/cache/nsDiskCacheStreams.h
+++ b/netwerk/cache/nsDiskCacheStreams.h
@@ -38,17 +38,27 @@ public:
                     mInStreamCount--;
                     NS_ASSERTION(mInStreamCount >= 0, "mInStreamCount has gone negative");
                 }
 
     size_t     SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf);
 
     // GCC 2.95.2 requires this to be defined, although we never call it.
     // and OS/2 requires that it not be private
-    nsDiskCacheStreamIO() { NS_NOTREACHED("oops"); }
+    nsDiskCacheStreamIO()
+        : mBinding(nullptr),
+          mDevice(nullptr),
+          mFD(nullptr),
+          mStreamEnd(0),
+          mBufSize(0),
+          mBuffer(nullptr),
+          mOutputStreamIsOpen(false)
+    {
+        NS_NOTREACHED("oops");
+    }
 
 private:
     virtual ~nsDiskCacheStreamIO();
 
     nsresult    OpenCacheFile(int flags, PRFileDesc ** fd);
     nsresult    ReadCacheBlocks(uint32_t bufferSize);
     nsresult    FlushBufferToFile();
     void        UpdateFileSize();
--- a/netwerk/cache2/CacheFileIOManager.cpp
+++ b/netwerk/cache2/CacheFileIOManager.cpp
@@ -1060,16 +1060,21 @@ public:
                         const uint16_t* aOnStopTime)
     : Runnable("net::UpdateIndexEntryEvent")
     , mHandle(aHandle)
     , mHasFrecency(false)
     , mHasExpirationTime(false)
     , mHasHasAltData(false)
     , mHasOnStartTime(false)
     , mHasOnStopTime(false)
+    , mFrecency(0)
+    , mExpirationTime(0)
+    , mHasAltData(false)
+    , mOnStartTime(0)
+    , mOnStopTime(0)
   {
     if (aFrecency) {
       mHasFrecency = true;
       mFrecency = *aFrecency;
     }
     if (aExpirationTime) {
       mHasExpirationTime = true;
       mExpirationTime = *aExpirationTime;
@@ -4274,19 +4279,21 @@ namespace {
 class SizeOfHandlesRunnable : public Runnable
 {
 public:
   SizeOfHandlesRunnable(mozilla::MallocSizeOf mallocSizeOf,
                         CacheFileHandles const& handles,
                         nsTArray<CacheFileHandle*> const& specialHandles)
     : Runnable("net::SizeOfHandlesRunnable")
     , mMonitor("SizeOfHandlesRunnable.mMonitor")
+    , mMonitorNotified(false)
     , mMallocSizeOf(mallocSizeOf)
     , mHandles(handles)
     , mSpecialHandles(specialHandles)
+    , mSize(0)
   {
   }
 
   size_t Get(CacheIOThread* thread)
   {
     nsCOMPtr<nsIEventTarget> target = thread->Target();
     if (!target) {
       NS_ERROR("If we have the I/O thread we also must have the I/O target");
--- a/netwerk/cache2/CacheIndex.h
+++ b/netwerk/cache2/CacheIndex.h
@@ -1204,16 +1204,17 @@ private:
       mSize = aSize;
       NS_DispatchToMainThread(this);
     }
 
   private:
     explicit DiskConsumptionObserver(nsWeakPtr const& aWeakObserver)
       : Runnable("net::CacheIndex::DiskConsumptionObserver")
       , mObserver(aWeakObserver)
+      , mSize(0)
     {
     }
     virtual ~DiskConsumptionObserver() {
       if (mObserver && !NS_IsMainThread()) {
         NS_ReleaseOnMainThreadSystemGroup(
           "DiskConsumptionObserver::mObserver", mObserver.forget());
       }
     }
--- a/netwerk/cache2/CacheStorageService.cpp
+++ b/netwerk/cache2/CacheStorageService.cpp
@@ -363,16 +363,17 @@ class WalkDiskCacheRunnable : public Wal
 {
 public:
   WalkDiskCacheRunnable(nsILoadContextInfo *aLoadInfo,
                         bool aVisitEntries,
                         nsICacheStorageVisitor* aVisitor)
     : WalkCacheRunnable(aVisitor, aVisitEntries)
     , mLoadInfo(aLoadInfo)
     , mPass(COLLECT_STATS)
+    , mCount(0)
   {
   }
 
   nsresult Walk()
   {
     // TODO, bug 998693
     // Initial index build should be forced here so that about:cache soon
     // after startup gives some meaningfull results.
@@ -391,16 +392,21 @@ private:
   // Invokes OnCacheEntryInfo callback for each single found entry.
   // There is one instance of this class per one entry.
   class OnCacheEntryInfoRunnable : public Runnable
   {
   public:
     explicit OnCacheEntryInfoRunnable(WalkDiskCacheRunnable* aWalker)
       : Runnable("net::WalkDiskCacheRunnable::OnCacheEntryInfoRunnable")
       , mWalker(aWalker)
+      , mDataSize(0)
+      , mFetchCount(0)
+      , mLastModifiedTime(0)
+      , mExpirationTime(0)
+      , mPinned(false)
     {
     }
 
     NS_IMETHOD Run() override
     {
       MOZ_ASSERT(NS_IsMainThread());
 
       nsresult rv;
@@ -1628,17 +1634,20 @@ namespace {
 class CacheEntryDoomByKeyCallback : public CacheFileIOListener
                                   , public nsIRunnable
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
 
   explicit CacheEntryDoomByKeyCallback(nsICacheEntryDoomCallback* aCallback)
-    : mCallback(aCallback) { }
+    : mCallback(aCallback)
+    , mResult(NS_ERROR_NOT_INITIALIZED)
+  {
+  }
 
 private:
   virtual ~CacheEntryDoomByKeyCallback();
 
   NS_IMETHOD OnFileOpened(CacheFileHandle *aHandle, nsresult aResult) override { return NS_OK; }
   NS_IMETHOD OnDataWritten(CacheFileHandle *aHandle, const char *aBuf, nsresult aResult) override { return NS_OK; }
   NS_IMETHOD OnDataRead(CacheFileHandle *aHandle, char *aBuf, nsresult aResult) override { return NS_OK; }
   NS_IMETHOD OnFileDoomed(CacheFileHandle *aHandle, nsresult aResult) override;
--- a/netwerk/dns/DNS.cpp
+++ b/netwerk/dns/DNS.cpp
@@ -278,16 +278,18 @@ NetAddr::operator < (const NetAddr& othe
         }
         return this->inet6.flowinfo < other.inet6.flowinfo;
     }
     return false;
 }
 
 NetAddrElement::NetAddrElement(const PRNetAddr *prNetAddr)
 {
+  this->mAddress.raw.family = 0;
+  this->mAddress.inet = {};
   PRNetAddrToNetAddr(prNetAddr, &mAddress);
 }
 
 NetAddrElement::NetAddrElement(const NetAddrElement& netAddr)
 {
   mAddress = netAddr.mAddress;
 }
 
--- a/netwerk/dns/TRR.h
+++ b/netwerk/dns/TRR.h
@@ -103,16 +103,17 @@ public:
   {
 
   }
 
   // used on push
   explicit TRR(AHostResolver *aResolver, bool aPB)
     : mozilla::Runnable("TRR")
     , mHostResolver(aResolver)
+    , mType(TRRTYPE_A)
     , mBodySize(0)
     , mFailed(false)
     , mPB(aPB)
     , mCnameLoop(kCnameChaseMax)
     , mAllowRFC1918(false)
   { }
 
   // to verify a domain
--- a/netwerk/dns/nsDNSService2.cpp
+++ b/netwerk/dns/nsDNSService2.cpp
@@ -488,20 +488,26 @@ private:
 };
 
 //-----------------------------------------------------------------------------
 
 nsDNSService::nsDNSService()
     : mLock("nsDNSServer.mLock")
     , mDisableIPv6(false)
     , mDisablePrefetch(false)
+    , mBlockDotOnion(false)
     , mNotifyResolution(false)
     , mOfflineLocalhost(false)
     , mForceResolveOn(false)
+    , mProxyType(0)
     , mTrrService(nullptr)
+    , mResCacheEntries(0)
+    , mResCacheExpiration(0)
+    , mResCacheGrace(0)
+    , mResolverPrefsUpdated(false)
 {
 }
 
 nsDNSService::~nsDNSService() = default;
 
 NS_IMPL_ISUPPORTS(nsDNSService, nsIDNSService, nsPIDNSService, nsIObserver,
                   nsIMemoryReporter)
 
--- a/netwerk/dns/nsHostResolver.cpp
+++ b/netwerk/dns/nsHostResolver.cpp
@@ -178,16 +178,17 @@ nsHostKey::SizeOfExcludingThis(mozilla::
 
 nsHostRecord::nsHostRecord(const nsHostKey& key)
     : nsHostKey(key)
     , addr_info_lock("nsHostRecord.addr_info_lock")
     , addr_info_gencnt(0)
     , addr_info(nullptr)
     , addr(nullptr)
     , negative(false)
+    , mResolverMode(MODE_NATIVEONLY)
     , mResolving(0)
     , mTRRSuccess(0)
     , mNativeSuccess(0)
     , mNative(false)
     , mTRRUsed(false)
     , mNativeUsed(false)
     , onQueue(false)
     , usingAnyThread(false)
--- a/netwerk/dns/nsIDNService.cpp
+++ b/netwerk/dns/nsIDNService.cpp
@@ -136,16 +136,17 @@ void nsIDNService::prefsChanged(nsIPrefB
       mRestrictionProfile = eASCIIOnlyProfile;
     }
   }
 }
 
 nsIDNService::nsIDNService()
   : mLock("DNService pref value lock")
   , mShowPunycode(false)
+  , mRestrictionProfile(static_cast<restrictionProfile>(0))
   , mIDNUseWhitelist(false)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   uint32_t IDNAOptions = UIDNA_CHECK_BIDI | UIDNA_CHECK_CONTEXTJ;
   if (!kIDNA2008_TransitionalProcessing) {
     IDNAOptions |= UIDNA_NONTRANSITIONAL_TO_UNICODE;
   }
--- a/netwerk/ipc/NeckoMessageUtils.h
+++ b/netwerk/ipc/NeckoMessageUtils.h
@@ -22,17 +22,22 @@ namespace IPC {
 // nsIPermissionManager utilities
 
 struct Permission
 {
   nsCString origin, type;
   uint32_t capability, expireType;
   int64_t expireTime;
 
-  Permission() { }
+  Permission()
+    : capability(0)
+    , expireType(0)
+    , expireTime(0)
+  {}
+  
   Permission(const nsCString& aOrigin,
              const nsCString& aType,
              const uint32_t aCapability,
              const uint32_t aExpireType,
              const int64_t aExpireTime) : origin(aOrigin),
                                           type(aType),
                                           capability(aCapability),
                                           expireType(aExpireType),
--- a/netwerk/protocol/file/nsFileChannel.cpp
+++ b/netwerk/protocol/file/nsFileChannel.cpp
@@ -252,17 +252,18 @@ nsFileUploadContentStream::OnCopyComplet
   nsresult status = mCopyEvent->Status();
 
   CloseWithStatus(NS_FAILED(status) ? status : NS_BASE_STREAM_CLOSED);
 }
 
 //-----------------------------------------------------------------------------
 
 nsFileChannel::nsFileChannel(nsIURI *uri)
-  : mFileURI(uri)
+  : mUploadLength(0)
+  , mFileURI(uri)
 {
 }
 
 nsresult
 nsFileChannel::Init()
 {
   NS_ENSURE_STATE(mLoadInfo);
 
--- a/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
+++ b/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
@@ -70,16 +70,17 @@ NS_IMPL_ISUPPORTS_INHERITED(nsFtpState,
                             nsIRequestObserver,
                             nsIProtocolProxyCallback)
 
 nsFtpState::nsFtpState()
     : nsBaseContentStream(true)
     , mState(FTP_INIT)
     , mNextState(FTP_S_USER)
     , mKeepRunning(true)
+    , mResponseCode(0)
     , mReceivedControlData(false)
     , mTryingCachedControl(false)
     , mRETRFailed(false)
     , mFileSize(kJS_MAX_SAFE_UINTEGER)
     , mServerType(FTP_GENERIC_TYPE)
     , mAction(GET)
     , mAnonymous(true)
     , mRetryPass(false)
@@ -89,16 +90,18 @@ nsFtpState::nsFtpState()
     , mCacheConnection(true)
     , mPort(21)
     , mAddressChecked(false)
     , mServerIsIPv6(false)
     , mUseUTF8(false)
     , mControlStatus(NS_OK)
     , mDeferredCallbackPending(false)
 {
+    this->mServerAddress.raw.family = 0;
+    this->mServerAddress.inet = {};
     LOG_INFO(("FTP:(%p) nsFtpState created", this));
 
     // make sure handler stays around
     NS_ADDREF(gFtpHandler);
 }
 
 nsFtpState::~nsFtpState()
 {
--- a/netwerk/protocol/ftp/nsFtpControlConnection.cpp
+++ b/netwerk/protocol/ftp/nsFtpControlConnection.cpp
@@ -61,18 +61,22 @@ nsFtpControlConnection::OnInputStreamRea
         listener->OnControlDataAvailable(data, avail);
     }
 
     return NS_OK;
 }
 
 nsFtpControlConnection::nsFtpControlConnection(const nsACString& host,
                                                uint32_t port)
-    : mServerType(0), mSessionId(gFtpHandler->GetSessionId())
-    , mUseUTF8(false), mHost(host), mPort(port)
+    : mServerType(0)
+    , mSuspendedWrite(0)
+    , mSessionId(gFtpHandler->GetSessionId())
+    , mUseUTF8(false)
+    , mHost(host)
+    , mPort(port)
 {
     LOG_INFO(("FTP:CC created @%p", this));
 }
 
 nsFtpControlConnection::~nsFtpControlConnection()
 {
     LOG_INFO(("FTP:CC destroyed @%p", this));
 }
--- a/netwerk/protocol/http/Http2Compression.h
+++ b/netwerk/protocol/http/Http2Compression.h
@@ -95,16 +95,21 @@ private:
 };
 
 class Http2Compressor;
 
 class Http2Decompressor final : public Http2BaseCompressor
 {
 public:
   Http2Decompressor()
+    : mOffset(0)
+    , mData(nullptr)
+    , mDataLen(0)
+    , mSeenNonColonHeader(false)
+    , mIsPush(false)
   {
     mPeakSizeID = Telemetry::HPACK_PEAK_SIZE_DECOMPRESSOR;
     mPeakCountID = Telemetry::HPACK_PEAK_COUNT_DECOMPRESSOR;
   };
   virtual ~Http2Decompressor() = default;
 
   // NS_OK: Produces the working set of HTTP/1 formatted headers
   MOZ_MUST_USE nsresult DecodeHeaderBlock(const uint8_t *data,
--- a/netwerk/protocol/http/Http2Session.cpp
+++ b/netwerk/protocol/http/Http2Session.cpp
@@ -109,16 +109,17 @@ Http2Session::Http2Session(nsISocketTran
   , mServerSessionWindow(kDefaultRwin)
   , mInitialRwin(ASpdySession::kInitialRwin)
   , mOutputQueueSize(kDefaultQueueSize)
   , mOutputQueueUsed(0)
   , mOutputQueueSent(0)
   , mLastReadEpoch(PR_IntervalNow())
   , mPingSentEpoch(0)
   , mPreviousUsed(false)
+  , mAggregatedHeaderSize(0)
   , mWaitingForSettingsAck(false)
   , mGoAwayOnPush(false)
   , mUseH2Deps(false)
   , mAttemptingEarlyData(attemptingEarlyData)
   , mOriginFrameActivated(false)
   , mTlsHandshakeFinished(false)
   , mCheckNetworkStallsWithTFO(false)
   , mLastRequestBytesSentTime(0)
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -194,16 +194,17 @@ HttpBaseChannel::HttpBaseChannel()
   , mSuspendCount(0)
   , mInitialRwin(0)
   , mProxyResolveFlags(0)
   , mContentDispositionHint(UINT32_MAX)
   , mHttpHandler(gHttpHandler)
   , mReferrerPolicy(NS_GetDefaultReferrerPolicy())
   , mRedirectCount(0)
   , mInternalRedirectCount(0)
+  , mChannelCreationTime(0)
   , mForcePending(false)
   , mCorsIncludeCredentials(false)
   , mCorsMode(nsIHttpChannelInternal::CORS_MODE_NO_CORS)
   , mRedirectMode(nsIHttpChannelInternal::REDIRECT_MODE_FOLLOW)
   , mOnStartRequestCalled(false)
   , mOnStopRequestCalled(false)
   , mUpgradableToSecure(true)
   , mAfterOnStartRequestBegun(false)
@@ -214,20 +215,23 @@ HttpBaseChannel::HttpBaseChannel()
   , mContentWindowId(0)
   , mTopLevelOuterContentWindowId(0)
   , mRequireCORSPreflight(false)
   , mReportCollector(new ConsoleReportCollector())
   , mAltDataLength(0)
   , mAltDataForChild(false)
   , mForceMainDocumentChannel(false)
   , mIsTrackingResource(false)
+  , mChannelId(0)
   , mLastRedirectFlags(0)
   , mReqContentLength(0U)
   , mPendingInputStreamLengthOperation(false)
 {
+  this->mSelfAddr.inet = {};
+  this->mPeerAddr.inet = {};
   LOG(("Creating HttpBaseChannel @%p\n", this));
 
   // Subfields of unions cannot be targeted in an initializer list.
 #ifdef MOZ_VALGRIND
   // Zero the entire unions so that Valgrind doesn't complain when we send them
   // to another process.
   memset(&mSelfAddr, 0, sizeof(NetAddr));
   memset(&mPeerAddr, 0, sizeof(NetAddr));
--- a/netwerk/protocol/http/NullHttpChannel.cpp
+++ b/netwerk/protocol/http/NullHttpChannel.cpp
@@ -10,23 +10,27 @@
 
 namespace mozilla {
 namespace net {
 
 NS_IMPL_ISUPPORTS(NullHttpChannel, nsINullChannel,
                   nsIHttpChannel, nsITimedChannel)
 
 NullHttpChannel::NullHttpChannel()
+  : mAllRedirectsSameOrigin(false)
+  , mAllRedirectsPassTimingAllowCheck(false)
 {
   mChannelCreationTime = PR_Now();
   mChannelCreationTimestamp = TimeStamp::Now();
   mAsyncOpenTime = TimeStamp::Now();
 }
 
 NullHttpChannel::NullHttpChannel(nsIHttpChannel * chan)
+  : mAllRedirectsSameOrigin(false)
+  , mAllRedirectsPassTimingAllowCheck(false)
 {
   nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager();
   ssm->GetChannelURIPrincipal(chan, getter_AddRefs(mResourcePrincipal));
 
   Unused << chan->GetResponseHeader(NS_LITERAL_CSTRING("Timing-Allow-Origin"),
                                     mTimingAllowOriginHeader);
   chan->GetURI(getter_AddRefs(mURI));
   chan->GetOriginalURI(getter_AddRefs(mOriginalURI));
--- a/netwerk/protocol/http/TunnelUtils.cpp
+++ b/netwerk/protocol/http/TunnelUtils.cpp
@@ -38,17 +38,19 @@ TLSFilterTransaction::TLSFilterTransacti
                                            int32_t aTLSPort,
                                            nsAHttpSegmentReader *aReader,
                                            nsAHttpSegmentWriter *aWriter)
   : mTransaction(aWrapped)
   , mEncryptedTextUsed(0)
   , mEncryptedTextSize(0)
   , mSegmentReader(aReader)
   , mSegmentWriter(aWriter)
+  , mFilterReadCode(NS_ERROR_NOT_INITIALIZED)
   , mForce(false)
+  , mReadSegmentBlocked(false)
   , mNudgeCounter(0)
 {
   MOZ_ASSERT(OnSocketThread(), "not on socket thread");
   LOG(("TLSFilterTransaction ctor %p\n", this));
 
   nsCOMPtr<nsISocketProvider> provider;
   nsCOMPtr<nsISocketProviderService> spserv =
     do_GetService(NS_SOCKETPROVIDERSERVICE_CONTRACTID);
--- a/netwerk/protocol/http/nsCORSListenerProxy.cpp
+++ b/netwerk/protocol/http/nsCORSListenerProxy.cpp
@@ -414,16 +414,19 @@ nsCORSListenerProxy::nsCORSListenerProxy
                                          nsIPrincipal* aRequestingPrincipal,
                                          bool aWithCredentials)
   : mOuterListener(aOuter),
     mRequestingPrincipal(aRequestingPrincipal),
     mOriginHeaderPrincipal(aRequestingPrincipal),
     mWithCredentials(aWithCredentials && !gDisableCORSPrivateData),
     mRequestApproved(false),
     mHasBeenCrossSite(false),
+#ifdef DEBUG
+    mInited(false),
+#endif
     mMutex("nsCORSListenerProxy")
 {
 }
 
 nsresult
 nsCORSListenerProxy::Init(nsIChannel* aChannel, DataURIHandling aAllowDataURI)
 {
   aChannel->GetNotificationCallbacks(getter_AddRefs(mOuterNotificationCallbacks));
--- a/netwerk/protocol/http/nsHttpAuthCache.h
+++ b/netwerk/protocol/http/nsHttpAuthCache.h
@@ -38,16 +38,18 @@ public:
         , mPass(nullptr)
         , mDomain(nullptr)
     {
     }
     nsHttpAuthIdentity(const char16_t *domain,
                        const char16_t *user,
                        const char16_t *password)
         : mUser(nullptr)
+        , mPass{ nullptr }
+        , mDomain{ nullptr }
     {
         DebugOnly<nsresult> rv = Set(domain, user, password);
         MOZ_ASSERT(NS_SUCCEEDED(rv));
     }
    ~nsHttpAuthIdentity()
     {
         Clear();
     }
@@ -101,16 +103,18 @@ private:
                     const char *realm,
                     const char *creds,
                     const char *challenge,
                     const nsHttpAuthIdentity *ident,
                     nsISupports *metadata)
         : mRoot(nullptr)
         , mTail(nullptr)
         , mRealm(nullptr)
+        , mCreds{ nullptr }
+        , mChallenge{ nullptr }
     {
         DebugOnly<nsresult> rv = Set(path, realm, creds, challenge, ident, metadata);
         MOZ_ASSERT(NS_SUCCEEDED(rv));
     }
    ~nsHttpAuthEntry();
 
     MOZ_MUST_USE nsresult Set(const char *path,
                               const char *realm,
--- a/netwerk/protocol/http/nsHttpAuthManager.cpp
+++ b/netwerk/protocol/http/nsHttpAuthManager.cpp
@@ -11,16 +11,22 @@
 #include "nsNetUtil.h"
 #include "nsIPrincipal.h"
 
 namespace mozilla {
 namespace net {
 
 NS_IMPL_ISUPPORTS(nsHttpAuthManager, nsIHttpAuthManager)
 
+nsHttpAuthManager::nsHttpAuthManager()
+  : mAuthCache(nullptr)
+  , mPrivateAuthCache(nullptr)
+{
+}
+
 nsresult nsHttpAuthManager::Init()
 {
   // get reference to the auth cache.  we assume that we will live
   // as long as gHttpHandler.  instantiate it if necessary.
 
   if (!gHttpHandler) {
     nsresult rv;
     nsCOMPtr<nsIIOService> ios = do_GetIOService(&rv);
--- a/netwerk/protocol/http/nsHttpAuthManager.h
+++ b/netwerk/protocol/http/nsHttpAuthManager.h
@@ -14,17 +14,17 @@ namespace net {
 class nsHttpAuthCache;
 
 class nsHttpAuthManager : public nsIHttpAuthManager
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIHTTPAUTHMANAGER
 
-  nsHttpAuthManager() = default;
+  nsHttpAuthManager();
   MOZ_MUST_USE nsresult Init();
 
 protected:
   virtual ~nsHttpAuthManager() = default;
 
   nsHttpAuthCache *mAuthCache;
   nsHttpAuthCache *mPrivateAuthCache;
 };
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -299,16 +299,17 @@ AutoRedirectVetoNotifier::ReportRedirect
 
 nsHttpChannel::nsHttpChannel()
     : HttpAsyncAborter<nsHttpChannel>(this)
     , mLogicalOffset(0)
     , mPostID(0)
     , mRequestTime(0)
     , mOfflineCacheLastModifiedTime(0)
     , mSuspendTotalTime(0)
+    , mRedirectType(0)
     , mCacheOpenWithPriority(false)
     , mCacheQueueSizeWhenOpen(0)
     , mCachedContentIsValid(false)
     , mCachedContentIsPartial(false)
     , mCacheOnlyMetadata(false)
     , mTransactionReplaced(false)
     , mAuthRetryPending(false)
     , mProxyAuthPending(false)
@@ -328,16 +329,17 @@ nsHttpChannel::nsHttpChannel()
     , mIsPartialRequest(0)
     , mHasAutoRedirectVetoNotifier(0)
     , mPinCacheContent(0)
     , mIsCorsPreflightDone(0)
     , mStronglyFramed(false)
     , mUsedNetwork(0)
     , mAuthConnectionRestartable(0)
     , mPushedStream(nullptr)
+    , mLocalBlocklist(false)
     , mOnTailUnblock(nullptr)
     , mWarningReporter(nullptr)
     , mIsReadingFromCache(false)
     , mFirstResponseSource(RESPONSE_PENDING)
     , mRaceCacheWithNetwork(false)
     , mRaceDelay(0)
     , mIgnoreCacheEntry(false)
     , mRCWNLock("nsHttpChannel.mRCWNLock")
--- a/netwerk/protocol/http/nsHttpConnection.cpp
+++ b/netwerk/protocol/http/nsHttpConnection.cpp
@@ -41,40 +41,47 @@
 namespace mozilla {
 namespace net {
 
 //-----------------------------------------------------------------------------
 // nsHttpConnection <public>
 //-----------------------------------------------------------------------------
 
 nsHttpConnection::nsHttpConnection()
-    : mTransaction(nullptr)
+    : mSocketInCondition(NS_ERROR_NOT_INITIALIZED)
+    , mSocketOutCondition(NS_ERROR_NOT_INITIALIZED)
+    , mTransaction(nullptr)
     , mHttpHandler(gHttpHandler)
     , mCallbacksLock("nsHttpConnection::mCallbacksLock")
+    , mLastReadTime(0)
+    , mLastWriteTime(0)
+    , mMaxHangTime(0)
     , mConsiderReusedAfterInterval(0)
     , mConsiderReusedAfterEpoch(0)
     , mCurrentBytesRead(0)
     , mMaxBytesRead(0)
     , mTotalBytesRead(0)
     , mTotalBytesWritten(0)
     , mContentBytesWritten(0)
+    , mRtt(0)
     , mUrgentStartPreferred(false)
     , mUrgentStartPreferredKnown(false)
     , mConnectedTransport(false)
     , mKeepAlive(true) // assume to keep-alive by default
     , mKeepAliveMask(true)
     , mDontReuse(false)
     , mIsReused(false)
     , mCompletedProxyConnect(false)
     , mLastTransactionExpectedNoContent(false)
     , mIdleMonitoring(false)
     , mProxyConnectInProgress(false)
     , mExperienced(false)
     , mInSpdyTunnel(false)
     , mForcePlainText(false)
+    , mTrafficCount(0)
     , mTrafficStamp(false)
     , mHttp1xTransactionCount(0)
     , mRemainingConnectionUses(0xffffffff)
     , mNPNComplete(false)
     , mSetupSSLCalled(false)
     , mUsingSpdyVersion(SpdyVersion::NONE)
     , mPriority(nsISupportsPriority::PRIORITY_NORMAL)
     , mReportedSpdy(false)
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -459,17 +459,24 @@ nsHttpConnectionMgr::DoShiftReloadConnec
 {
     return PostEvent(&nsHttpConnectionMgr::OnMsgDoShiftReloadConnectionCleanup,
                      0, aCI);
 }
 
 class SpeculativeConnectArgs : public ARefBase
 {
 public:
-    SpeculativeConnectArgs() { mOverridesOK = false; }
+    SpeculativeConnectArgs()
+        : mParallelSpeculativeConnectLimit(0)
+        , mIgnoreIdle(false)
+        , mIsFromPredictor(false)
+        , mAllow1918(false)
+    {
+        mOverridesOK = false;
+    }
     NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SpeculativeConnectArgs, override)
 
 public: // intentional!
     RefPtr<NullHttpTransaction> mTrans;
 
     bool mOverridesOK;
     uint32_t mParallelSpeculativeConnectLimit;
     bool mIgnoreIdle;
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -221,16 +221,17 @@ nsHttpHandler::nsHttpHandler()
     , mThrottleReadInterval(500)
     , mThrottleHoldTime(600)
     , mThrottleMaxTime(3000)
     , mUrgentStartEnabled(true)
     , mTailBlockingEnabled(true)
     , mTailDelayQuantum(600)
     , mTailDelayQuantumAfterDCL(100)
     , mTailDelayMax(6000)
+    , mTailTotalMax(0)
     , mRedirectionLimit(10)
     , mPhishyUserPassLength(1)
     , mQoSBits(0x00)
     , mEnforceAssocReq(false)
     , mLastUniqueID(NowInSeconds())
     , mSessionStartTime(0)
     , mLegacyAppName("Mozilla")
     , mLegacyAppVersion("5.0")
--- a/netwerk/protocol/http/nsHttpNTLMAuth.h
+++ b/netwerk/protocol/http/nsHttpNTLMAuth.h
@@ -10,17 +10,17 @@
 namespace mozilla { namespace net {
 
 class nsHttpNTLMAuth : public nsIHttpAuthenticator
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIHTTPAUTHENTICATOR
 
-    nsHttpNTLMAuth() = default;
+    nsHttpNTLMAuth() : mUseNative(false) {}
 
 private:
     virtual ~nsHttpNTLMAuth() = default;
 
     // This flag indicates whether we are using the native NTLM implementation
     // or the internal one.
     bool  mUseNative;
 };
--- a/netwerk/protocol/http/nsHttpTransaction.cpp
+++ b/netwerk/protocol/http/nsHttpTransaction.cpp
@@ -141,16 +141,18 @@ nsHttpTransaction::nsHttpTransaction()
     , mPassedRatePacing(false)
     , mSynchronousRatePaceRequest(false)
     , mClassOfService(0)
     , m0RTTInProgress(false)
     , mDoNotTryEarlyData(false)
     , mEarlyDataDisposition(EARLY_NONE)
     , mFastOpenStatus(TFO_NOT_TRIED)
 {
+    this->mSelfAddr.inet = {};
+    this->mPeerAddr.inet = {};
     LOG(("Creating nsHttpTransaction @%p\n", this));
 
 #ifdef MOZ_VALGRIND
     memset(&mSelfAddr, 0, sizeof(NetAddr));
     memset(&mPeerAddr, 0, sizeof(NetAddr));
 #endif
     mSelfAddr.raw.family = PR_AF_UNSPEC;
     mPeerAddr.raw.family = PR_AF_UNSPEC;
--- a/netwerk/protocol/viewsource/nsViewSourceChannel.h
+++ b/netwerk/protocol/viewsource/nsViewSourceChannel.h
@@ -41,17 +41,18 @@ public:
     NS_FORWARD_SAFE_NSIAPPLICATIONCACHECONTAINER(mApplicationCacheChannel)
     NS_FORWARD_SAFE_NSIUPLOADCHANNEL(mUploadChannel)
     NS_FORWARD_SAFE_NSIFORMPOSTACTIONCHANNEL(mPostChannel)
     NS_FORWARD_SAFE_NSIHTTPCHANNELINTERNAL(mHttpChannelInternal)
 
     // nsViewSourceChannel methods:
     nsViewSourceChannel()
         : mIsDocument(false)
-        , mOpened(false) {}
+        , mOpened(false)
+        , mIsSrcdocChannel(false) {}
 
     MOZ_MUST_USE nsresult Init(nsIURI* uri);
 
     MOZ_MUST_USE nsresult InitSrcdoc(nsIURI* aURI,
                                      nsIURI* aBaseURI,
                                      const nsAString &aSrcdoc,
                                      nsILoadInfo* aLoadInfo);
 
--- a/netwerk/protocol/websocket/WebSocketChannel.cpp
+++ b/netwerk/protocol/websocket/WebSocketChannel.cpp
@@ -782,16 +782,38 @@ public:
   PMCECompression(bool aNoContextTakeover,
                   int32_t aLocalMaxWindowBits,
                   int32_t aRemoteMaxWindowBits)
     : mActive(false)
     , mNoContextTakeover(aNoContextTakeover)
     , mResetDeflater(false)
     , mMessageDeflated(false)
   {
+    this->mDeflater.next_in = nullptr;
+    this->mDeflater.avail_in = 0;
+    this->mDeflater.total_in = 0;
+    this->mDeflater.next_out = nullptr;
+    this->mDeflater.avail_out = 0;
+    this->mDeflater.total_out = 0;
+    this->mDeflater.msg = nullptr;
+    this->mDeflater.state = nullptr;
+    this->mDeflater.data_type = 0;
+    this->mDeflater.adler = 0;
+    this->mDeflater.reserved = 0;
+    this->mInflater.next_in = nullptr;
+    this->mInflater.avail_in = 0;
+    this->mInflater.total_in = 0;
+    this->mInflater.next_out = nullptr;
+    this->mInflater.avail_out = 0;
+    this->mInflater.total_out = 0;
+    this->mInflater.msg = nullptr;
+    this->mInflater.state = nullptr;
+    this->mInflater.data_type = 0;
+    this->mInflater.adler = 0;
+    this->mInflater.reserved = 0;
     MOZ_COUNT_CTOR(PMCECompression);
 
     mDeflater.zalloc = mInflater.zalloc = Z_NULL;
     mDeflater.zfree  = mInflater.zfree  = Z_NULL;
     mDeflater.opaque = mInflater.opaque = Z_NULL;
 
     if (deflateInit2(&mDeflater, Z_DEFAULT_COMPRESSION, Z_DEFLATED,
                      -aLocalMaxWindowBits, 8, Z_DEFAULT_STRATEGY) == Z_OK) {
@@ -1153,16 +1175,17 @@ NS_IMPL_ISUPPORTS(OutboundEnqueuer, nsIR
 //-----------------------------------------------------------------------------
 
 WebSocketChannel::WebSocketChannel() :
   mPort(0),
   mCloseTimeout(20000),
   mOpenTimeout(20000),
   mConnecting(NOT_CONNECTING),
   mMaxConcurrentConnections(200),
+  mInnerWindowID(0),
   mGotUpgradeOK(0),
   mRecvdHttpUpgradeTransport(0),
   mAutoFollowRedirects(0),
   mAllowPMCE(1),
   mPingOutstanding(0),
   mReleaseOnTransmit(0),
   mDataStarted(false),
   mRequestedClose(false),
@@ -1179,16 +1202,18 @@ WebSocketChannel::WebSocketChannel() :
   mServerCloseCode(CLOSE_ABNORMAL),
   mScriptCloseCode(0),
   mFragmentOpcode(nsIWebSocketFrame::OPCODE_CONTINUATION),
   mFragmentAccumulator(0),
   mBuffered(0),
   mBufferSize(kIncomingBufferInitialSize),
   mCurrentOut(nullptr),
   mCurrentOutSent(0),
+  mHdrOutToSend(0),
+  mHdrOut(nullptr),
   mDynamicOutputSize(0),
   mDynamicOutput(nullptr),
   mPrivateBrowsing(false),
   mConnectionLogService(nullptr)
 {
   MOZ_ASSERT(NS_IsMainThread(), "not main thread");
 
   LOG(("WebSocketChannel::WebSocketChannel() %p\n", this));
--- a/netwerk/socket/nsSOCKSIOLayer.cpp
+++ b/netwerk/socket/nsSOCKSIOLayer.cpp
@@ -226,23 +226,42 @@ private:
 };
 
 nsSOCKSSocketInfo::nsSOCKSSocketInfo()
     : mState(SOCKS_INITIAL)
     , mDataIoPtr(nullptr)
     , mDataLength(0)
     , mReadOffset(0)
     , mAmountToRead(0)
+    , mLookupStatus(NS_ERROR_NOT_INITIALIZED)
     , mFD(nullptr)
     , mVersion(-1)
     , mDestinationFamily(AF_INET)
     , mFlags(0)
     , mTlsFlags(0)
     , mTimeout(PR_INTERVAL_NO_TIMEOUT)
 {
+    this->mInternalProxyAddr.inet.family = 0;
+    this->mInternalProxyAddr.inet6.family = 0;
+    this->mInternalProxyAddr.inet6.port = 0;
+    this->mInternalProxyAddr.inet6.flowinfo = 0;
+    this->mInternalProxyAddr.inet6.scope_id = 0;
+    this->mInternalProxyAddr.local.family = 0;
+    this->mExternalProxyAddr.inet.family = 0;
+    this->mExternalProxyAddr.inet6.family = 0;
+    this->mExternalProxyAddr.inet6.port = 0;
+    this->mExternalProxyAddr.inet6.flowinfo = 0;
+    this->mExternalProxyAddr.inet6.scope_id = 0;
+    this->mExternalProxyAddr.local.family = 0;
+    this->mDestinationAddr.inet.family = 0;
+    this->mDestinationAddr.inet6.family = 0;
+    this->mDestinationAddr.inet6.port = 0;
+    this->mDestinationAddr.inet6.flowinfo = 0;
+    this->mDestinationAddr.inet6.scope_id = 0;
+    this->mDestinationAddr.local.family = 0;
     mData = new uint8_t[BUFFER_SIZE];
 
     mInternalProxyAddr.raw.family = AF_INET;
     mInternalProxyAddr.inet.ip = htonl(INADDR_ANY);
     mInternalProxyAddr.inet.port = htons(0);
 
     mExternalProxyAddr.raw.family = AF_INET;
     mExternalProxyAddr.inet.ip = htonl(INADDR_ANY);
--- a/netwerk/streamconv/converters/nsDirIndexParser.cpp
+++ b/netwerk/streamconv/converters/nsDirIndexParser.cpp
@@ -20,16 +20,21 @@
 
 using namespace mozilla;
 
 NS_IMPL_ISUPPORTS(nsDirIndexParser,
                   nsIRequestObserver,
                   nsIStreamListener,
                   nsIDirIndexParser)
 
+nsDirIndexParser::nsDirIndexParser()
+  : mLineStart(0)
+  , mHasDescription(false) {
+}
+
 nsresult
 nsDirIndexParser::Init() {
   mLineStart = 0;
   mHasDescription = false;
   mFormat[0] = -1;
   auto encoding = mozilla::dom::FallbackEncoding::FromLocale();
   encoding->Name(mEncoding);
 
--- a/netwerk/streamconv/converters/nsDirIndexParser.h
+++ b/netwerk/streamconv/converters/nsDirIndexParser.h
@@ -21,17 +21,17 @@ private:
     virtual ~nsDirIndexParser();
 
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSISTREAMLISTENER
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSIDIRINDEXPARSER
 
-    nsDirIndexParser() = default;
+    nsDirIndexParser();
     nsresult Init();
 
     enum fieldType {
         FIELD_UNKNOWN = 0, // MUST be 0
         FIELD_FILENAME,
         FIELD_DESCRIPTION,
         FIELD_CONTENTLENGTH,
         FIELD_LASTMODIFIED,
--- a/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
+++ b/netwerk/streamconv/converters/nsHTTPCompressConv.cpp
@@ -41,16 +41,18 @@ nsHTTPCompressConv::nsHTTPCompressConv()
   : mMode(HTTP_COMPRESS_IDENTITY)
   , mOutBuffer(nullptr)
   , mInpBuffer(nullptr)
   , mOutBufferLen(0)
   , mInpBufferLen(0)
   , mCheckHeaderDone(false)
   , mStreamEnded(false)
   , mStreamInitialized(false)
+  , mDummyStreamInitialised(false)
+  , d_stream{}
   , mLen(0)
   , hMode(0)
   , mSkipCount(0)
   , mFlags(0)
   , mDecodedDataLength(0)
   , mMutex("nsHTTPCompressConv")
 {
   LOG(("nsHttpCompresssConv %p ctor\n", this));
--- a/netwerk/streamconv/converters/nsHTTPCompressConv.h
+++ b/netwerk/streamconv/converters/nsHTTPCompressConv.h
@@ -56,16 +56,19 @@ typedef enum    {
 
 class BrotliWrapper
 {
 public:
   BrotliWrapper()
     : mTotalOut(0)
     , mStatus(NS_OK)
     , mBrotliStateIsStreamEnd(false)
+    , mRequest(nullptr)
+    , mContext(nullptr)
+    , mSourceOffset(0)
   {
     BrotliDecoderStateInit(&mState, 0, 0, 0);
   }
   ~BrotliWrapper()
   {
     BrotliDecoderStateCleanup(&mState);
   }
 
--- a/netwerk/streamconv/converters/nsIndexedToHTML.cpp
+++ b/netwerk/streamconv/converters/nsIndexedToHTML.cpp
@@ -49,16 +49,21 @@ static void AppendNonAsciiToNCR(const ns
     } else {
       out.AppendLiteral("&#x");
       out.AppendInt(*start++, 16);
       out.Append(';');
     }
   }
 }
 
+nsIndexedToHTML::nsIndexedToHTML()
+    : mExpectAbsLoc(false)
+{
+}
+
 nsresult
 nsIndexedToHTML::Create(nsISupports *aOuter, REFNSIID aIID, void **aResult) {
     nsresult rv;
     if (aOuter)
         return NS_ERROR_NO_AGGREGATION;
 
     nsIndexedToHTML* _s = new nsIndexedToHTML();
     if (_s == nullptr)
--- a/netwerk/streamconv/converters/nsIndexedToHTML.h
+++ b/netwerk/streamconv/converters/nsIndexedToHTML.h
@@ -22,17 +22,17 @@ class nsIndexedToHTML : public nsIStream
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSISTREAMCONVERTER
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSISTREAMLISTENER
     NS_DECL_NSIDIRINDEXLISTENER
 
-    nsIndexedToHTML() = default;
+    nsIndexedToHTML();
 
     nsresult Init(nsIStreamListener *aListener);
 
     static nsresult
     Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
 
 protected:
 
--- a/netwerk/streamconv/converters/nsMultiMixedConv.cpp
+++ b/netwerk/streamconv/converters/nsMultiMixedConv.cpp
@@ -22,16 +22,18 @@
 #include "nsHttpHeaderArray.h"
 #include "mozilla/AutoRestore.h"
 
 nsPartChannel::nsPartChannel(nsIChannel *aMultipartChannel, uint32_t aPartID,
                              nsIStreamListener* aListener) :
   mMultipartChannel(aMultipartChannel),
   mListener(aListener),
   mStatus(NS_OK),
+  mLoadFlags(0),
+  mContentDisposition(0),
   mContentLength(UINT64_MAX),
   mIsByteRangeRequest(false),
   mByteRangeStart(0),
   mByteRangeEnd(0),
   mPartID(aPartID),
   mIsLastPart(false)
 {
     // Inherit the load flags from the original channel...
@@ -808,16 +810,17 @@ nsMultiMixedConv::SwitchToControlParsing
     mTokenizer.EnableCustomToken(mBoundaryTokenWithDashes, false);
     mTokenizer.EnableCustomToken(mBoundaryToken, false);
 }
 
 // nsMultiMixedConv methods
 nsMultiMixedConv::nsMultiMixedConv() :
     mCurrentPartID(0),
     mInOnDataAvailable(false),
+    mResponseHeader(HEADER_UNKNOWN),
     // XXX: This is a hack to bypass the raw pointer to refcounted object in
     // lambda analysis. It should be removed and replaced when the
     // IncrementalTokenizer API is improved to avoid the need for such
     // workarounds.
     //
     // This is safe because `mTokenizer` will not outlive `this`, meaning that
     // this std::bind object will be destroyed before `this` dies.
     mTokenizer(std::bind(&nsMultiMixedConv::ConsumeToken, this, std::placeholders::_1))
--- a/netwerk/test/TestUDPSocket.cpp
+++ b/netwerk/test/TestUDPSocket.cpp
@@ -208,17 +208,18 @@ UDPServerListener::OnStopListening(nsIUD
  */
 class MulticastTimerCallback : public nsITimerCallback
 {
 protected:
   virtual ~MulticastTimerCallback();
 
 public:
   explicit MulticastTimerCallback(WaitForCondition* waiter)
-    : mWaiter(waiter)
+    : mResult(NS_ERROR_NOT_INITIALIZED)
+    , mWaiter(waiter)
   { }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSITIMERCALLBACK
 
   nsresult mResult;
   RefPtr<WaitForCondition> mWaiter;
 };
--- a/parser/html/nsHtml5SpeculativeLoad.cpp
+++ b/parser/html/nsHtml5SpeculativeLoad.cpp
@@ -4,23 +4,20 @@
 
 #include "nsHtml5SpeculativeLoad.h"
 #include "mozilla/Encoding.h"
 #include "nsHtml5TreeOpExecutor.h"
 
 using namespace mozilla;
 
 nsHtml5SpeculativeLoad::nsHtml5SpeculativeLoad()
-  :
-#ifdef DEBUG
-  mOpCode(eSpeculativeLoadUninitialized)
-  ,
-#endif
-  mIsAsync(false)
+  : mOpCode(eSpeculativeLoadUninitialized)
+  , mIsAsync(false)
   , mIsDefer(false)
+  , mEncoding(nullptr)
 {
   MOZ_COUNT_CTOR(nsHtml5SpeculativeLoad);
   new (&mCharsetOrSrcset) nsString;
 }
 
 nsHtml5SpeculativeLoad::~nsHtml5SpeculativeLoad()
 {
   MOZ_COUNT_DTOR(nsHtml5SpeculativeLoad);
--- a/parser/html/nsHtml5SpeculativeLoad.h
+++ b/parser/html/nsHtml5SpeculativeLoad.h
@@ -9,19 +9,17 @@
 #include "nsContentUtils.h"
 #include "nsHtml5DocumentMode.h"
 #include "nsHtml5String.h"
 
 class nsHtml5TreeOpExecutor;
 
 enum eHtml5SpeculativeLoad
 {
-#ifdef DEBUG
   eSpeculativeLoadUninitialized,
-#endif
   eSpeculativeLoadBase,
   eSpeculativeLoadCSP,
   eSpeculativeLoadMetaReferrer,
   eSpeculativeLoadImage,
   eSpeculativeLoadOpenPicture,
   eSpeculativeLoadEndPicture,
   eSpeculativeLoadPictureSource,
   eSpeculativeLoadScript,
--- a/parser/html/nsHtml5StackNode.cpp
+++ b/parser/html/nsHtml5StackNode.cpp
@@ -82,17 +82,24 @@ nsHtml5StackNode::isFosterParenting()
 bool
 nsHtml5StackNode::isHtmlIntegrationPoint()
 {
   return (flags & nsHtml5ElementName::HTML_INTEGRATION_POINT);
 }
 
 nsHtml5StackNode::nsHtml5StackNode(int32_t idxInTreeBuilder)
   : idxInTreeBuilder(idxInTreeBuilder)
+  , flags(0)
+  , name(nullptr)
+  , popName(nullptr)
+  , ns(0)
+  , node(nullptr)
+  , attributes(nullptr)
   , refcount(0)
+  , htmlCreator(nullptr)
 {
   MOZ_COUNT_CTOR(nsHtml5StackNode);
 }
 
 mozilla::dom::HTMLContentCreatorFunction
 nsHtml5StackNode::getHtmlCreator()
 {
   return htmlCreator;
--- a/parser/html/nsHtml5Tokenizer.cpp
+++ b/parser/html/nsHtml5Tokenizer.cpp
@@ -121,30 +121,55 @@ staticJArray<char16_t, int32_t> nsHtml5T
   NOFRAMES_ARR_DATA,
   MOZ_ARRAY_LENGTH(NOFRAMES_ARR_DATA)
 };
 
 nsHtml5Tokenizer::nsHtml5Tokenizer(nsHtml5TreeBuilder* tokenHandler,
                                    bool viewingXmlSource)
   : tokenHandler(tokenHandler)
   , encodingDeclarationHandler(nullptr)
+  , lastCR(false)
+  , stateSave(0)
+  , returnStateSave(0)
+  , index(0)
+  , forceQuirks(false)
+  , additional(u'\0')
+  , entCol(0)
+  , firstCharKey(0)
+  , lo(0)
+  , hi(0)
+  , candidate(0)
+  , charRefBufMark(0)
+  , value(0)
+  , seenDigits(false)
+  , cstart(0)
+  , strBufLen(0)
   , charRefBuf(jArray<char16_t, int32_t>::newJArray(32))
+  , charRefBufLen(0)
   , bmpChar(jArray<char16_t, int32_t>::newJArray(1))
   , astralChar(jArray<char16_t, int32_t>::newJArray(2))
+  , endTagExpectation(nullptr)
+  , endTagExpectationAsArray{}
+  , endTag(false)
   , containsHyphen(false)
   , tagName(nullptr)
   , nonInternedTagName(new nsHtml5ElementName())
   , attributeName(nullptr)
   , nonInternedAttributeName(new nsHtml5AttributeName())
   , doctypeName(nullptr)
   , publicIdentifier(nullptr)
   , systemIdentifier(nullptr)
   , attributes(tokenHandler->HasBuilder() ? new nsHtml5HtmlAttributes(0)
                                           : nullptr)
   , newAttributesEachTime(!tokenHandler->HasBuilder())
+  , shouldSuspend(false)
+  , confident(false)
+  , line(0)
+  , attributeLine(0)
+  , interner(nullptr)
   , viewingXmlSource(viewingXmlSource)
 {
   MOZ_COUNT_CTOR(nsHtml5Tokenizer);
 }
 
 void
 nsHtml5Tokenizer::setInterner(nsHtml5AtomTable* interner)
 {
--- a/parser/html/nsHtml5TreeBuilderCppSupplement.h
+++ b/parser/html/nsHtml5TreeBuilderCppSupplement.h
@@ -8,23 +8,37 @@
 #include "nsIPresShell.h"
 #include "nsNodeUtils.h"
 #include "nsIFrame.h"
 #include "mozilla/CheckedInt.h"
 #include "mozilla/Likely.h"
 #include "mozilla/UniquePtr.h"
 
 nsHtml5TreeBuilder::nsHtml5TreeBuilder(nsHtml5OplessBuilder* aBuilder)
-  : scriptingEnabled(false)
+  : mode(0)
+  , originalMode(0)
+  , framesetOk(false)
+  , tokenizer(nullptr)
+  , scriptingEnabled(false)
+  , needToDropLF(false)
   , fragment(false)
   , contextName(nullptr)
   , contextNamespace(kNameSpaceID_None)
   , contextNode(nullptr)
+  , templateModePtr(0)
+  , stackNodesIdx(0)
+  , numStackNodes(0)
+  , currentPtr(0)
+  , listPtr(0)
   , formPointer(nullptr)
   , headPointer(nullptr)
+  , deepTreeSurrogateParent(nullptr)
+  , charBufferLen(0)
+  , quirks(false)
+  , isSrcdocDocument(false)
   , mBuilder(aBuilder)
   , mViewSource(nullptr)
   , mOpSink(nullptr)
   , mHandles(nullptr)
   , mHandlesUsed(0)
   , mSpeculativeLoadStage(nullptr)
   , mBroken(NS_OK)
   , mCurrentHtmlScriptIsAsyncOrDefer(false)
@@ -33,23 +47,37 @@ nsHtml5TreeBuilder::nsHtml5TreeBuilder(n
   , mActive(false)
 #endif
 {
   MOZ_COUNT_CTOR(nsHtml5TreeBuilder);
 }
 
 nsHtml5TreeBuilder::nsHtml5TreeBuilder(nsAHtml5TreeOpSink* aOpSink,
                                        nsHtml5TreeOpStage* aStage)
-  : scriptingEnabled(false)
+  : mode(0)
+  , originalMode(0)
+  , framesetOk(false)
+  , tokenizer(nullptr)
+  , scriptingEnabled(false)
+  , needToDropLF(false)
   , fragment(false)
   , contextName(nullptr)
   , contextNamespace(kNameSpaceID_None)
   , contextNode(nullptr)
+  , templateModePtr(0)
+  , stackNodesIdx(0)
+  , numStackNodes(0)
+  , currentPtr(0)
+  , listPtr(0)
   , formPointer(nullptr)
   , headPointer(nullptr)
+  , deepTreeSurrogateParent(nullptr)
+  , charBufferLen(0)
+  , quirks(false)
+  , isSrcdocDocument(false)
   , mBuilder(nullptr)
   , mViewSource(nullptr)
   , mOpSink(aOpSink)
   , mHandles(new nsIContent*[NS_HTML5_TREE_BUILDER_HANDLE_ARRAY_LENGTH])
   , mHandlesUsed(0)
   , mSpeculativeLoadStage(aStage)
   , mBroken(NS_OK)
   , mCurrentHtmlScriptIsAsyncOrDefer(false)
--- a/parser/html/nsHtml5TreeOperation.cpp
+++ b/parser/html/nsHtml5TreeOperation.cpp
@@ -75,16 +75,21 @@ public:
   }
 
 private:
   nsCOMPtr<nsIDocument> mDocument;
 };
 
 nsHtml5TreeOperation::nsHtml5TreeOperation()
   : mOpCode(eTreeOpUninitialized)
+  , mOne{}
+  , mTwo{}
+  , mThree{}
+  , mFour{}
+  , mFive{}
 {
   MOZ_COUNT_CTOR(nsHtml5TreeOperation);
 }
 
 nsHtml5TreeOperation::~nsHtml5TreeOperation()
 {
   MOZ_COUNT_DTOR(nsHtml5TreeOperation);
   NS_ASSERTION(mOpCode != eTreeOpUninitialized, "Uninitialized tree op.");
--- a/security/manager/ssl/nsNSSComponent.cpp
+++ b/security/manager/ssl/nsNSSComponent.cpp
@@ -196,16 +196,17 @@ GetRevocationBehaviorFromPrefs(/*out*/ C
 }
 
 nsNSSComponent::nsNSSComponent()
   : mLoadableRootsLoadedMonitor("nsNSSComponent.mLoadableRootsLoadedMonitor")
   , mLoadableRootsLoaded(false)
   , mLoadableRootsLoadedResult(NS_ERROR_FAILURE)
   , mMutex("nsNSSComponent.mMutex")
   , mNSSInitialized(false)
+  , mMitmDetecionEnabled(false)
 {
   MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("nsNSSComponent::ctor\n"));
   MOZ_RELEASE_ASSERT(NS_IsMainThread());
 
   MOZ_ASSERT(mInstanceCount == 0,
              "nsNSSComponent is a singleton, but instantiated multiple times!");
   ++mInstanceCount;
 }
--- a/security/sandbox/mac/Sandbox.h
+++ b/security/sandbox/mac/Sandbox.h
@@ -35,18 +35,24 @@ typedef struct _MacSandboxPluginInfo {
       pluginBinaryPath(other.pluginBinaryPath) {}
   MacSandboxPluginType type;
   std::string pluginPath;
   std::string pluginBinaryPath;
 } MacSandboxPluginInfo;
 
 typedef struct _MacSandboxInfo {
   _MacSandboxInfo()
-    : type(MacSandboxType_Default), level(0), hasFilePrivileges(false),
-      shouldLog(true) {}
+    : type(MacSandboxType_Default)
+    , level(0)
+    , hasFilePrivileges(false)
+    , hasSandboxedProfile(false)
+    , hasAudio(false)
+    , shouldLog(true)
+  {
+  }
   _MacSandboxInfo(const struct _MacSandboxInfo& other) = default;
 
   MacSandboxType type;
   int32_t level;
   bool hasFilePrivileges;
   bool hasSandboxedProfile;
   bool hasAudio;
   MacSandboxPluginInfo pluginInfo;
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -426,23 +426,19 @@ def set_defaults(config, tests):
 
         test.setdefault('os-groups', [])
         test.setdefault('chunks', 1)
         test.setdefault('run-on-projects', 'built-projects')
         test.setdefault('instance-size', 'default')
         test.setdefault('max-run-time', 3600)
         test.setdefault('reboot', False)
         test.setdefault('virtualization', 'virtual')
-        test.setdefault('run-on-projects', 'built-projects')
-        test.setdefault('chunks', 1)
-        test.setdefault('instance-size', 'default')
         test.setdefault('loopback-audio', False)
         test.setdefault('loopback-video', False)
         test.setdefault('docker-image', {'in-tree': 'desktop1604-test'})
-        test.setdefault('max-run-time', 3600)
         test.setdefault('checkout', False)
 
         test['mozharness'].setdefault('extra-options', [])
         test['mozharness'].setdefault('requires-signed-builds', False)
         test['mozharness'].setdefault('tooltool-downloads', False)
         test['mozharness'].setdefault('set-moz-node-path', False)
         test['mozharness'].setdefault('chunked', False)
         test['mozharness'].setdefault('chunking-args', 'this-chunk')
--- a/testing/firefox-ui/tests/functional/security/manifest.ini
+++ b/testing/firefox-ui/tests/functional/security/manifest.ini
@@ -7,12 +7,11 @@ tags = local
 [test_ev_certificate.py]
 [test_mixed_content_page.py]
 [test_mixed_script_content_blocking.py]
 [test_no_certificate.py]
 tags = local
 [test_security_notification.py]
 [test_ssl_disabled_error_page.py]
 [test_ssl_status_after_restart.py]
-skip-if = (os == "win" && os_version == "5.1") # Bug 1167179: Fails to open popups after restart
 [test_submit_unencrypted_info_warning.py]
 [test_unknown_issuer.py]
 [test_untrusted_connection_error_page.py]
--- a/testing/firefox-ui/tests/functional/sessionstore/test_restore_windows_after_restart_and_quit.py
+++ b/testing/firefox-ui/tests/functional/sessionstore/test_restore_windows_after_restart_and_quit.py
@@ -5,19 +5,25 @@
 # add this directory to the path
 import sys
 import os
 sys.path.append(os.path.dirname(__file__))
 
 from session_store_test_case import SessionStoreTestCase
 
 
-class TestSessionStoreEnabled(SessionStoreTestCase):
-    def setUp(self):
-        super(TestSessionStoreEnabled, self).setUp(startup_page=3)
+class TestSessionStoreEnabledAllWindows(SessionStoreTestCase):
+
+    def setUp(self, include_private=True):
+        """ Setup for the test, enabling session restore.
+
+        :param include_private: Whether to open private windows.
+        """
+        super(TestSessionStoreEnabledAllWindows, self).setUp(
+            include_private=include_private, startup_page=3)
 
     def test_with_variety(self):
         """ Test opening and restoring both standard and private windows.
 
         Opens a set of windows, both standard and private, with
         some number of tabs in them. Once the tabs have loaded, restarts
         the browser, and then ensures that the standard tabs have been
         restored, and that the private ones have not.
@@ -33,17 +39,24 @@ class TestSessionStoreEnabled(SessionSto
 
         current_windows_set = self.convert_open_windows_to_set()
         self.assertEqual(current_windows_set, self.test_windows,
                          msg="""Non private browsing windows should have
                          been restored. Expected {}, got {}.
                          """.format(self.test_windows, current_windows_set))
 
 
+class TestSessionStoreEnabledNoPrivateWindows(TestSessionStoreEnabledAllWindows):
+
+    def setUp(self):
+        super(TestSessionStoreEnabledNoPrivateWindows, self).setUp(include_private=False)
+
+
 class TestSessionStoreDisabled(SessionStoreTestCase):
+
     def test_no_restore_with_quit(self):
         current_windows_set = self.convert_open_windows_to_set()
         self.assertEqual(current_windows_set, self.all_windows,
                          msg='Not all requested windows have been opened. Expected {}, got {}.'
                          .format(self.all_windows, current_windows_set))
 
         self.marionette.quit(in_app=True)
         self.marionette.start_session()
--- a/testing/firefox-ui/tests/functional/sessionstore/test_restore_windows_after_windows_shutdown.py
+++ b/testing/firefox-ui/tests/functional/sessionstore/test_restore_windows_after_windows_shutdown.py
@@ -6,16 +6,17 @@
 import sys
 import os
 sys.path.append(os.path.dirname(__file__))
 
 from session_store_test_case import SessionStoreTestCase
 
 
 class TestSessionStoreWindowsShutdown(SessionStoreTestCase):
+
     def setUp(self):
         super(TestSessionStoreWindowsShutdown, self).setUp(startup_page=3, no_auto_updates=False)
 
     def test_with_variety(self):
         """ Test restoring a set of windows across Windows shutdown.
 
         Opens a set of windows, both standard and private, with
         some number of tabs in them. Once the tabs have loaded, shuts down
--- a/testing/web-platform/meta/2dcontext/fill-and-stroke-styles/2d.pattern.image.broken.html.ini
+++ b/testing/web-platform/meta/2dcontext/fill-and-stroke-styles/2d.pattern.image.broken.html.ini
@@ -1,8 +1,5 @@
 [2d.pattern.image.broken.html]
   [Canvas test: 2d.pattern.image.broken]
     disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1016482
     expected:
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
       if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
-
--- a/testing/web-platform/meta/html/browsers/history/the-history-interface/traverse_the_history_write_after_load_1.html.ini
+++ b/testing/web-platform/meta/html/browsers/history/the-history-interface/traverse_the_history_write_after_load_1.html.ini
@@ -1,7 +1,3 @@
 [traverse_the_history_write_after_load_1.html]
   disabled:
     if (os == "linux") and debug: https://bugzilla.mozilla.org/show_bug.cgi?id=1215461
-  [Traverse the history after document.write after the load event]
-    expected:
-      if debug and not e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-
--- a/testing/web-platform/meta/html/browsers/history/the-history-interface/traverse_the_history_write_onload_1.html.ini
+++ b/testing/web-platform/meta/html/browsers/history/the-history-interface/traverse_the_history_write_onload_1.html.ini
@@ -1,10 +1,3 @@
 [traverse_the_history_write_onload_1.html]
   disabled:
     if debug or ((os == "linux") and (bits == 64)): https://bugzilla.mozilla.org/show_bug.cgi?id=1215461
-  [Traverse the history when a history entry is written in the load event]
-    expected:
-      if debug and not e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-      if not debug and not e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-
--- a/testing/web-platform/meta/html/browsers/history/the-history-interface/traverse_the_history_write_onload_2.html.ini
+++ b/testing/web-platform/meta/html/browsers/history/the-history-interface/traverse_the_history_write_onload_2.html.ini
@@ -1,8 +1,6 @@
 [traverse_the_history_write_onload_2.html]
   disabled:
     if debug or ((os == "linux") and (bits == 64)): https://bugzilla.mozilla.org/show_bug.cgi?id=1215461
   [Traverse the history back and forward when a history entry is written in the load event]
     expected:
-      if debug and e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
       if debug and not e10s and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
-
--- a/testing/web-platform/meta/html/editing/focus/focus-management/focus-events.html.ini
+++ b/testing/web-platform/meta/html/editing/focus/focus-management/focus-events.html.ini
@@ -1,17 +1,4 @@
 [focus-events.html]
   disabled:
     if os == "win": https://bugzilla.mozilla.org/show_bug.cgi?id=1090628
     if e10s and (os == "linux"): https://bugzilla.mozilla.org/show_bug.cgi?id=1203917
-  expected:
-    if debug and e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): TIMEOUT
-    if not debug and e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): TIMEOUT
-  [focusing on a focusable element fires a focus event at the element]
-    expected:
-      if not debug and e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): NOTRUN
-      if debug and e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): NOTRUN
-
-  [focusing on a focusable element fires a blur event at the previous focussed element]
-    expected:
-      if not debug and e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): NOTRUN
-      if debug and e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): NOTRUN
-
--- a/testing/web-platform/meta/resource-timing/resource_connection_reuse.html.ini
+++ b/testing/web-platform/meta/resource-timing/resource_connection_reuse.html.ini
@@ -1,12 +1,9 @@
 [resource_connection_reuse.html]
   disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1331948
   [connectStart and fetchStart should be the same]
     expected:
-      if not debug and e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
       if not debug and e10s and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
 
   [connectEnd and fetchStart should be the same]
     expected:
-      if not debug and e10s and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
       if not debug and e10s and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/webgl/bufferSubData.html.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[bufferSubData.html]
-  [bufferSubData]
-    expected:
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/webgl/compressedTexImage2D.html.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[compressedTexImage2D.html]
-  [compressedTexImage2D]
-    expected:
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-
--- a/testing/web-platform/meta/webgl/compressedTexSubImage2D.html.ini
+++ b/testing/web-platform/meta/webgl/compressedTexSubImage2D.html.ini
@@ -1,14 +1,7 @@
 [compressedTexSubImage2D.html]
-  [compressedTexSubImage2D]
-    expected:
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-
   [Calling function () {\n    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 10, 10, COMPRESSED_RGB_S3TC_DXT1_EXT, new Uint8Array(8));\n  } should generate a 1280 error.]
     expected: FAIL
 
   [Calling function () {\n    gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 10, 10, COMPRESSED_RGB_S3TC_DXT1_EXT, new Uint8Array(8), null);\n  } should generate a 1280 error.]
     expected: FAIL
 
deleted file mode 100644
--- a/testing/web-platform/meta/webgl/texImage2D.html.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[texImage2D.html]
-  [texImage2D]
-    expected:
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/webgl/texSubImage2D.html.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[texSubImage2D.html]
-  [texSubImage2D]
-    expected:
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/webgl/uniformMatrixNfv.html.ini
+++ /dev/null
@@ -1,22 +0,0 @@
-[uniformMatrixNfv.html]
-  [Should not throw for 2]
-    expected:
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-
-  [Should not throw for 3]
-    expected:
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-
-  [Should not throw for 4]
-    expected:
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-      if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86_64") and (bits == 64): FAIL
-      if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-
--- a/testing/web-platform/meta/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_align_position_line_size_while_paused.html.ini
+++ b/testing/web-platform/meta/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_align_position_line_size_while_paused.html.ini
@@ -1,8 +1,6 @@
 [dom_override_cue_align_position_line_size_while_paused.html]
   reftype: ==
   refurl: /webvtt/rendering/cues-with-video/processing-model/dom_override_cue_align_position_line_size_while_paused-ref.html
   disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1018936
   expected:
     if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): TIMEOUT
-    FAIL
--- a/testing/web-platform/meta/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_line.html.ini
+++ b/testing/web-platform/meta/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_line.html.ini
@@ -1,8 +1,4 @@
 [dom_override_cue_line.html]
   reftype: ==
   refurl: /webvtt/rendering/cues-with-video/processing-model/dom_override_cue_line-ref.html
   disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1018936
-  expected:
-    if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-    if not debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): FAIL
-    TIMEOUT
--- a/testing/web-platform/meta/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_text.html.ini
+++ b/testing/web-platform/meta/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_text.html.ini
@@ -1,8 +1,6 @@
 [dom_override_cue_text.html]
   reftype: ==
   refurl: /webvtt/rendering/cues-with-video/processing-model/dom_override_cue_text-ref.html
   disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1018936
   expected:
     if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
-    if debug and (os == "linux") and (version == "Ubuntu 12.04") and (processor == "x86") and (bits == 32): TIMEOUT
-    FAIL
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -12909,27 +12909,16 @@
     "kind": "linear",
     "low": 1000,
     "high": 90000,
     "n_buckets": 91,
     "bug_numbers": [1314220],
     "description": "The time duration from tab's media was blocked to unblocked. Now we record from 1 to 90 seconds, but the record by milliseconds, so the bucket is like [1000ms, 2000ms], [2000ms, 3000ms], e.t.c.",
     "releaseChannelCollection": "opt-out"
   },
-  "MAIN_THREAD_RUNNABLE_MS": {
-    "record_in_processes": ["main", "content", "gpu"],
-    "alert_emails": ["wmccloskey@mozilla.com", "farre@mozilla.com"],
-    "expires_in_version": "70",
-    "kind": "exponential",
-    "keyed": true,
-    "high": 10000,
-    "n_buckets": 10,
-    "bug_numbers": [1331804],
-    "description": "The time a given main thread runnable took to run (in milliseconds). The key comes from the runnables nsINamed::name value."
-  },
   "MOZ_CHUNKED_ARRAYBUFFER_IN_XHR": {
     "record_in_processes": ["main", "content"],
     "alert_emails": ["amarchesini@mozilla.com"],
     "expires_in_version": "58",
     "kind": "boolean",
     "bug_numbers": [1335365],
     "releaseChannelCollection": "opt-out",
     "description": "XMLHttpRequest.responseType set to moz-chunked-arraybuffer"
@@ -13257,26 +13246,16 @@
     "alert_emails": ["wpan@mozilla.com"],
     "expires_in_version": "60",
     "kind": "exponential",
     "high": 5000,
     "n_buckets": 100,
     "bug_numbers": [1345540],
     "description": "Time (ms) for the APZ handled wheel event spent in handlers."
   },
-  "TIME_BETWEEN_UNLABELED_RUNNABLES_MS": {
-    "record_in_processes": ["content"],
-    "alert_emails": ["wmccloskey@mozilla.com", "farre@mozilla.com"],
-    "expires_in_version": "70",
-    "kind": "exponential",
-    "high": 30000,
-    "n_buckets": 30,
-    "bug_numbers": [1351021],
-    "description": "Every time we run an unlabeled runnable, this histogram records the time (in ms) since the last unlabeled runnable ran."
-  },
   "VFC_INVALIDATE_LOCK_WAIT_MS": {
     "record_in_processes": ["main", "content"],
     "alert_emails": ["jwwang@mozilla.com"],
     "expires_in_version": "57",
     "kind": "exponential",
     "low": 1000,
     "high": 100000,
     "n_buckets": 100,
@@ -13356,27 +13335,16 @@
     "expires_in_version": "70",
     "kind": "exponential",
     "low": 32,
     "high": 750,
     "n_buckets": 40,
     "keyed": true,
     "description": "Measures the number of milliseconds we spend processing sync IPC messages in the receiving process, keyed by message name. Note: only messages that take over 500 microseconds are included in this probe."
   },
-  "IDLE_RUNNABLE_BUDGET_OVERUSE_MS": {
-    "record_in_processes": ["main", "content", "gpu"],
-    "alert_emails": ["farre@mozilla.com"],
-    "expires_in_version": "70",
-    "kind": "exponential",
-    "keyed": true,
-    "high": 10000,
-    "n_buckets": 10,
-    "bug_numbers": [1292600],
-    "description": "The time a given runnable exceeds its budget as set in nsIRunnable::SetDeadline (in milliseconds). The key comes from the runnables nsINamed::name value."
-  },
   "WEBEXT_BACKGROUND_PAGE_LOAD_MS": {
     "record_in_processes": ["main"],
     "alert_emails": ["addons-dev-internal@mozilla.com"],
     "bug_numbers": [1353172],
     "expires_in_version": "67",
     "kind": "exponential",
     "releaseChannelCollection": "opt-out",
     "high": 60000,
--- a/toolkit/modules/sessionstore/Utils.jsm
+++ b/toolkit/modules/sessionstore/Utils.jsm
@@ -12,16 +12,20 @@ ChromeUtils.import("resource://gre/modul
 ChromeUtils.defineModuleGetter(this, "NetUtil",
                                "resource://gre/modules/NetUtil.jsm");
 XPCOMUtils.defineLazyServiceGetter(this, "serializationHelper",
                                    "@mozilla.org/network/serialization-helper;1",
                                    "nsISerializationHelper");
 XPCOMUtils.defineLazyServiceGetter(this, "ssu",
                                    "@mozilla.org/browser/sessionstore/utils;1",
                                    "nsISessionStoreUtils");
+XPCOMUtils.defineLazyServiceGetter(this, "eTLDService",
+                                   "@mozilla.org/network/effective-tld-service;1",
+                                   "nsIEffectiveTLDService");
+
 XPCOMUtils.defineLazyGetter(this, "SERIALIZED_SYSTEMPRINCIPAL", function() {
   return Utils.serializePrincipal(Services.scriptSecurityManager.getSystemPrincipal());
 });
 
 function debug(msg) {
   Services.console.logStringMessage("Utils: " + msg);
 }
 
@@ -84,26 +88,17 @@ var Utils = Object.freeze({
 
     try {
       host = this.makeURI(url).host;
     } catch (e) {
       // The given URL probably doesn't have a host.
       return false;
     }
 
-    let index = host.indexOf(domain);
-    if (index == -1)
-      return false;
-
-    if (host == domain)
-      return true;
-
-    let prevChar = host[index - 1];
-    return (index == (host.length - domain.length)) &&
-           (prevChar == "." || prevChar == "/");
+   return eTLDService.hasRootDomain(host, domain);
   },
 
   shallowCopy(obj) {
     let retval = {};
 
     for (let key of Object.keys(obj)) {
       retval[key] = obj[key];
     }
--- a/xpcom/threads/nsThread.cpp
+++ b/xpcom/threads/nsThread.cpp
@@ -551,17 +551,16 @@ nsThread::nsThread(NotNull<SynchronizedE
   , mScriptObserver(nullptr)
   , mPriority(PRIORITY_NORMAL)
   , mThread(nullptr)
   , mNestedEventLoopDepth(0)
   , mStackSize(aStackSize)
   , mShutdownContext(nullptr)
   , mShutdownRequired(false)
   , mIsMainThread(aMainThread)
-  , mLastUnlabeledRunnable(TimeStamp::Now())
   , mCanInvokeJS(false)
   , mCurrentEvent(nullptr)
   , mCurrentEventStart(TimeStamp::Now())
   , mCurrentEventLoopDepth(-1)
   , mCurrentPerformanceCounter(nullptr)
 {
 }
 
@@ -1010,58 +1009,30 @@ nsThread::ProcessNextEvent(bool aMayWait
           && mCurrentPerformanceCounter) {
           // This is a recursive call, we're saving the time
           // spent in the parent event if the runnable is linked to a DocGroup.
           mozilla::TimeDuration duration = TimeStamp::Now() - mCurrentEventStart;
           mCurrentPerformanceCounter->IncrementExecutionDuration(duration.ToMicroseconds());
       }
 
 #ifdef MOZ_COLLECTING_RUNNABLE_TELEMETRY
-      Maybe<Telemetry::AutoTimer<Telemetry::MAIN_THREAD_RUNNABLE_MS>> timer;
-      Maybe<Telemetry::AutoTimer<Telemetry::IDLE_RUNNABLE_BUDGET_OVERUSE_MS>> idleTimer;
-
-      nsAutoCString name;
-      if ((MAIN_THREAD == mIsMainThread) || mNextIdleDeadline) {
-        bool labeled = GetLabeledRunnableName(event, name, priority);
-
-        if (MAIN_THREAD == mIsMainThread) {
-          timer.emplace(name);
-
-          // High-priority runnables are ignored here since they'll run right away
-          // even with the cooperative scheduler.
-          if (!labeled && (priority == EventPriority::Normal ||
-                           priority == EventPriority::Idle)) {
-            TimeStamp now = TimeStamp::Now();
-            double diff = (now - mLastUnlabeledRunnable).ToMilliseconds();
-            Telemetry::Accumulate(Telemetry::TIME_BETWEEN_UNLABELED_RUNNABLES_MS, diff);
-            mLastUnlabeledRunnable = now;
-          }
-        }
-
-        if (mNextIdleDeadline) {
-          // If we construct the AutoTimer with the deadline, then we'll
-          // compute TimeStamp::Now() - mNextIdleDeadline when
-          // accumulating telemetry.  If that is positive we've
-          // overdrawn our idle budget, if it's negative it will go in
-          // the 0 bucket of the histogram.
-          idleTimer.emplace(name, mNextIdleDeadline);
-        }
-      }
-
       // If we're on the main thread, we want to record our current runnable's
       // name in a static so that BHR can record it.
       Array<char, kRunnableNameBufSize> restoreRunnableName;
       restoreRunnableName[0] = '\0';
       auto clear = MakeScopeExit([&] {
         if (MAIN_THREAD == mIsMainThread) {
           MOZ_ASSERT(NS_IsMainThread());
           sMainThreadRunnableName = restoreRunnableName;
         }
       });
       if (MAIN_THREAD == mIsMainThread) {
+        nsAutoCString name;
+        GetLabeledRunnableName(event, name, priority);
+
         MOZ_ASSERT(NS_IsMainThread());
         restoreRunnableName = sMainThreadRunnableName;
 
         // Copy the name into sMainThreadRunnableName's buffer, and append a
         // terminating null.
         uint32_t length = std::min((uint32_t) kRunnableNameBufSize - 1,
                                    (uint32_t) name.Length());
         memcpy(sMainThreadRunnableName.begin(), name.BeginReading(), length);
--- a/xpcom/threads/nsThread.h
+++ b/xpcom/threads/nsThread.h
@@ -168,20 +168,16 @@ protected:
   // The shutdown context for ourselves.
   struct nsThreadShutdownContext* mShutdownContext;
   // The shutdown contexts for any other threads we've asked to shut down.
   nsTArray<nsAutoPtr<struct nsThreadShutdownContext>> mRequestedShutdownContexts;
 
   mozilla::Atomic<bool> mShutdownRequired;
   MainThreadFlag mIsMainThread;
 
-  // The time when we last ran an unlabeled runnable (one not associated with a
-  // SchedulerGroup).
-  mozilla::TimeStamp mLastUnlabeledRunnable;
-
   // Set to true if this thread creates a JSRuntime.
   bool mCanInvokeJS;
 
   bool GetSchedulerLoggingEnabled();
   mozilla::TimeStamp mNextIdleDeadline;
   // Used to track which event is being executed by ProcessNextEvent
   nsCOMPtr<nsIRunnable> mCurrentEvent;
   mozilla::TimeStamp mCurrentEventStart;