merge mozilla-central to autoland. r=merge a=merge on a CLOSED TREE
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 13 Oct 2017 00:53:56 +0200
changeset 385956 1b6a3e8b08935eddd2291d8c1fb83a70dd5e7e47
parent 385955 66b011b6b2af7b3bbefddc870352df92bf88cf38 (current diff)
parent 385860 25aad10380b10b6efa50c2b4d97245f078d870a0 (diff)
child 385957 a3225b6f61933a483d9313667ccacffd96e3f251
push id32672
push userarchaeopteryx@coole-files.de
push dateFri, 13 Oct 2017 09:00:05 +0000
treeherdermozilla-central@3efcb26e5f37 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge, merge
milestone58.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-central to autoland. r=merge a=merge on a CLOSED TREE
build/pgo/profileserver.py
modules/libpref/init/all.js
new file mode 100644
--- /dev/null
+++ b/build/pgo/prefs_override.js
@@ -0,0 +1,2 @@
+// Turn off budget throttling for the profile server
+user_pref("dom.timeout.enable_budget_timer_throttling", false);
old mode 100644
new mode 100755
--- a/build/pgo/profileserver.py
+++ b/build/pgo/profileserver.py
@@ -40,23 +40,29 @@ if __name__ == '__main__':
     locations.add_host(host='127.0.0.1',
                        port=PORT,
                        options='primary,privileged')
 
     with TemporaryDirectory() as profilePath:
         # TODO: refactor this into mozprofile
         prefpath = os.path.join(
             build.topsrcdir, "testing", "profiles", "prefs_general.js")
+        overridepath = os.path.join(
+            build.topsrcdir, "build", "pgo", "prefs_override.js")
+
         prefs = {}
         prefs.update(Preferences.read_prefs(prefpath))
+        prefs.update(Preferences.read_prefs(overridepath))
+
         interpolation = {"server": "%s:%d" % httpd.httpd.server_address,
                          "OOP": "false"}
         prefs = json.loads(json.dumps(prefs) % interpolation)
         for pref in prefs:
             prefs[pref] = Preferences.cast(prefs[pref])
+
         profile = FirefoxProfile(profile=profilePath,
                                  preferences=prefs,
                                  addons=[os.path.join(
                                      build.topsrcdir, 'tools', 'quitter', 'quitter@mozilla.org.xpi')],
                                  locations=locations)
 
         env = os.environ.copy()
         env["MOZ_CRASHREPORTER_NO_REPORT"] = "1"
--- a/dom/base/ChromeUtils.cpp
+++ b/dom/base/ChromeUtils.cpp
@@ -5,16 +5,20 @@
 
 #include "ChromeUtils.h"
 
 #include "jsfriendapi.h"
 #include "WrapperFactory.h"
 
 #include "mozilla/Base64.h"
 #include "mozilla/BasePrincipal.h"
+#include "mozilla/TimeStamp.h"
+#include "mozilla/dom/IdleDeadline.h"
+#include "mozilla/dom/WindowBinding.h" // For IdleRequestCallback/Options
+#include "nsThreadUtils.h"
 
 namespace mozilla {
 namespace dom {
 
 /* static */ void
 ThreadSafeChromeUtils::NondeterministicGetWeakMapKeys(GlobalObject& aGlobal,
                                                       JS::Handle<JS::Value> aMap,
                                                       JS::MutableHandle<JS::Value> aRetval,
@@ -259,16 +263,119 @@ ChromeUtils::ShallowClone(GlobalObject& 
   if (aTarget && !JS_WrapObject(cx, &obj)) {
     return;
   }
 
   cleanup.release();
   aRetval.set(obj);
 }
 
+namespace {
+  class IdleDispatchRunnable final : public IdleRunnable
+                                   , public nsITimerCallback
+  {
+  public:
+    NS_DECL_ISUPPORTS_INHERITED
+
+    IdleDispatchRunnable(nsIGlobalObject* aParent,
+                         IdleRequestCallback& aCallback)
+      : IdleRunnable("ChromeUtils::IdleDispatch")
+      , mCallback(&aCallback)
+      , mParent(aParent)
+    {}
+
+    NS_IMETHOD Run() override
+    {
+      if (mCallback) {
+        CancelTimer();
+
+        auto deadline = mDeadline - TimeStamp::ProcessCreation();
+
+        ErrorResult rv;
+        RefPtr<IdleDeadline> idleDeadline =
+          new IdleDeadline(mParent, mTimedOut, deadline.ToMilliseconds());
+
+        mCallback->Call(*idleDeadline, rv, "ChromeUtils::IdleDispatch handler");
+        mCallback = nullptr;
+        mParent = nullptr;
+
+        rv.SuppressException();
+        return rv.StealNSResult();
+      }
+      return NS_OK;
+    }
+
+    void SetDeadline(TimeStamp aDeadline) override
+    {
+      mDeadline = aDeadline;
+    }
+
+    NS_IMETHOD Notify(nsITimer* aTimer) override
+    {
+      mTimedOut = true;
+      SetDeadline(TimeStamp::Now());
+      return Run();
+    }
+
+    void SetTimer(uint32_t aDelay, nsIEventTarget* aTarget) override
+    {
+      MOZ_ASSERT(aTarget);
+      MOZ_ASSERT(!mTimer);
+      mTimer = do_CreateInstance(NS_TIMER_CONTRACTID);
+      if (mTimer) {
+        mTimer->SetTarget(aTarget);
+        mTimer->InitWithCallback(this, aDelay, nsITimer::TYPE_ONE_SHOT);
+      }
+    }
+
+  protected:
+    virtual ~IdleDispatchRunnable()
+    {
+      CancelTimer();
+    }
+
+  private:
+    void CancelTimer()
+    {
+      if (mTimer) {
+        mTimer->Cancel();
+        mTimer = nullptr;
+      }
+    }
+
+    RefPtr<IdleRequestCallback> mCallback;
+    nsCOMPtr<nsIGlobalObject> mParent;
+
+    nsCOMPtr<nsITimer> mTimer;
+
+    TimeStamp mDeadline{};
+    bool mTimedOut = false;
+  };
+
+  NS_IMPL_ISUPPORTS_INHERITED(IdleDispatchRunnable, IdleRunnable, nsITimerCallback)
+} // anonymous namespace
+
+/* static */ void
+ChromeUtils::IdleDispatch(const GlobalObject& aGlobal,
+                          IdleRequestCallback& aCallback,
+                          const IdleRequestOptions& aOptions,
+                          ErrorResult& aRv)
+{
+  nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
+  MOZ_ASSERT(global);
+
+  auto runnable = MakeRefPtr<IdleDispatchRunnable>(global, aCallback);
+
+  if (aOptions.mTimeout.WasPassed()) {
+    aRv = NS_IdleDispatchToCurrentThread(runnable.forget(), aOptions.mTimeout.Value());
+  } else {
+    aRv = NS_IdleDispatchToCurrentThread(runnable.forget());
+  }
+}
+
 /* static */ void
 ChromeUtils::OriginAttributesToSuffix(dom::GlobalObject& aGlobal,
                                       const dom::OriginAttributesDictionary& aAttrs,
                                       nsCString& aSuffix)
 
 {
   OriginAttributes attrs(aAttrs);
   attrs.CreateSuffix(aSuffix);
--- a/dom/base/ChromeUtils.h
+++ b/dom/base/ChromeUtils.h
@@ -16,16 +16,18 @@ namespace mozilla {
 
 namespace devtools {
 class HeapSnapshot;
 } // namespace devtools
 
 namespace dom {
 
 class ArrayBufferViewOrArrayBuffer;
+class IdleRequestCallback;
+struct IdleRequestOptions;
 class PrecompiledScript;
 class Promise;
 
 class ThreadSafeChromeUtils
 {
 private:
   // Implemented in devtools/shared/heapsnapshot/HeapSnapshot.cpp
   static void SaveHeapSnapshotShared(GlobalObject& global,
@@ -140,14 +142,19 @@ public:
                            bool aUnwrap,
                            nsAString& aRetval);
 
   static void ShallowClone(GlobalObject& aGlobal,
                            JS::HandleObject aObj,
                            JS::HandleObject aTarget,
                            JS::MutableHandleObject aRetval,
                            ErrorResult& aRv);
+
+  static void IdleDispatch(const GlobalObject& global,
+                           IdleRequestCallback& callback,
+                           const IdleRequestOptions& options,
+                           ErrorResult& aRv);
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_ChromeUtils__
--- a/dom/base/IdleDeadline.cpp
+++ b/dom/base/IdleDeadline.cpp
@@ -12,30 +12,41 @@
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDOMNavigationTiming.h"
 #include "nsPIDOMWindow.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(IdleDeadline, mWindow)
+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(IdleDeadline, mWindow, mGlobal)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(IdleDeadline)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(IdleDeadline)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(IdleDeadline)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 IdleDeadline::IdleDeadline(nsPIDOMWindowInner* aWindow, bool aDidTimeout,
                            DOMHighResTimeStamp aDeadline)
   : mWindow(aWindow)
   , mDidTimeout(aDidTimeout)
   , mDeadline(aDeadline)
 {
+  bool hasHadSHO;
+  mGlobal = aWindow->GetDoc()->GetScriptHandlingObject(hasHadSHO);
+}
+
+IdleDeadline::IdleDeadline(nsIGlobalObject* aGlobal, bool aDidTimeout,
+                           DOMHighResTimeStamp aDeadline)
+  : mWindow(nullptr)
+  , mGlobal(aGlobal)
+  , mDidTimeout(aDidTimeout)
+  , mDeadline(aDeadline)
+{
 }
 
 IdleDeadline::~IdleDeadline()
 {
 }
 
 JSObject*
 IdleDeadline::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
@@ -45,24 +56,31 @@ IdleDeadline::WrapObject(JSContext* aCx,
 
 DOMHighResTimeStamp
 IdleDeadline::TimeRemaining()
 {
   if (mDidTimeout) {
     return 0.0;
   }
 
-  RefPtr<Performance> performance = mWindow->GetPerformance();
-  if (!performance) {
-    // If there is no performance object the window is partially torn
-    // down, so we can safely say that there is no time remaining.
-    return 0.0;
+  if (mWindow) {
+    RefPtr<Performance> performance = mWindow->GetPerformance();
+    if (!performance) {
+      // If there is no performance object the window is partially torn
+      // down, so we can safely say that there is no time remaining.
+      return 0.0;
+    }
+
+    return std::max(mDeadline - performance->Now(), 0.0);
   }
 
-  return std::max(mDeadline - performance->Now(), 0.0);
+  // If there's no window, we're in a system scope, and can just use
+  // a high-resolution TimeStamp::Now();
+  auto timestamp = TimeStamp::Now() - TimeStamp::ProcessCreation();
+  return std::max(mDeadline - timestamp.ToMilliseconds(), 0.0);
 }
 
 bool
 IdleDeadline::DidTimeout() const
 {
   return mDidTimeout;
 }
 
--- a/dom/base/IdleDeadline.h
+++ b/dom/base/IdleDeadline.h
@@ -12,44 +12,49 @@
 #include "mozilla/ErrorResult.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/dom/BindingDeclarations.h"
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDOMNavigationTiming.h"
 #include "nsWrapperCache.h"
 
+class nsIGlobalObject;
 class nsPIDOMWindowInner;
 
 namespace mozilla {
 namespace dom {
 
 class IdleDeadline final
   : public nsISupports
   , public nsWrapperCache
 {
 public:
   IdleDeadline(nsPIDOMWindowInner* aWindow, bool aDidTimeout,
                DOMHighResTimeStamp aDeadline);
 
-  nsPIDOMWindowInner* GetParentObject() const { return mWindow; }
+  IdleDeadline(nsIGlobalObject* aGlobal, bool aDidTimeout,
+               DOMHighResTimeStamp aDeadline);
+
+  nsIGlobalObject* GetParentObject() const { return mGlobal; }
 
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
   DOMHighResTimeStamp TimeRemaining();
   bool DidTimeout() const;
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(IdleDeadline)
 
 private:
   ~IdleDeadline();
 
   nsCOMPtr<nsPIDOMWindowInner> mWindow;
+  nsCOMPtr<nsIGlobalObject> mGlobal;
   const bool mDidTimeout;
   const DOMHighResTimeStamp mDeadline;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_IdleDeadline_h
--- a/dom/base/WebSocket.cpp
+++ b/dom/base/WebSocket.cpp
@@ -1661,28 +1661,27 @@ WebSocketImpl::Init(JSContext* aCx,
       nsCOMPtr<nsIGlobalObject> globalObject(GetEntryGlobal());
       if (globalObject) {
         principal = globalObject->PrincipalOrNull();
       }
 
       nsCOMPtr<nsPIDOMWindowInner> innerWindow;
 
       while (true) {
-        if (principal) {
-          bool isNullPrincipal = true;
-          isNullPrincipal = principal->GetIsNullPrincipal();
-          if (isNullPrincipal || nsContentUtils::IsSystemPrincipal(principal)) {
-            break;
-          }
+        if (principal && !principal->GetIsNullPrincipal()) {
+          break;
         }
 
         if (!innerWindow) {
           innerWindow = do_QueryInterface(globalObject);
-          if (NS_WARN_IF(!innerWindow)) {
-            return NS_ERROR_DOM_SECURITY_ERR;
+          if (!innerWindow) {
+            // If we are in a XPConnect sandbox or in a JS component,
+            // innerWindow will be null. There is nothing on top of this to be
+            // considered.
+            break;
           }
         }
 
         nsCOMPtr<nsPIDOMWindowOuter> parentWindow =
           innerWindow->GetScriptableParent();
         if (NS_WARN_IF(!parentWindow)) {
           return NS_ERROR_DOM_SECURITY_ERR;
         }
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -8151,34 +8151,34 @@ nsGlobalWindow::PrintOuter(ErrorResult& 
     if (printSettingsService) {
       bool printSettingsAreGlobal =
         Preferences::GetBool("print.use_global_printsettings", false);
 
       if (printSettingsAreGlobal) {
         printSettingsService->GetGlobalPrintSettings(getter_AddRefs(printSettings));
 
         nsAutoString printerName;
-        printSettings->GetPrinterName(getter_Copies(printerName));
+        printSettings->GetPrinterName(printerName);
 
         bool shouldGetDefaultPrinterName = printerName.IsEmpty();
 #ifdef MOZ_X11
         // In Linux, GTK backend does not support per printer settings.
         // Calling GetDefaultPrinterName causes a sandbox violation (see Bug 1329216).
         // The printer name is not needed anywhere else on Linux before it gets to the parent.
         // In the parent, we will then query the default printer name if no name is set.
         // Unless we are in the parent, we will skip this part.
         if (!XRE_IsParentProcess()) {
           shouldGetDefaultPrinterName = false;
         }
 #endif
         if (shouldGetDefaultPrinterName) {
-          printSettingsService->GetDefaultPrinterName(getter_Copies(printerName));
-          printSettings->SetPrinterName(printerName.get());
+          printSettingsService->GetDefaultPrinterName(printerName);
+          printSettings->SetPrinterName(printerName);
         }
-        printSettingsService->InitPrintSettingsFromPrinter(printerName.get(),
+        printSettingsService->InitPrintSettingsFromPrinter(printerName,
                                                            printSettings);
         printSettingsService->InitPrintSettingsFromPrefs(printSettings,
                                                          true,
                                                          nsIPrintSettings::kInitSaveAll);
       } else {
         printSettingsService->GetNewPrintSettings(getter_AddRefs(printSettings));
       }
 
--- a/dom/base/nsNodeUtils.cpp
+++ b/dom/base/nsNodeUtils.cpp
@@ -611,16 +611,19 @@ nsNodeUtils::CloneAndAdopt(nsINode *aNod
         MOZ_ASSERT(IsDOMObject(wrapper));
         JSAutoCompartment ac(cx, wrapper);
         ReparentWrapper(cx, wrapper, aError);
         if (aError.Failed()) {
           if (wasRegistered) {
             aNode->OwnerDoc()->UnregisterActivityObserver(aNode->AsElement());
           }
           aNode->mNodeInfo.swap(newNodeInfo);
+          if (elem) {
+            elem->NodeInfoChanged(newDoc);
+          }
           if (wasRegistered) {
             aNode->OwnerDoc()->RegisterActivityObserver(aNode->AsElement());
           }
           return nullptr;
         }
       }
     }
   }
new file mode 100644
--- /dev/null
+++ b/dom/base/test/iframe_webSocket_sandbox.html
@@ -0,0 +1,65 @@
+<html><body>
+<iframe id="frame" sandbox="allow-scripts allow-popups"></iframe>
+<script type="application/javascript;version=1.8">
+onmessage = function(e) {
+  parent.postMessage(e.data, '*');
+}
+
+var ifr = document.getElementById('frame');
+
+if (location.search == '?nested') {
+  var url = new URL(location);
+  url.search = "";
+  ifr.src = url.href;
+} else if (location.search == '?popup') {
+  var url = new URL(location);
+  url.search = "?opener";
+
+  ifr.srcdoc = "<html><script>" +
+    "window.open('" + url.href + "', 'foobar');" +
+    "onmessage = function(e) { " +
+    "  parent.postMessage(e.data, '*'); " +
+    "}" +
+  "</scr" + "ipt></html>";
+} else if (location.search == '?opener') {
+  try{
+    var socket = new WebSocket('ws://mochi.test:8888/tests/dom/base/test/file_websocket_basic');
+    socket.onerror = function(e) {
+      opener.postMessage('WS onerror', '*');
+      close();
+    };
+    socket.onopen = function(event) {
+      opener.postMessage('WS onopen', '*');
+      close();
+    };
+  } catch(e) {
+    if (e.name == 'SecurityError') {
+      opener.postMessage('WS Throws!', '*');
+    } else {
+      opener.postMessage('WS Throws something else!', '*');
+    }
+    close();
+  }
+} else {
+  ifr.srcdoc = `
+  <html><script>
+  try{
+    var socket = new WebSocket('ws://mochi.test:8888/tests/dom/base/test/file_websocket_basic');
+    socket.onerror = function(e) {
+      parent.postMessage('WS onerror', '*');
+    };
+    socket.onopen = function(event) {
+      parent.postMessage('WS onopen', '*');
+    };
+  } catch(e) {
+    if (e.name == 'SecurityError') {
+      parent.postMessage('WS Throws!', '*');
+    } else {
+      parent.postMessage('WS Throws something else!', '*');
+    }
+  }
+  </scr`+`ipt>
+  </html>`;
+}
+</script>
+</body></html>
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -801,16 +801,19 @@ tags = audiochannel
 [test_webaudioNotificationStopOnNavigation.html]
 tags = audiochannel
 [test_websocket_basic.html]
 skip-if = toolkit == 'android'
 [test_websocket_hello.html]
 skip-if = toolkit == 'android'
 [test_websocket_permessage_deflate.html]
 skip-if = toolkit == 'android'
+[test_webSocket_sandbox.html]
+skip-if = toolkit == 'android'
+support-files = iframe_webSocket_sandbox.html
 [test_websocket1.html]
 skip-if = toolkit == 'android'
 [test_websocket2.html]
 skip-if = toolkit == 'android'
 [test_websocket3.html]
 skip-if = toolkit == 'android'
 [test_websocket4.html]
 skip-if = toolkit == 'android'
--- a/dom/base/test/test_bug1222633.html
+++ b/dom/base/test/test_bug1222633.html
@@ -83,18 +83,20 @@ function testChangePrefetchToPreload(url
 };
 
 const SJS_PATH = window.location.pathname.replace(/[^/]+$/, "file_bug1268962.sjs");
 const SAME_ORIGIN = "http://mochi.test:8888" + SJS_PATH;
 const CROSS_ORIGIN = "http://example.com" + SJS_PATH;
 
 SimpleTest.waitForExplicitFinish();
 
+SpecialPowers.pushPrefEnv({"set": [["network.preload", true]]})
+
 // test same origin
-testPreloadEvent(SAME_ORIGIN + "?statusCode=200&cacheControl=no-cache", false, false)
+.then(() => testPreloadEvent(SAME_ORIGIN + "?statusCode=200&cacheControl=no-cache", false, false))
 .then(() => testPreloadEvent(SAME_ORIGIN + "?statusCode=404&cacheControl=no-cache", false, false))
 .then(() => testPreloadEvent(SAME_ORIGIN + "?statusCode=200&cacheControl=max-age%3D120", false, true))
 .then(() => testPreloadEvent(SAME_ORIGIN + "?statusCode=404&cacheControl=max-age%3D120", false, false))
 
 // test cross origin without CORS
 .then(() => testPreloadEvent(CROSS_ORIGIN + "?statusCode=200&cacheControl=no-cache", false, true))
 .then(() => testPreloadEvent(CROSS_ORIGIN + "?statusCode=404&cacheControl=no-cache", false, true))
 .then(() => testPreloadEvent(CROSS_ORIGIN + "?statusCode=200&cacheControl=max-age%3D120", false, true))
--- a/dom/base/test/test_bug1222633_link_update.html
+++ b/dom/base/test/test_bug1222633_link_update.html
@@ -117,18 +117,20 @@ function testPreloadEventSetCrossOrigin(
 }
 
 const SJS_PATH = window.location.pathname.replace(/[^/]+$/, "file_bug1268962.sjs");
 const SAME_ORIGIN = "http://mochi.test:8888" + SJS_PATH;
 const CROSS_ORIGIN = "http://example.com" + SJS_PATH;
 
 SimpleTest.waitForExplicitFinish();
 
+SpecialPowers.pushPrefEnv({"set": [["network.preload", true]]})
+
 // Test changing as parameter from a wrong to a correct one.
-testPreloadEventAsAttributeChange(SAME_ORIGIN + "?statusCode=200&cacheControl=max-age%3D120")
+.then(() => testPreloadEventAsAttributeChange(SAME_ORIGIN + "?statusCode=200&cacheControl=max-age%3D120"))
 // Test changing type parameter from a wrong to a correct one for given as parameter.
 .then(() => testPreloadEventAttributeChange(SAME_ORIGIN + "?statusCode=200&cacheControl=max-age%3D120", "type", "text/vtt", "image/png", false, true))
 // Test changing media parameter from a wrong to a correct one.
 .then(() => testPreloadEventAttributeChange(SAME_ORIGIN + "?statusCode=200&cacheControl=max-age%3D120", "media", "foo", "all", false, true))
 // Test changing crossorigin parameter.
 .then(() => testPreloadEventSetCrossOrigin(CROSS_ORIGIN + "?statusCode=404&cacheControl=max-age%3D120&allowOrigin=*"))
 
 .catch((err) => ok(false, "promise rejected: " + err))
new file mode 100644
--- /dev/null
+++ b/dom/base/test/test_webSocket_sandbox.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <title>Bug 1252751</title>
+  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+</head>
+<body>
+<div id="container"></div>
+<iframe id="frame"></iframe>
+<script type="application/javascript;version=1.8">
+var urls = [ "https://example.com/tests/dom/base/test/iframe_webSocket_sandbox.html",
+             "https://example.com/tests/dom/base/test/iframe_webSocket_sandbox.html?nested",
+             "https://example.com/tests/dom/base/test/iframe_webSocket_sandbox.html?popup" ];
+
+onmessage = function(e) {
+  is(e.data, "WS Throws!", "ws://URI cannot be used by a https iframe");
+  runTest();
+}
+
+function runTest() {
+  if (!urls.length) {
+    SimpleTest.finish();
+    return;
+  }
+
+  document.getElementById("frame").src = urls.shift();
+}
+
+SimpleTest.waitForExplicitFinish();
+runTest();
+</script>
+</body>
+</html>
--- a/dom/html/HTMLLinkElement.cpp
+++ b/dom/html/HTMLLinkElement.cpp
@@ -386,21 +386,38 @@ static const DOMTokenListSupportedToken 
   "alternate",
   "preconnect",
   "icon",
   "search",
   "preload",
   nullptr
 };
 
+static const DOMTokenListSupportedToken sSupportedRelValuesNoPreload[] = {
+  // Keep this in sync with ToLinkMask in nsStyleLinkElement.cpp.
+  // "import" must come first because it's conditional.
+  "prefetch",
+  "dns-prefetch",
+  "stylesheet",
+  "next",
+  "alternate",
+  "preconnect",
+  "icon",
+  "search",
+  nullptr
+};
 nsDOMTokenList*
 HTMLLinkElement::RelList()
 {
   if (!mRelList) {
-    mRelList = new nsDOMTokenList(this, nsGkAtoms::rel, sSupportedRelValues);
+    if (Preferences::GetBool("network.preload")) {
+      mRelList = new nsDOMTokenList(this, nsGkAtoms::rel, sSupportedRelValues);
+    } else {
+      mRelList = new nsDOMTokenList(this, nsGkAtoms::rel, sSupportedRelValuesNoPreload);
+    }
   }
   return mRelList;
 }
 
 already_AddRefed<nsIURI>
 HTMLLinkElement::GetHrefURI() const
 {
   return GetHrefURIForAnchors();
--- a/dom/webauthn/WebAuthnManager.cpp
+++ b/dom/webauthn/WebAuthnManager.cpp
@@ -229,16 +229,17 @@ WebAuthnManager::MaybeClearTransaction()
     RefPtr<WebAuthnTransactionChild> c;
     mChild.swap(c);
     c->Send__delete__(c);
   }
 }
 
 WebAuthnManager::~WebAuthnManager()
 {
+  MOZ_ASSERT(NS_IsMainThread());
   MaybeClearTransaction();
 }
 
 RefPtr<WebAuthnManager::BackgroundActorPromise>
 WebAuthnManager::GetOrCreateBackgroundActor()
 {
   MOZ_ASSERT(NS_IsMainThread());
 
@@ -258,16 +259,17 @@ WebAuthnManager::GetOrCreateBackgroundAc
   return promise;
 }
 
 //static
 WebAuthnManager*
 WebAuthnManager::GetOrCreate()
 {
   MOZ_ASSERT(NS_IsMainThread());
+
   if (gWebAuthnManager) {
     return gWebAuthnManager;
   }
 
   gWebAuthnManager = new WebAuthnManager();
   ClearOnShutdown(&gWebAuthnManager);
   return gWebAuthnManager;
 }
@@ -279,25 +281,26 @@ WebAuthnManager::Get()
   MOZ_ASSERT(NS_IsMainThread());
   return gWebAuthnManager;
 }
 
 already_AddRefed<Promise>
 WebAuthnManager::MakeCredential(nsPIDOMWindowInner* aParent,
                                 const MakePublicKeyCredentialOptions& aOptions)
 {
+  MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aParent);
 
   MaybeClearTransaction();
 
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aParent);
 
   ErrorResult rv;
   RefPtr<Promise> promise = Promise::Create(global, rv);
-  if(rv.Failed()) {
+  if (rv.Failed()) {
     return nullptr;
   }
 
   nsString origin;
   nsCString rpId;
   rv = GetOrigin(aParent, origin, rpId);
   if (NS_WARN_IF(rv.Failed())) {
     promise->MaybeReject(rv);
@@ -511,48 +514,55 @@ WebAuthnManager::MakeCredential(nsPIDOMW
   mInfo = Some(info);
   ListenForVisibilityEvents(aParent, this);
 
   return promise.forget();
 }
 
 void
 WebAuthnManager::StartRegister() {
+  MOZ_ASSERT(NS_IsMainThread());
+
   if (mChild) {
     mChild->SendRequestRegister(mInfo.ref());
   }
 }
 
 void
 WebAuthnManager::StartSign() {
+  MOZ_ASSERT(NS_IsMainThread());
+
   if (mChild) {
     mChild->SendRequestSign(mInfo.ref());
   }
 }
 
 void
 WebAuthnManager::StartCancel() {
+  MOZ_ASSERT(NS_IsMainThread());
+
   if (mChild) {
     mChild->SendRequestCancel();
   }
 }
 
 already_AddRefed<Promise>
 WebAuthnManager::GetAssertion(nsPIDOMWindowInner* aParent,
                               const PublicKeyCredentialRequestOptions& aOptions)
 {
+  MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aParent);
 
   MaybeClearTransaction();
 
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aParent);
 
   ErrorResult rv;
   RefPtr<Promise> promise = Promise::Create(global, rv);
-  if(rv.Failed()) {
+  if (rv.Failed()) {
     return nullptr;
   }
 
   nsString origin;
   nsCString rpId;
   rv = GetOrigin(aParent, origin, rpId);
   if (NS_WARN_IF(rv.Failed())) {
     promise->MaybeReject(rv);
@@ -685,16 +695,17 @@ WebAuthnManager::GetAssertion(nsPIDOMWin
   ListenForVisibilityEvents(aParent, this);
 
   return promise.forget();
 }
 
 void
 WebAuthnManager::FinishMakeCredential(nsTArray<uint8_t>& aRegBuffer)
 {
+  MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mTransactionPromise);
   MOZ_ASSERT(mInfo.isSome());
 
   CryptoBuffer regData;
   if (NS_WARN_IF(!regData.Assign(aRegBuffer.Elements(), aRegBuffer.Length()))) {
     Cancel(NS_ERROR_OUT_OF_MEMORY);
     return;
   }
@@ -808,16 +819,17 @@ WebAuthnManager::FinishMakeCredential(ns
   mTransactionPromise->MaybeResolve(credential);
   MaybeClearTransaction();
 }
 
 void
 WebAuthnManager::FinishGetAssertion(nsTArray<uint8_t>& aCredentialId,
                                     nsTArray<uint8_t>& aSigBuffer)
 {
+  MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mTransactionPromise);
   MOZ_ASSERT(mInfo.isSome());
 
   CryptoBuffer tokenSignatureData;
   if (NS_WARN_IF(!tokenSignatureData.Assign(aSigBuffer.Elements(),
                                             aSigBuffer.Length()))) {
     Cancel(NS_ERROR_OUT_OF_MEMORY);
     return;
@@ -900,16 +912,17 @@ WebAuthnManager::Cancel(const nsresult& 
   }
 
   MaybeClearTransaction();
 }
 
 NS_IMETHODIMP
 WebAuthnManager::HandleEvent(nsIDOMEvent* aEvent)
 {
+  MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aEvent);
 
   nsAutoString type;
   aEvent->GetType(type);
   if (!type.Equals(kVisibilityChange)) {
     return NS_ERROR_FAILURE;
   }
 
@@ -949,19 +962,21 @@ WebAuthnManager::ActorCreated(PBackgroun
   MOZ_ASSERT(constructedMgr == mgr);
   mChild = mgr.forget();
   mPBackgroundCreationPromise.Resolve(NS_OK, __func__);
 }
 
 void
 WebAuthnManager::ActorDestroyed()
 {
+  MOZ_ASSERT(NS_IsMainThread());
   mChild = nullptr;
 }
 
 void
 WebAuthnManager::ActorFailed()
 {
+  MOZ_ASSERT(NS_IsMainThread());
   MOZ_CRASH("We shouldn't be here!");
 }
 
 }
 }
--- a/dom/webidl/ChromeUtils.webidl
+++ b/dom/webidl/ChromeUtils.webidl
@@ -96,16 +96,25 @@ interface ChromeUtils : ThreadSafeChrome
    * target compartment (or the caller compartment if no target is provided).
    * Property values themeselves are not cloned.
    *
    * Ignores non-enumerable properties, properties on prototypes, and properties
    * with getters or setters.
    */
   [Throws]
   static object shallowClone(object obj, optional object? target = null);
+
+  /**
+   * Dispatches the given callback to the main thread when it would be
+   * otherwise idle. Similar to Window.requestIdleCallback, but not bound to a
+   * particular DOM windw.
+   */
+  [Throws]
+  static void idleDispatch(IdleRequestCallback callback,
+                           optional IdleRequestOptions options);
 };
 
 /**
  * Used by principals and the script security manager to represent origin
  * attributes. The first dictionary is designed to contain the full set of
  * OriginAttributes, the second is used for pattern-matching (i.e. does this
  * OriginAttributesDictionary match the non-empty attributes in this pattern).
  *
--- a/dom/webidl/IdleDeadline.webidl
+++ b/dom/webidl/IdleDeadline.webidl
@@ -2,13 +2,14 @@
 /* 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/.
  *
  * The origin of this IDL file is:
  * https://w3c.github.io/requestidlecallback/
  */
 
-[Func="nsGlobalWindow::IsRequestIdleCallbackEnabled"]
+[Exposed=(Window,System),
+ Func="nsGlobalWindow::IsRequestIdleCallbackEnabled"]
 interface IdleDeadline {
   DOMHighResTimeStamp timeRemaining();
   readonly attribute boolean didTimeout;
 };
new file mode 100644
--- /dev/null
+++ b/dom/workers/test/crashtests/1348882.html
@@ -0,0 +1,18 @@
+<!DOCTYPE>
+<html>
+<head>
+<meta charset="UTF-8">
+<script>
+function boom() {
+  let r = new Request("#a#a");
+  setTimeout(function(){
+    r.formData();
+    setTimeout(function(){
+      r.blob();
+    }, 0);
+  }, 0);
+}
+addEventListener("DOMContentLoaded", boom);
+</script>
+</head>
+</html>
--- a/dom/workers/test/crashtests/crashtests.list
+++ b/dom/workers/test/crashtests/crashtests.list
@@ -1,5 +1,6 @@
 load 779707.html
 load 943516.html
 load 1153636.html
 load 1158031.html
 load 1228456.html
+load 1348882.html
--- a/dom/xul/templates/nsIXULTemplateBuilder.idl
+++ b/dom/xul/templates/nsIXULTemplateBuilder.idl
@@ -1,25 +1,29 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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 "domstubs.idl"
 
-interface nsAtom;  // not a real interface; used in [noscript] methods only
 interface nsIContent;
 interface nsIXULBuilderListener;
 interface nsIXULTemplateResult;
 interface nsIXULTemplateRuleFilter;
 interface nsIXULTemplateQueryProcessor;
 interface nsIRDFResource;
 interface nsIRDFCompositeDataSource;
 interface nsIDOMDataTransfer;
 
+%{C++
+class nsAtom;
+%}
+[ptr] native nsAtomPtr(nsAtom);
+
 /**
  * A template builder, given an input source of data, a template, and a
  * reference point, generates a list of results from the input, and copies
  * part of the template for each result. Templates may generate content
  * recursively, using the same template, but with the previous iteration's
  * results as the reference point. As an example, for an XML datasource the
  * initial reference point would be a specific node in the DOM tree and a
  * template might generate a list of all child nodes. For the next iteration,
@@ -263,17 +267,17 @@ interface nsIXULTemplateBuilder : nsISup
      * intended to be called only by the RDF query processor. If aTag is set,
      * the content must have a tag name that matches aTag. aTag may be ignored
      * for builders that don't generate real DOM content.
      *
      * @param aNode node to check
      * @param aTag tag that must match
      */
     [noscript] boolean hasGeneratedContent(in nsIRDFResource aNode,
-                                           in nsAtom aTag);
+                                           in nsAtomPtr aTag);
 
     /**
      * Adds a rule filter for a given rule, which may be used for specialized
      * rule filtering. Any existing filter on the rule is removed. The default
      * conditions specified inside the <rule> tag are applied before the
      * rule filter is applied, meaning that the filter may be used to further
      * filter out results but not reaccept results that have already been
      * rejected.
--- a/dom/xul/templates/nsIXULTemplateQueryProcessor.idl
+++ b/dom/xul/templates/nsIXULTemplateQueryProcessor.idl
@@ -1,22 +1,26 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "domstubs.idl"
 
-interface nsAtom;  // not a real interface; used in [noscript] methods only
 interface nsIArray;
 interface nsISimpleEnumerator;
 interface nsIXULTemplateResult;
 interface nsIXULTemplateRuleFilter;
 interface nsIXULTemplateBuilder;
 
+%{C++
+class nsAtom;
+%}
+[ptr] native nsAtomPtr(nsAtom);
+
 /**
  * A query processor takes a template query and generates results for it given
  * a datasource and a reference point. There is a one-to-one relationship
  * between a template builder and a query processor. The template builder
  * creates the query processor, and there is no other means to retrieve it.
  *
  * A template query is the contents inside a <query> element within the
  * template. The actual syntax is opaque to the template builder and defined
@@ -159,18 +163,18 @@ interface nsIXULTemplateQueryProcessor :
    * @param aQuery <query> node to compile
    * @param aRefVariable the reference variable
    * @param aMemberVariable the member variable
    *
    * @returns a compiled query object
    */
   [noscript] nsISupports compileQuery(in nsIXULTemplateBuilder aBuilder,
                                       in nsIDOMNode aQuery,
-                                      in nsAtom aRefVariable,
-                                      in nsAtom aMemberVariable);
+                                      in nsAtomPtr aRefVariable,
+                                      in nsAtomPtr aMemberVariable);
 
   /**
    * Generate the results of a query and return them in an enumerator. The
    * enumerator must contain nsIXULTemplateResult objects. If there are no
    * results, an empty enumerator must be returned.
    *
    * The datasource will be the same as the one passed to the earlier
    * initializeForBuilding method. The context reference (aRef) is a reference
@@ -218,18 +222,18 @@ interface nsIXULTemplateQueryProcessor :
    * the syntax '+2' to mean add two to the reference.
    *
    * @param aRuleNode rule to add the binding to
    * @param aVar variable that will be bound
    * @param aRef variable that holds reference value
    * @param aExpr expression used to compute the value to assign
    */
   [noscript] void addBinding(in nsIDOMNode aRuleNode,
-                             in nsAtom aVar,
-                             in nsAtom aRef,
+                             in nsAtomPtr aVar,
+                             in nsAtomPtr aRef,
                              in AString aExpr);
 
   /**
    * Translate a ref attribute string into a result. This is used as the
    * reference point by the template builder when generating the first level
    * of content. For recursive generation, the result from the parent
    * generation phase will be used directly as the reference so a translation
    * is not needed. This allows all levels to be generated using objects that
@@ -266,11 +270,11 @@ interface nsIXULTemplateQueryProcessor :
    * @param aLeft the left result to compare
    * @param aRight the right result to compare
    * @param aVar variable to compare
    *
    * @param returns -1 if less, 0 if equal, or 1 if greater
    */
    [noscript] int32_t compareResults(in nsIXULTemplateResult aLeft,
                                      in nsIXULTemplateResult aRight,
-                                     in nsAtom aVar,
+                                     in nsAtomPtr aVar,
                                      in unsigned long aSortHints);
 };
--- a/dom/xul/templates/nsIXULTemplateResult.idl
+++ b/dom/xul/templates/nsIXULTemplateResult.idl
@@ -1,19 +1,23 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "nsISupports.idl"
 
-interface nsAtom;  // not a real interface; used in [noscript] methods only
 interface nsIDOMNode;
 interface nsIRDFResource;
 
+%{C++
+class nsAtom;
+%}
+[ptr] native nsAtomPtr(nsAtom);
+
 /**
  * A single result generated from a template query. Each result is identified
  * by an id, which must be unique within the set of results produced from a
  * query. The result may optionally be identified by an RDF resource.
  *
  * Generally, the result and its id will be able to uniquely identify a node
  * in the source data, such as an RDF or XML node. In other contexts, such as
  * a database query, a result would represent a particular record.
@@ -75,30 +79,30 @@ interface nsIXULTemplateResult : nsISupp
    * attribute within the action body, it will be replaced with the result
    * of this method. The question mark is considered part of the variable
    * name, thus aVar should be ?name and not simply name.
    *
    * @param aVar the variable to look up
    *
    * @return the value for the variable or a null string if it has no value
    */
-  [noscript] AString getBindingFor(in nsAtom aVar);
+  [noscript] AString getBindingFor(in nsAtomPtr aVar);
 
   /**
    * Get an object value for a variable such as ?name for this result. 
    *
    * This method may return null for a variable, even if getBindingFor returns
    * a non-null value for the same variable. This method is provided as a
    * convenience when sorting results.
    *
    * @param aVar the variable to look up
    *
    * @return the value for the variable or null if it has no value
    */
-  [noscript] nsISupports getBindingObjectFor(in nsAtom aVar);
+  [noscript] nsISupports getBindingObjectFor(in nsAtomPtr aVar);
 
   /**
    * Indicate that a particular rule of a query has matched and that output
    * will be generated for it. Both the query as compiled by the query
    * processor's compileQuery method and the XUL <rule> element are supplied.
    * The query must always be one that was compiled by the query processor
    * that created this result. The <rule> element must always be a child of
    * the <query> element that was used to compile the query.
new file mode 100644
--- /dev/null
+++ b/editor/libeditor/crashtests/1383747.html
@@ -0,0 +1,15 @@
+<html>
+  <head>
+    <script>
+      try { o1 = window.getSelection() } catch(e) { }
+      try { o2 = document.createElement('map') } catch(e) { };
+      try { o3 = document.createElement('select') } catch(e) { }
+      try { document.documentElement.appendChild(o2) } catch(e) { };
+      try { o2.contentEditable = 'true' } catch(e) { };
+      try { o2.offsetTop } catch(e) { };
+      try { document.replaceChild(document.implementation.createHTMLDocument().documentElement, document.documentElement); } catch(e) { }
+      try { document.documentElement.appendChild(o3) } catch(e) { }
+      try { o1.modify('extend', 'forward', 'word') } catch(e) { }
+    </script>
+  </head>
+</html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/editor/libeditor/crashtests/1383763.html
@@ -0,0 +1,17 @@
+<xsl:stylesheet id='xsl'>
+<script id='script'>
+try { o1 = document.createElement('table') } catch(e) { }
+try { o3 = document.createElement('area') } catch(e) { }
+try { o4 = document.createElement('script'); } catch(e) { }
+try { o5 = document.getSelection() } catch(e) { }
+try { document.implementation.createDocument('', '', null).adoptNode(o1); } catch(e) { }
+try { o1.appendChild(o3) } catch(e) { }
+try { o5.addRange(new Range()); } catch(e) { }
+try { document.documentElement.appendChild(o4) } catch(e) { }
+try { o4.textContent = 'XX' } catch(e) { }
+try { o7 = o4.firstChild } catch(e) { }
+try { o4.parentNode.insertBefore(o7, o4); } catch(e) { }
+try { o5.modify('extend', 'forward', 'line') } catch(e) { }
+try { o5.selectAllChildren(o3) } catch(e) { }
+try { o7.splitText(1) } catch(e) { }
+</script>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/editor/libeditor/crashtests/1384161.html
@@ -0,0 +1,17 @@
+<html>
+  <head>
+    <script>
+      try { o1 = document.createElement('caption') } catch(e) { }
+      try { o2 = document.createElement('select') } catch(e) { }
+      try { o3 = document.createElement('map') } catch(e) { }
+      try { o4 = window.getSelection() } catch(e) { }
+      try { document.documentElement.appendChild(o1) } catch(e) { }
+      try { o1.style.display = 'contents' } catch(e) { }
+      try { document.prepend(o2, document) } catch(e) { }
+      try { document.designMode = 'on'; } catch(e) { }
+      try { o3.ownerDocument.execCommand('outdent', false, null) } catch(e) { }
+      try { document.designMode = 'off'; } catch(e) { }
+      try { o4.extend(o2, 0) } catch(e) { }
+    </script>
+  </head>
+</html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/editor/libeditor/crashtests/1393171.html
@@ -0,0 +1,10 @@
+<script>
+window.onload=function(){
+  window.getSelection().addRange(document.createRange());
+  document.getElementById('a').appendChild(document.createElement('option'));
+  window.getSelection().modify('extend','backward','lineboundary');
+}
+</script>
+<div></div>
+<textarea autofocus='true'></textarea>
+<del id='a'>
--- a/editor/libeditor/crashtests/crashtests.list
+++ b/editor/libeditor/crashtests/crashtests.list
@@ -75,13 +75,17 @@ load 1324505.html
 needs-focus load 1343918.html
 load 1345015.html
 load 1348851.html
 load 1350772.html
 load 1364133.html
 load 1366176.html
 load 1375131.html
 load 1381541.html
+load 1383747.html
 load 1383755.html
+load 1383763.html
+load 1384161.html
 load 1388075.html
+load 1393171.html
 load 1402469.html
 load 1402904.html
 load 1405747.html
--- a/gfx/harfbuzz/src/hb-shape-plan.cc
+++ b/gfx/harfbuzz/src/hb-shape-plan.cc
@@ -515,25 +515,27 @@ hb_shape_plan_create_cached2 (hb_face_t 
 
     if (unlikely (!proposal.shaper_func))
       return hb_shape_plan_get_empty ();
   }
 
 
 retry:
   hb_face_t::plan_node_t *cached_plan_nodes = (hb_face_t::plan_node_t *) hb_atomic_ptr_get (&face->shape_plans);
-  for (hb_face_t::plan_node_t *node = cached_plan_nodes; node; node = node->next)
-    if (hb_shape_plan_matches (node->shape_plan, &proposal))
-    {
-      DEBUG_MSG_FUNC (SHAPE_PLAN, node->shape_plan, "fulfilled from cache");
-      return hb_shape_plan_reference (node->shape_plan);
-    }
+
+  /* Don't look for plan in the cache if there were variation coordinates XXX Fix me. */
+  if (!hb_coords_present (coords, num_coords))
+    for (hb_face_t::plan_node_t *node = cached_plan_nodes; node; node = node->next)
+      if (hb_shape_plan_matches (node->shape_plan, &proposal))
+      {
+        DEBUG_MSG_FUNC (SHAPE_PLAN, node->shape_plan, "fulfilled from cache");
+        return hb_shape_plan_reference (node->shape_plan);
+      }
 
   /* Not found. */
-
   hb_shape_plan_t *shape_plan = hb_shape_plan_create2 (face, props,
 						       user_features, num_user_features,
 						       coords, num_coords,
 						       shaper_list);
 
   /* Don't add to the cache if face is inert. */
   if (unlikely (hb_object_is_inert (face)))
     return shape_plan;
--- a/gfx/layers/ipc/PWebRenderBridge.ipdl
+++ b/gfx/layers/ipc/PWebRenderBridge.ipdl
@@ -54,16 +54,19 @@ parent:
                        WebRenderScrollData aScrollData,
                        OpUpdateResource[] aResourceUpdates, Shmem[] aSmallShmems, Shmem[] aLargeShmems,
                        IdNamespace aIdNamespace, TimeStamp txnStartTime, TimeStamp fwdTime);
   sync SetDisplayListSync(IntSize aSize, WebRenderParentCommand[] commands, OpDestroy[] toDestroy, uint64_t fwdTransactionId, uint64_t transactionId,
                           LayoutSize aContentSize, ByteBuffer aDL, BuiltDisplayListDescriptor aDLDesc,
                           WebRenderScrollData aScrollData,
                           OpUpdateResource[] aResourceUpdates, Shmem[] aSmallShmems, Shmem[] aLargeShmems,
                           IdNamespace aIdNamespace, TimeStamp txnStartTime, TimeStamp fwdTime);
+  async EmptyTransaction(FocusTarget focusTarget,
+                         WebRenderParentCommand[] commands, OpDestroy[] toDestroy, uint64_t fwdTransactionId, uint64_t transactionId,
+                         IdNamespace aIdNamespace, TimeStamp txnStartTime, TimeStamp fwdTime);
   async SetFocusTarget(FocusTarget focusTarget);
   async UpdateResources(OpUpdateResource[] aResourceUpdates, Shmem[] aSmallShmems, Shmem[] aLargeShmems);
   async ParentCommands(WebRenderParentCommand[] commands);
   sync GetSnapshot(PTexture texture);
   async AddPipelineIdForCompositable(PipelineId aImageId, CompositableHandle aHandle, bool aAsync);
   async RemovePipelineIdForCompositable(PipelineId aPipelineId);
   async AddExternalImageIdForCompositable(ExternalImageId aImageId, CompositableHandle aHandle);
   async RemoveExternalImageId(ExternalImageId aImageId);
--- a/gfx/layers/wr/IpcResourceUpdateQueue.cpp
+++ b/gfx/layers/wr/IpcResourceUpdateQueue.cpp
@@ -36,20 +36,28 @@ ShmSegmentsWriter::Write(Range<uint8_t> 
     memcpy(dstPtr, aBytes.begin().get(), length);
     return range;
   }
 
   int remainingBytesToCopy = length;
 
   size_t srcCursor = 0;
   size_t dstCursor = mCursor;
+  size_t currAllocLen = mSmallAllocs.Length();
 
   while (remainingBytesToCopy > 0) {
     if (dstCursor >= mSmallAllocs.Length() * mChunkSize) {
-      AllocChunk();
+      if (!AllocChunk()) {
+        for (size_t i = mSmallAllocs.Length() ; currAllocLen <= i ; i--) {
+          ipc::Shmem shm = mSmallAllocs.ElementAt(i);
+          mShmAllocator->DeallocShmem(shm);
+          mSmallAllocs.RemoveElementAt(i);
+        }
+        return layers::OffsetRange(0, start, 0);
+      }
       continue;
     }
 
     const size_t dstMaxOffset = mChunkSize * mSmallAllocs.Length();
     const size_t dstBaseOffset = mChunkSize * (mSmallAllocs.Length() - 1);
 
     MOZ_ASSERT(dstCursor >= dstBaseOffset);
     MOZ_ASSERT(dstCursor <= dstMaxOffset);
@@ -70,36 +78,39 @@ ShmSegmentsWriter::Write(Range<uint8_t> 
     MOZ_ASSERT(remainingBytesToCopy >= 0);
   }
 
   mCursor += length;
 
   return layers::OffsetRange(0, start, length);
 }
 
-void
+bool
 ShmSegmentsWriter::AllocChunk()
 {
   ipc::Shmem shm;
   auto shmType = ipc::SharedMemory::SharedMemoryType::TYPE_BASIC;
   if (!mShmAllocator->AllocShmem(mChunkSize, shmType, &shm)) {
-    gfxCriticalError() << "ShmSegmentsWriter failed to allocate chunk #" << mSmallAllocs.Length();
-    MOZ_CRASH();
+    gfxCriticalNote << "ShmSegmentsWriter failed to allocate chunk #" << mSmallAllocs.Length();
+    MOZ_ASSERT(false, "ShmSegmentsWriter fails to allocate chunk");
+    return false;
   }
   mSmallAllocs.AppendElement(shm);
+  return true;
 }
 
 layers::OffsetRange
 ShmSegmentsWriter::AllocLargeChunk(size_t aSize)
 {
   ipc::Shmem shm;
   auto shmType = ipc::SharedMemory::SharedMemoryType::TYPE_BASIC;
   if (!mShmAllocator->AllocShmem(aSize, shmType, &shm)) {
-    gfxCriticalError() << "ShmSegmentsWriter failed to allocate large chunk of size " << aSize;
-    MOZ_CRASH();
+    gfxCriticalNote << "ShmSegmentsWriter failed to allocate large chunk of size " << aSize;
+    MOZ_ASSERT(false, "ShmSegmentsWriter fails to allocate large chunk");
+    return layers::OffsetRange(0, 0, 0);
   }
   mLargeAllocs.AppendElement(shm);
 
   return layers::OffsetRange(mLargeAllocs.Length(), 0, aSize);
 }
 
 void
 ShmSegmentsWriter::Flush(nsTArray<ipc::Shmem>& aSmallAllocs, nsTArray<ipc::Shmem>& aLargeAllocs)
@@ -217,67 +228,87 @@ ShmSegmentsReader::Read(const layers::Of
   return aInto.Length() - initialLength == aRange.length();
 }
 
 IpcResourceUpdateQueue::IpcResourceUpdateQueue(ipc::IShmemAllocator* aAllocator,
                                                size_t aChunkSize)
 : mWriter(Move(aAllocator), aChunkSize)
 {}
 
-void
+bool
 IpcResourceUpdateQueue::AddImage(ImageKey key, const ImageDescriptor& aDescriptor,
                                  Range<uint8_t> aBytes)
 {
   auto bytes = mWriter.Write(aBytes);
+  if (!bytes.length()) {
+    return false;
+  }
   mUpdates.AppendElement(layers::OpAddImage(aDescriptor, bytes, 0, key));
+  return true;
 }
 
-void
+bool
 IpcResourceUpdateQueue::AddBlobImage(ImageKey key, const ImageDescriptor& aDescriptor,
                                      Range<uint8_t> aBytes)
 {
   auto bytes = mWriter.Write(aBytes);
+  if (!bytes.length()) {
+    return false;
+  }
   mUpdates.AppendElement(layers::OpAddBlobImage(aDescriptor, bytes, 0, key));
+  return true;
 }
 
 void
 IpcResourceUpdateQueue::AddExternalImage(wr::ExternalImageId aExtId, wr::ImageKey aKey)
 {
   mUpdates.AppendElement(layers::OpAddExternalImage(aExtId, aKey));
 }
 
-void
+bool
 IpcResourceUpdateQueue::UpdateImageBuffer(ImageKey aKey,
                                           const ImageDescriptor& aDescriptor,
                                           Range<uint8_t> aBytes)
 {
   auto bytes = mWriter.Write(aBytes);
+  if (!bytes.length()) {
+    return false;
+  }
   mUpdates.AppendElement(layers::OpUpdateImage(aDescriptor, bytes, aKey));
+  return true;
 }
 
-void
+bool
 IpcResourceUpdateQueue::UpdateBlobImage(ImageKey aKey,
                                         const ImageDescriptor& aDescriptor,
                                         Range<uint8_t> aBytes)
 {
   auto bytes = mWriter.Write(aBytes);
+  if (!bytes.length()) {
+    return false;
+  }
   mUpdates.AppendElement(layers::OpUpdateBlobImage(aDescriptor, bytes, aKey));
+  return true;
 }
 
 void
 IpcResourceUpdateQueue::DeleteImage(ImageKey aKey)
 {
   mUpdates.AppendElement(layers::OpDeleteImage(aKey));
 }
 
-void
+bool
 IpcResourceUpdateQueue::AddRawFont(wr::FontKey aKey, Range<uint8_t> aBytes, uint32_t aIndex)
 {
   auto bytes = mWriter.Write(aBytes);
+  if (!bytes.length()) {
+    return false;
+  }
   mUpdates.AppendElement(layers::OpAddRawFont(bytes, aIndex, aKey));
+  return true;
 }
 
 void
 IpcResourceUpdateQueue::DeleteFont(wr::FontKey aKey)
 {
   mUpdates.AppendElement(layers::OpDeleteFont(aKey));
 }
 
--- a/gfx/layers/wr/IpcResourceUpdateQueue.h
+++ b/gfx/layers/wr/IpcResourceUpdateQueue.h
@@ -29,17 +29,17 @@ public:
     return Write(Range<uint8_t>((uint8_t*)aValues.begin().get(), aValues.length() * sizeof(T)));
   }
 
   void Flush(nsTArray<ipc::Shmem>& aSmallAllocs, nsTArray<ipc::Shmem>& aLargeAllocs);
 
   void Clear();
 
 protected:
-  void AllocChunk();
+  bool AllocChunk();
   layers::OffsetRange AllocLargeChunk(size_t aSize);
 
   nsTArray<ipc::Shmem> mSmallAllocs;
   nsTArray<ipc::Shmem> mLargeAllocs;
   ipc::IShmemAllocator* mShmAllocator;
   size_t mCursor;
   size_t mChunkSize;
 };
@@ -62,43 +62,43 @@ protected:
 class IpcResourceUpdateQueue {
 public:
   // Because we are using shmems, the size should be a multiple of the page size.
   // Each shmem has two guard pages, and the minimum shmem size (at least one Windows)
   // is 64k which is already quite large for a lot of the resources we use here.
   // So we pick 64k - 2 * 4k = 57344 bytes as the defautl alloc
   explicit IpcResourceUpdateQueue(ipc::IShmemAllocator* aAllocator, size_t aChunkSize = 57344);
 
-  void AddImage(wr::ImageKey aKey,
+  bool AddImage(wr::ImageKey aKey,
                 const ImageDescriptor& aDescriptor,
                 Range<uint8_t> aBytes);
 
-  void AddBlobImage(wr::ImageKey aKey,
+  bool AddBlobImage(wr::ImageKey aKey,
                     const ImageDescriptor& aDescriptor,
                     Range<uint8_t> aBytes);
 
   void AddExternalImage(wr::ExternalImageId aExtId, wr::ImageKey aKey);
 
-  void UpdateImageBuffer(wr::ImageKey aKey,
+  bool UpdateImageBuffer(wr::ImageKey aKey,
                          const ImageDescriptor& aDescriptor,
                          Range<uint8_t> aBytes);
 
-  void UpdateBlobImage(wr::ImageKey aKey,
+  bool UpdateBlobImage(wr::ImageKey aKey,
                        const ImageDescriptor& aDescriptor,
                        Range<uint8_t> aBytes);
 
   void UpdateExternalImage(ImageKey aKey,
                            const ImageDescriptor& aDescriptor,
                            ExternalImageId aExtID,
                            wr::WrExternalImageBufferType aBufferType,
                            uint8_t aChannelIndex = 0);
 
   void DeleteImage(wr::ImageKey aKey);
 
-  void AddRawFont(wr::FontKey aKey, Range<uint8_t> aBytes, uint32_t aIndex);
+  bool AddRawFont(wr::FontKey aKey, Range<uint8_t> aBytes, uint32_t aIndex);
 
   void DeleteFont(wr::FontKey aKey);
 
   void AddFontInstance(wr::FontInstanceKey aKey,
                        wr::FontKey aFontKey,
                        float aGlyphSize,
                        const wr::FontInstanceOptions* aOptions,
                        const wr::FontInstancePlatformOptions* aPlatformOptions,
--- a/gfx/layers/wr/WebRenderBridgeChild.cpp
+++ b/gfx/layers/wr/WebRenderBridgeChild.cpp
@@ -153,16 +153,38 @@ WebRenderBridgeChild::EndTransaction(con
   }
 
   mParentCommands.Clear();
   mDestroyedActors.Clear();
   mIsInTransaction = false;
 }
 
 void
+WebRenderBridgeChild::EndEmptyTransaction(const FocusTarget& aFocusTarget,
+                                          uint64_t aTransactionId,
+                                          const mozilla::TimeStamp& aTxnStartTime)
+{
+  MOZ_ASSERT(!mDestroyed);
+  MOZ_ASSERT(mIsInTransaction);
+
+  TimeStamp fwdTime;
+#if defined(ENABLE_FRAME_LATENCY_LOG)
+  fwdTime = TimeStamp::Now();
+#endif
+
+  this->SendEmptyTransaction(aFocusTarget,
+                             mParentCommands, mDestroyedActors,
+                             GetFwdTransactionId(), aTransactionId,
+                             mIdNamespace, aTxnStartTime, fwdTime);
+  mParentCommands.Clear();
+  mDestroyedActors.Clear();
+  mIsInTransaction = false;
+}
+
+void
 WebRenderBridgeChild::ProcessWebRenderParentCommands()
 {
   MOZ_ASSERT(!mDestroyed);
 
   if (mParentCommands.IsEmpty()) {
     return;
   }
   this->SendParentCommands(mParentCommands);
--- a/gfx/layers/wr/WebRenderBridgeChild.h
+++ b/gfx/layers/wr/WebRenderBridgeChild.h
@@ -70,16 +70,19 @@ public:
   void BeginTransaction();
   void EndTransaction(const wr::LayoutSize& aContentSize,
                       wr::BuiltDisplayList& dl,
                       wr::IpcResourceUpdateQueue& aResources,
                       const gfx::IntSize& aSize,
                       bool aIsSync, uint64_t aTransactionId,
                       const WebRenderScrollData& aScrollData,
                       const mozilla::TimeStamp& aTxnStartTime);
+  void EndEmptyTransaction(const FocusTarget& aFocusTarget,
+                           uint64_t aTransactionId,
+                           const mozilla::TimeStamp& aTxnStartTime);
   void ProcessWebRenderParentCommands();
 
   CompositorBridgeChild* GetCompositorBridgeChild();
 
   wr::PipelineId GetPipeline() { return mPipelineId; }
 
   // KnowsCompositor
   TextureForwarder* GetTextureForwarder() override;
--- a/gfx/layers/wr/WebRenderBridgeParent.cpp
+++ b/gfx/layers/wr/WebRenderBridgeParent.cpp
@@ -610,16 +610,58 @@ WebRenderBridgeParent::RecvSetDisplayLis
   return RecvSetDisplayList(aSize, Move(aCommands), Move(aToDestroy),
                             aFwdTransactionId, aTransactionId,
                             aContentSize, dl, dlDesc, aScrollData,
                             Move(aResourceUpdates), Move(aSmallShmems), Move(aLargeShmems),
                             aIdNamespace, aTxnStartTime, aFwdTime);
 }
 
 mozilla::ipc::IPCResult
+WebRenderBridgeParent::RecvEmptyTransaction(const FocusTarget& aFocusTarget,
+                                            InfallibleTArray<WebRenderParentCommand>&& aCommands,
+                                            InfallibleTArray<OpDestroy>&& aToDestroy,
+                                            const uint64_t& aFwdTransactionId,
+                                            const uint64_t& aTransactionId,
+                                            const wr::IdNamespace& aIdNamespace,
+                                            const TimeStamp& aTxnStartTime,
+                                            const TimeStamp& aFwdTime)
+{
+  if (mDestroyed) {
+    for (const auto& op : aToDestroy) {
+      DestroyActor(op);
+    }
+    return IPC_OK();
+  }
+
+  AutoProfilerTracing tracing("Paint", "EmptyTransaction");
+  UpdateFwdTransactionId(aFwdTransactionId);
+  AutoClearReadLocks clearLocks(mReadLocks);
+
+  // This ensures that destroy operations are always processed. It is not safe
+  // to early-return without doing so.
+  AutoWebRenderBridgeParentAsyncMessageSender autoAsyncMessageSender(this, &aToDestroy);
+
+  if (!aCommands.IsEmpty()) {
+    mAsyncImageManager->SetCompositionTime(TimeStamp::Now());
+    ProcessWebRenderParentCommands(aCommands);
+    mCompositorScheduler->ScheduleComposition();
+  }
+
+  mScrollData.SetFocusTarget(aFocusTarget);
+  UpdateAPZ(false);
+
+  // XXX Call DidComposite at correct timing.
+  TimeStamp now = TimeStamp::Now();
+  HoldPendingTransactionId(mWrEpoch, aTransactionId, aTxnStartTime, aFwdTime);
+  mCompositorBridge->DidComposite(wr::AsUint64(mPipelineId), now, now);
+
+  return IPC_OK();
+}
+
+mozilla::ipc::IPCResult
 WebRenderBridgeParent::RecvSetFocusTarget(const FocusTarget& aFocusTarget)
 {
   mScrollData.SetFocusTarget(aFocusTarget);
   UpdateAPZ(false);
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
--- a/gfx/layers/wr/WebRenderBridgeParent.h
+++ b/gfx/layers/wr/WebRenderBridgeParent.h
@@ -101,16 +101,24 @@ public:
                                                  const wr::BuiltDisplayListDescriptor& dlDesc,
                                                  const WebRenderScrollData& aScrollData,
                                                  nsTArray<OpUpdateResource>&& aResourceUpdates,
                                                  nsTArray<ipc::Shmem>&& aSmallShmems,
                                                  nsTArray<ipc::Shmem>&& aLargeShmems,
                                                  const wr::IdNamespace& aIdNamespace,
                                                  const TimeStamp& aTxnStartTime,
                                                  const TimeStamp& aFwdTime) override;
+  mozilla::ipc::IPCResult RecvEmptyTransaction(const FocusTarget& aFocusTarget,
+                                               InfallibleTArray<WebRenderParentCommand>&& aCommands,
+                                               InfallibleTArray<OpDestroy>&& aToDestroy,
+                                               const uint64_t& aFwdTransactionId,
+                                               const uint64_t& aTransactionId,
+                                               const wr::IdNamespace& aIdNamespace,
+                                               const TimeStamp& aTxnStartTime,
+                                               const TimeStamp& aFwdTime) override;
   mozilla::ipc::IPCResult RecvSetFocusTarget(const FocusTarget& aFocusTarget) override;
   mozilla::ipc::IPCResult RecvParentCommands(nsTArray<WebRenderParentCommand>&& commands) override;
   mozilla::ipc::IPCResult RecvGetSnapshot(PTextureParent* aTexture) override;
 
   mozilla::ipc::IPCResult RecvAddPipelineIdForCompositable(const wr::PipelineId& aPipelineIds,
                                                            const CompositableHandle& aHandle,
                                                            const bool& aAsync) override;
   mozilla::ipc::IPCResult RecvRemovePipelineIdForCompositable(const wr::PipelineId& aPipelineId) override;
--- a/gfx/layers/wr/WebRenderCommandBuilder.cpp
+++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ -27,16 +27,33 @@ namespace layers {
 
 void WebRenderCommandBuilder::Destroy()
 {
   mLastCanvasDatas.Clear();
   RemoveUnusedAndResetWebRenderUserData();
 }
 
 void
+WebRenderCommandBuilder::EmptyTransaction()
+{
+  // We need to update canvases that might have changed.
+  for (auto iter = mLastCanvasDatas.Iter(); !iter.Done(); iter.Next()) {
+    RefPtr<WebRenderCanvasData> canvasData = iter.Get()->GetKey();
+    WebRenderCanvasRendererAsync* canvas = canvasData->GetCanvasRenderer();
+    canvas->UpdateCompositableClient();
+  }
+}
+
+bool
+WebRenderCommandBuilder::NeedsEmptyTransaction()
+{
+  return !mLastCanvasDatas.IsEmpty();
+}
+
+void
 WebRenderCommandBuilder::BuildWebRenderCommands(wr::DisplayListBuilder& aBuilder,
                                                 wr::IpcResourceUpdateQueue& aResourceUpdates,
                                                 nsDisplayList* aDisplayList,
                                                 nsDisplayListBuilder* aDisplayListBuilder,
                                                 WebRenderScrollData& aScrollData,
                                                 wr::LayoutSize& aContentSize)
 {
   { // scoping for StackingContextHelper RAII
@@ -494,17 +511,19 @@ WebRenderCommandBuilder::GenerateFallbac
       RefPtr<gfx::DrawTarget> dt = gfx::Factory::CreateRecordingDrawTarget(recorder, dummyDt, paintSize.ToUnknownSize());
       PaintItemByDrawTarget(aItem, dt, paintRect, offset, aDisplayListBuilder,
                             fallbackData->mBasicLayerManager, mManager, scale);
       recorder->Finish();
 
       Range<uint8_t> bytes((uint8_t*)recorder->mOutputStream.mData, recorder->mOutputStream.mLength);
       wr::ImageKey key = mManager->WrBridge()->GetNextImageKey();
       wr::ImageDescriptor descriptor(paintSize.ToUnknownSize(), 0, dt->GetFormat(), isOpaque);
-      aResources.AddBlobImage(key, descriptor, bytes);
+      if (!aResources.AddBlobImage(key, descriptor, bytes)) {
+        return nullptr;
+      }
       fallbackData->SetKey(key);
     } else {
       fallbackData->CreateImageClientIfNeeded();
       RefPtr<ImageClient> imageClient = fallbackData->GetImageClient();
       RefPtr<ImageContainer> imageContainer = LayerManager::CreateImageContainer();
 
       {
         UpdateImageHelper helper(imageContainer, imageClient, paintSize.ToUnknownSize(), format);
--- a/gfx/layers/wr/WebRenderCommandBuilder.h
+++ b/gfx/layers/wr/WebRenderCommandBuilder.h
@@ -35,16 +35,20 @@ class WebRenderCommandBuilder {
 public:
   explicit WebRenderCommandBuilder(WebRenderLayerManager* aManager)
   : mManager(aManager)
   , mLastAsr(nullptr)
   {}
 
   void Destroy();
 
+  void EmptyTransaction();
+
+  bool NeedsEmptyTransaction();
+
   void BuildWebRenderCommands(wr::DisplayListBuilder& aBuilder,
                               wr::IpcResourceUpdateQueue& aResourceUpdates,
                               nsDisplayList* aDisplayList,
                               nsDisplayListBuilder* aDisplayListBuilder,
                               WebRenderScrollData& aScrollData,
                               wr::LayoutSize& aContentSize);
 
   Maybe<wr::ImageKey> CreateImageKey(nsDisplayItem* aItem,
--- a/gfx/layers/wr/WebRenderLayerManager.cpp
+++ b/gfx/layers/wr/WebRenderLayerManager.cpp
@@ -173,31 +173,48 @@ WebRenderLayerManager::BeginTransaction(
 
 bool
 WebRenderLayerManager::EndEmptyTransaction(EndTransactionFlags aFlags)
 {
   // With the WebRenderLayerManager we reject attempts to set most kind of
   // "pending data" for empty transactions. Any place that attempts to update
   // transforms or scroll offset, for example, will get failure return values
   // back, and will fall back to a full transaction. Therefore the only piece
-  // of "pending" information we need to send in an empty transaction is the
-  // APZ focus state.
-  WrBridge()->SendSetFocusTarget(mFocusTarget);
+  // of "pending" information we need to send in an empty transaction are the
+  // APZ focus state and canvases's CompositableOperations.
+
+  if (aFlags & EndTransactionFlags::END_NO_COMPOSITE && 
+      !mWebRenderCommandBuilder.NeedsEmptyTransaction()) {
+    MOZ_ASSERT(!mTarget);
+    WrBridge()->SendSetFocusTarget(mFocusTarget);
+    return true;
+  }
+
+  LayoutDeviceIntSize size = mWidget->GetClientSize();
+  WrBridge()->BeginTransaction();
+
+  mWebRenderCommandBuilder.EmptyTransaction();
 
-  // We also need to update canvases that might have changed, but this code
-  // as-is causes crashes so comment it out for now.
-  //for (auto iter = mLastCanvasDatas.Iter(); !iter.Done(); iter.Next()) {
-  //  RefPtr<WebRenderCanvasData> canvasData = iter.Get()->GetKey();
-  //  WebRenderCanvasRendererAsync* canvas = canvasData->GetCanvasRenderer();
-  //  canvas->UpdateCompositableClient();
-  //}
+  WrBridge()->ClearReadLocks();
+
+  mLatestTransactionId = mTransactionIdAllocator->GetTransactionId(/*aThrottle*/ true);
+  TimeStamp transactionStart = mTransactionIdAllocator->GetTransactionStart();
 
-  if (!(aFlags & EndTransactionFlags::END_NO_COMPOSITE)) {
-    ScheduleComposite();
+  // Skip the synchronization for buffer since we also skip the painting during
+  // device-reset status.
+  if (!gfxPlatform::GetPlatform()->DidRenderingDeviceReset()) {
+    if (WrBridge()->GetSyncObject() &&
+        WrBridge()->GetSyncObject()->IsSyncObjectValid()) {
+      WrBridge()->GetSyncObject()->Synchronize();
+    }
   }
+
+  WrBridge()->EndEmptyTransaction(mFocusTarget, mLatestTransactionId, transactionStart);
+
+  MakeSnapshotIfRequired(size);
   return true;
 }
 
 /*static*/ int32_t
 PopulateScrollData(WebRenderScrollData& aTarget, Layer* aLayer)
 {
   MOZ_ASSERT(aLayer);
 
new file mode 100644
--- /dev/null
+++ b/gfx/tests/crashtests/1278305.html
@@ -0,0 +1,20 @@
+<html>
+<head>
+<style>
+body {
+  mask: url(#mymask);
+}
+div::after {
+  content: counter(n);
+}
+</style>
+<script>
+window.onload = function(){
+  document.getElementsByTagName('body')[0].animate(
+    [{"transform": "skewy(11rad)"},
+     {"transform": "rotatex(0.125turn)"}],
+    {"fill":"forwards", "iterations": 0.75, "duration": 1});
+};
+</script></head>
+<body><div></div></body>
+</html>
--- a/gfx/tests/crashtests/crashtests.list
+++ b/gfx/tests/crashtests/crashtests.list
@@ -126,13 +126,14 @@ skip-if(webrender&&debug) load 944579.ht
 pref(security.fileuri.strict_origin_policy,false) load 950000.html
 load 1034403-1.html
 load 1056516.html
 load 1205900.html
 load 1134549-1.svg
 load balinese-letter-spacing.html
 load 1216832-1.html
 load 1225125-1.html
+load 1278305.html
 load 1308394.html
 load 1317403-1.html # bug 1331533
 load 1325159-1.html
 load 1331683.html
 skip-if(Android) pref(dom.disable_open_during_load,false) load 1343666.html
--- a/gfx/thebes/gfxHarfBuzzShaper.cpp
+++ b/gfx/thebes/gfxHarfBuzzShaper.cpp
@@ -1278,16 +1278,25 @@ gfxHarfBuzzShaper::Initialize()
                                 HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS);
 
     mHBFont = hb_font_create(mHBFace);
     hb_font_set_funcs(mHBFont, sHBFontFuncs, &mCallbackData, nullptr);
     hb_font_set_ppem(mHBFont, mFont->GetAdjustedSize(), mFont->GetAdjustedSize());
     uint32_t scale = FloatToFixed(mFont->GetAdjustedSize()); // 16.16 fixed-point
     hb_font_set_scale(mHBFont, scale, scale);
 
+    const auto& vars = mFont->GetStyle()->variationSettings;
+    size_t len = vars.Length();
+    if (len > 0) {
+        // Fortunately, the hb_variation_t struct is compatible with our
+        // gfxFontFeature, so we can simply cast here.
+        auto hbVars = reinterpret_cast<const hb_variation_t*>(vars.Elements());
+        hb_font_set_variations(mHBFont, hbVars, len);
+    }
+
     return true;
 }
 
 bool
 gfxHarfBuzzShaper::LoadHmtxTable()
 {
     // Read mNumLongHMetrics from metrics-head table without caching its
     // blob, and preload/cache the metrics table.
--- a/js/src/gc/GCRuntime.h
+++ b/js/src/gc/GCRuntime.h
@@ -29,16 +29,17 @@ class AutoLockGC;
 class AutoLockHelperThreadState;
 class VerifyPreTracer;
 
 namespace gc {
 
 typedef Vector<ZoneGroup*, 4, SystemAllocPolicy> ZoneGroupVector;
 using BlackGrayEdgeVector = Vector<TenuredCell*, 0, SystemAllocPolicy>;
 
+class AutoCallGCCallbacks;
 class AutoMaybeStartBackgroundAllocation;
 class AutoRunParallelTask;
 class AutoTraceSession;
 class MarkingValidator;
 struct MovingTracer;
 class WeakCacheSweepIterator;
 
 enum IncrementalProgress
@@ -1045,16 +1046,20 @@ class GCRuntime
     gcstats::ZoneGCStats scanZonesBeforeGC();
     void collect(bool nonincrementalByAPI, SliceBudget budget, JS::gcreason::Reason reason) JS_HAZ_GC_CALL;
     MOZ_MUST_USE IncrementalResult gcCycle(bool nonincrementalByAPI, SliceBudget& budget,
                                            JS::gcreason::Reason reason);
     bool shouldRepeatForDeadZone(JS::gcreason::Reason reason);
     void incrementalCollectSlice(SliceBudget& budget, JS::gcreason::Reason reason,
                                  AutoLockForExclusiveAccess& lock);
 
+    friend class AutoCallGCCallbacks;
+    void maybeCallBeginCallback();
+    void maybeCallEndCallback();
+
     void pushZealSelectedObjects();
     void purgeRuntime(AutoLockForExclusiveAccess& lock);
     MOZ_MUST_USE bool beginMarkPhase(JS::gcreason::Reason reason, AutoLockForExclusiveAccess& lock);
     bool prepareZonesForCollection(JS::gcreason::Reason reason, bool* isFullOut,
                                    AutoLockForExclusiveAccess& lock);
     bool shouldPreserveJITCode(JSCompartment* comp, int64_t currentTime,
                                JS::gcreason::Reason reason, bool canAllocateMoreCode);
     void traceRuntimeForMajorGC(JSTracer* trc, AutoLockForExclusiveAccess& lock);
@@ -1403,16 +1408,18 @@ class GCRuntime
     ActiveThreadData<bool> deterministicOnly;
     ActiveThreadData<int> incrementalLimit;
 
     ActiveThreadData<Vector<JSObject*, 0, SystemAllocPolicy>> selectedForMarking;
 #endif
 
     ActiveThreadData<bool> fullCompartmentChecks;
 
+    ActiveThreadData<uint32_t> gcBeginCallbackDepth;
+
     Callback<JSGCCallback> gcCallback;
     Callback<JS::DoCycleCollectionCallback> gcDoCycleCollectionCallback;
     Callback<JSObjectsTenuredCallback> tenuredCallback;
     CallbackVector<JSFinalizeCallback> finalizeCallbacks;
     CallbackVector<JSWeakPointerZonesCallback> updateWeakPointerZonesCallbacks;
     CallbackVector<JSWeakPointerCompartmentCallback> updateWeakPointerCompartmentCallbacks;
 
     MemoryCounter<GCRuntime> mallocCounter;
--- a/js/src/gc/Zone.cpp
+++ b/js/src/gc/Zone.cpp
@@ -53,16 +53,17 @@ JS::Zone::Zone(JSRuntime* rt, ZoneGroup*
     nurseryShapes_(group),
     data(group, nullptr),
     isSystem(group, false),
 #ifdef DEBUG
     gcLastSweepGroupIndex(group, 0),
 #endif
     jitZone_(group, nullptr),
     gcScheduled_(false),
+    gcScheduledSaved_(false),
     gcPreserveCode_(group, false),
     keepShapeTables_(group, false),
     listNext_(group, NotOnList)
 {
     /* Ensure that there are no vtables to mess us up here. */
     MOZ_ASSERT(reinterpret_cast<JS::shadow::Zone*>(this) ==
                static_cast<JS::shadow::Zone*>(this));
 
--- a/js/src/gc/Zone.h
+++ b/js/src/gc/Zone.h
@@ -690,16 +690,17 @@ struct Zone : public JS::shadow::Zone,
         updateMallocCounter(bytes);
         return p;
     }
 
   private:
     js::ZoneGroupData<js::jit::JitZone*> jitZone_;
 
     js::ActiveThreadData<bool> gcScheduled_;
+    js::ActiveThreadData<bool> gcScheduledSaved_;
     js::ZoneGroupData<bool> gcPreserveCode_;
     js::ZoneGroupData<bool> keepShapeTables_;
 
     // Allow zones to be linked into a list
     friend class js::gc::ZoneList;
     static Zone * const NotOnList;
     js::ZoneGroupOrGCTaskData<Zone*> listNext_;
     bool isOnList() const;
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug1407058.js
@@ -0,0 +1,16 @@
+"use strict";
+function f() {
+    var o = {};
+    Object.defineProperty(o, "x", {get: undefined, set: undefined});
+    for (var i = 0; i < 20; i++) {
+        var ex = null;
+        try {
+            o.x = 9;
+        } catch (e) {
+            ex = e;
+        }
+        assertEq(ex instanceof TypeError, true);
+        assertEq(o.x, undefined);
+    }
+}
+f();
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/wasm/regress/enable-profiling-in-import.js
@@ -0,0 +1,9 @@
+var module = new WebAssembly.Module(wasmTextToBinary(`
+    (module
+        (import "global" "func")
+        (func (export "f")
+         call 0
+        )
+    )
+`));
+new WebAssembly.Instance(module, { global: { func: enableGeckoProfiling } }).exports.f();
--- a/js/src/jit/ExecutableAllocator.cpp
+++ b/js/src/jit/ExecutableAllocator.cpp
@@ -123,17 +123,18 @@ ExecutableAllocator::ExecutableAllocator
 }
 
 ExecutableAllocator::~ExecutableAllocator()
 {
     for (size_t i = 0; i < m_smallPools.length(); i++)
         m_smallPools[i]->release(/* willDestroy = */true);
 
     // If this asserts we have a pool leak.
-    MOZ_ASSERT_IF(m_pools.initialized(), m_pools.empty());
+    MOZ_ASSERT_IF(m_pools.initialized() && rt_->gc.shutdownCollectedEverything(),
+                  m_pools.empty());
 }
 
 ExecutablePool*
 ExecutableAllocator::poolForSize(size_t n)
 {
     // Try to fit in an existing small allocator.  Use the pool with the
     // least available space that is big enough (best-fit).  This is the
     // best strategy because (a) it maximizes the chance of the next
--- a/js/src/jit/JSJitFrameIter.h
+++ b/js/src/jit/JSJitFrameIter.h
@@ -298,17 +298,17 @@ class JSJitProfilingFrameIterator
     void fixBaselineReturnAddress();
 
     void moveToCppEntryFrame();
     void moveToWasmFrame(CommonFrameLayout* frame);
     void moveToNextFrame(CommonFrameLayout* frame);
 
   public:
     JSJitProfilingFrameIterator(JSContext* cx,
-                              const JS::ProfilingFrameIterator::RegisterState& state);
+                                const JS::ProfilingFrameIterator::RegisterState& state);
     explicit JSJitProfilingFrameIterator(void* exitFrame);
 
     void operator++();
     bool done() const { return fp_ == nullptr; }
 
     void* fp() const { MOZ_ASSERT(!done()); return fp_; }
     void* stackAddress() const { return fp(); }
     FrameType frameType() const { MOZ_ASSERT(!done()); return type_; }
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -936,16 +936,17 @@ GCRuntime::GCRuntime(JSRuntime* rt) :
 #ifdef JS_GC_ZEAL
     zealModeBits(0),
     zealFrequency(0),
     nextScheduled(0),
     deterministicOnly(false),
     incrementalLimit(0),
 #endif
     fullCompartmentChecks(false),
+    gcBeginCallbackDepth(0),
     alwaysPreserveCode(false),
 #ifdef DEBUG
     arenasEmptyAtShutdown(true),
 #endif
     lock(mutexid::GCLock),
     allocTask(rt, emptyChunks_.ref()),
     decommitTask(rt),
     helperState(rt),
@@ -1643,35 +1644,16 @@ GCRuntime::setObjectsTenuredCallback(JSO
 
 void
 GCRuntime::callObjectsTenuredCallback()
 {
     if (tenuredCallback.op)
         tenuredCallback.op(TlsContext.get(), tenuredCallback.data);
 }
 
-namespace {
-
-class AutoNotifyGCActivity {
-  public:
-    explicit AutoNotifyGCActivity(GCRuntime& gc) : gc_(gc) {
-        if (!gc_.isIncrementalGCInProgress())
-            gc_.callGCCallback(JSGC_BEGIN);
-    }
-    ~AutoNotifyGCActivity() {
-        if (!gc_.isIncrementalGCInProgress())
-            gc_.callGCCallback(JSGC_END);
-    }
-
-  private:
-    GCRuntime& gc_;
-};
-
-} // (anon)
-
 bool
 GCRuntime::addFinalizeCallback(JSFinalizeCallback callback, void* data)
 {
     return finalizeCallbacks.ref().append(Callback<JSFinalizeCallback>(callback, data));
 }
 
 void
 GCRuntime::removeFinalizeCallback(JSFinalizeCallback callback)
@@ -7100,30 +7082,77 @@ class AutoScheduleZonesForGC
     ~AutoScheduleZonesForGC() {
         for (ZonesIter zone(rt_, WithAtoms); !zone.done(); zone.next())
             zone->unscheduleGC();
     }
 };
 
 } /* anonymous namespace */
 
+class js::gc::AutoCallGCCallbacks {
+    GCRuntime& gc_;
+
+  public:
+    explicit AutoCallGCCallbacks(GCRuntime& gc) : gc_(gc) {
+        gc_.maybeCallBeginCallback();
+    }
+    ~AutoCallGCCallbacks() {
+        gc_.maybeCallEndCallback();
+    }
+};
+
+void
+GCRuntime::maybeCallBeginCallback()
+{
+    if (isIncrementalGCInProgress())
+        return;
+
+    if (gcBeginCallbackDepth == 0) {
+        // Save scheduled zone information in case the callback changes it.
+        for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next())
+            zone->gcScheduledSaved_ = zone->gcScheduled_;
+    }
+
+    gcBeginCallbackDepth++;
+
+    callGCCallback(JSGC_BEGIN);
+
+    MOZ_ASSERT(gcBeginCallbackDepth != 0);
+    gcBeginCallbackDepth--;
+
+    if (gcBeginCallbackDepth == 0) {
+        // Restore scheduled zone information again.
+        for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next())
+            zone->gcScheduled_ = zone->gcScheduledSaved_;
+    }
+}
+
+void
+GCRuntime::maybeCallEndCallback()
+{
+    if (isIncrementalGCInProgress())
+        return;
+
+    callGCCallback(JSGC_END);
+}
+
 /*
  * Run one GC "cycle" (either a slice of incremental GC or an entire
  * non-incremental GC. We disable inlining to ensure that the bottom of the
  * stack with possible GC roots recorded in MarkRuntime excludes any pointers we
  * use during the marking implementation.
  *
  * Returns true if we "reset" an existing incremental GC, which would force us
  * to run another cycle.
  */
 MOZ_NEVER_INLINE GCRuntime::IncrementalResult
 GCRuntime::gcCycle(bool nonincrementalByAPI, SliceBudget& budget, JS::gcreason::Reason reason)
 {
-    // Note that the following is allowed to re-enter GC in the finalizer.
-    AutoNotifyGCActivity notify(*this);
+    // Note that GC callbacks are allowed to re-enter GC.
+    AutoCallGCCallbacks callCallbacks(*this);
 
     gcstats::AutoGCSlice agc(stats(), scanZonesBeforeGC(), invocationKind, budget, reason);
 
     minorGC(reason, gcstats::PhaseKind::EVICT_NURSERY_FOR_MAJOR_GC);
 
     AutoTraceSession session(rt, JS::HeapState::MajorCollecting);
 
     majorGCTriggerReason = JS::gcreason::NO_REASON;
--- a/js/src/vm/GeckoProfiler.cpp
+++ b/js/src/vm/GeckoProfiler.cpp
@@ -64,24 +64,33 @@ GeckoProfilerRuntime::setEventMarker(voi
 
 // Get a pointer to the top-most profiling frame, given the exit frame pointer.
 static void*
 GetTopProfilingJitFrame(Activation* act)
 {
     if (!act || !act->isJit())
         return nullptr;
 
-    // For null exitFrame, there is no previous exit frame, just return.
-    uint8_t* jsExitFP = act->asJit()->jsExitFP();
-    if (!jsExitFP)
+    jit::JitActivation* jitActivation = act->asJit();
+
+    // If there is no exit frame set, just return.
+    if (!jitActivation->hasExitFP())
         return nullptr;
 
-    jit::JSJitProfilingFrameIterator iter(jsExitFP);
-    MOZ_ASSERT(!iter.done());
-    return iter.fp();
+    // Skip wasm frames that might be in the way.
+    JitFrameIter iter(jitActivation);
+    while (!iter.done() && iter.isWasm())
+        ++iter;
+
+    if (!iter.isJSJit())
+        return nullptr;
+
+    jit::JSJitProfilingFrameIterator jitIter(iter.asJSJit().fp());
+    MOZ_ASSERT(!jitIter.done());
+    return jitIter.fp();
 }
 
 void
 GeckoProfilerRuntime::enable(bool enabled)
 {
 #ifdef DEBUG
     // All cooperating contexts must have profile stacks installed before the
     // profiler can be enabled. Cooperating threads created while the profiler
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -3130,19 +3130,16 @@ CASE(JSOP_FUNCALL)
                 }
             }
         }
 
         funScript = fun->nonLazyScript();
 
         if (!activation.pushInlineFrame(args, funScript, construct))
             goto error;
-
-        if (createSingleton)
-            REGS.fp()->setCreateSingleton();
     }
 
     SET_SCRIPT(REGS.fp()->script());
 
     {
         TraceLoggerEvent event(TraceLogger_Scripts, script);
         TraceLogStartEvent(logger, event);
         TraceLogStartEvent(logger, TraceLogger_Interpreter);
--- a/js/src/vm/Shape.cpp
+++ b/js/src/vm/Shape.cpp
@@ -741,17 +741,17 @@ NativeObject::putProperty(JSContext* cx,
 
     /*
      * If the caller wants to allocate a slot, but doesn't care which slot,
      * copy the existing shape's slot into slot so we can match shape, if all
      * other members match.
      */
     bool hadSlot = shape->isDataProperty();
     uint32_t oldSlot = shape->maybeSlot();
-    bool needSlot = !getter && !setter;
+    bool needSlot = Shape::isDataProperty(attrs, getter, setter);
     if (needSlot && slot == SHAPE_INVALID_SLOT && hadSlot)
         slot = oldSlot;
 
     Rooted<UnownedBaseShape*> nbase(cx);
     {
         RootedShape shape(cx, obj->lastProperty());
         nbase = GetBaseShapeForNewShape(cx, shape, id);
         if (!nbase)
@@ -784,17 +784,17 @@ NativeObject::putProperty(JSContext* cx,
     if (obj->inDictionaryMode()) {
         /*
          * Updating some property in a dictionary-mode object. Create a new
          * shape for the existing property, and also generate a new shape for
          * the last property of the dictionary (unless the modified property
          * is also the last property).
          */
         bool updateLast = (shape == obj->lastProperty());
-        bool accessorShape = getter || setter || (attrs & (JSPROP_GETTER | JSPROP_SETTER));
+        bool accessorShape = !Shape::isDataProperty(attrs, getter, setter);
         shape = NativeObject::replaceWithNewEquivalentShape(cx, obj, shape, nullptr,
                                                             accessorShape);
         if (!shape)
             return nullptr;
         if (!updateLast && !NativeObject::generateOwnShape(cx, obj))
             return nullptr;
 
         /*
@@ -867,17 +867,17 @@ NativeObject::putProperty(JSContext* cx,
 /* static */ Shape*
 NativeObject::changeProperty(JSContext* cx, HandleNativeObject obj, HandleShape shape,
                              unsigned attrs, GetterOp getter, SetterOp setter)
 {
     MOZ_ASSERT(obj->containsPure(shape));
 
     /* Allow only shared (slotless) => unshared (slotful) transition. */
 #ifdef DEBUG
-    bool needSlot = !getter && !setter;
+    bool needSlot = Shape::isDataProperty(attrs, getter, setter);
     MOZ_ASSERT_IF(shape->isDataProperty() != needSlot, needSlot);
 #endif
 
     MarkTypePropertyNonData(cx, obj, shape->propid());
 
     AssertCanChangeAttrs(shape, attrs);
 
     if (shape->attrs == attrs && shape->getter() == getter && shape->setter() == setter)
--- a/js/src/vm/Shape.h
+++ b/js/src/vm/Shape.h
@@ -1008,19 +1008,23 @@ class Shape : public gc::TenuredCell
                maybeSlot() == aslot &&
                attrs == aattrs &&
                getter() == rawGetter &&
                setter() == rawSetter;
     }
 
     BaseShape* base() const { return base_.get(); }
 
+    static bool isDataProperty(unsigned attrs, GetterOp getter, SetterOp setter) {
+        return !(attrs & (JSPROP_GETTER | JSPROP_SETTER)) && !getter && !setter;
+    }
+
     bool isDataProperty() const {
         MOZ_ASSERT(!isEmptyShape());
-        return !getter() && !setter();
+        return isDataProperty(attrs, getter(), setter());
     }
     uint32_t slot() const { MOZ_ASSERT(isDataProperty() && !hasMissingSlot()); return maybeSlot(); }
     uint32_t maybeSlot() const {
         return slotInfo & SLOT_MASK;
     }
 
     bool isEmptyShape() const {
         MOZ_ASSERT_IF(JSID_IS_EMPTY(propid_), hasMissingSlot());
@@ -1471,17 +1475,17 @@ struct StackShape
             flags &= ~Shape::ACCESSOR_SHAPE;
 
         this->rawGetter = rawGetter;
         this->rawSetter = rawSetter;
     }
 
     bool isDataProperty() const {
         MOZ_ASSERT(!JSID_IS_EMPTY(propid));
-        return !rawGetter && !rawSetter;
+        return Shape::isDataProperty(attrs, rawGetter, rawSetter);
     }
     bool hasMissingSlot() const { return maybeSlot() == SHAPE_INVALID_SLOT; }
 
     uint32_t slot() const { MOZ_ASSERT(isDataProperty() && !hasMissingSlot()); return slot_; }
     uint32_t maybeSlot() const { return slot_; }
 
     void setSlot(uint32_t slot) {
         MOZ_ASSERT(slot <= SHAPE_INVALID_SLOT);
--- a/js/src/vm/Stack-inl.h
+++ b/js/src/vm/Stack-inl.h
@@ -558,24 +558,16 @@ AbstractFramePtr::hasInitialEnvironment(
     if (isInterpreterFrame())
         return asInterpreterFrame()->hasInitialEnvironment();
     if (isBaselineFrame())
         return asBaselineFrame()->hasInitialEnvironment();
     return asRematerializedFrame()->hasInitialEnvironment();
 }
 
 inline bool
-AbstractFramePtr::createSingleton() const
-{
-    if (isInterpreterFrame())
-        return asInterpreterFrame()->createSingleton();
-    return false;
-}
-
-inline bool
 AbstractFramePtr::isGlobalFrame() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->isGlobalFrame();
     if (isBaselineFrame())
         return asBaselineFrame()->isGlobalFrame();
     if (isWasmDebugFrame())
         return false;
--- a/js/src/vm/Stack.h
+++ b/js/src/vm/Stack.h
@@ -265,17 +265,16 @@ class AbstractFramePtr
     inline unsigned numFormalArgs() const;
 
     inline Value* argv() const;
 
     inline bool hasArgs() const;
     inline bool hasArgsObj() const;
     inline ArgumentsObject& argsObj() const;
     inline void initArgsObj(ArgumentsObject& argsobj) const;
-    inline bool createSingleton() const;
 
     inline Value& unaliasedLocal(uint32_t i);
     inline Value& unaliasedFormal(unsigned i, MaybeCheckAliasing checkAliasing = CHECK_ALIASING);
     inline Value& unaliasedActual(unsigned i, MaybeCheckAliasing checkAliasing = CHECK_ALIASING);
     template <class Op> inline void unaliasedForEachActual(JSContext* cx, Op op);
 
     inline bool prevUpToDate() const;
     inline void setPrevUpToDate() const;
@@ -334,25 +333,22 @@ class InterpreterFrame
         HAS_PUSHED_PROF_FRAME  =       0x80,  /* Gecko Profiler was notified of entry */
 
         /*
          * If set, we entered one of the JITs and ScriptFrameIter should skip
          * this frame.
          */
         RUNNING_IN_JIT         =      0x100,
 
-        /* Miscellaneous state. */
-        CREATE_SINGLETON       =      0x200,  /* Constructed |this| object should be singleton. */
-
         /*
          * If set, this frame has been on the stack when
          * |js::SavedStacks::saveCurrentStack| was called, and so there is a
          * |js::SavedFrame| object cached for this frame.
          */
-        HAS_CACHED_SAVED_FRAME =      0x400,
+        HAS_CACHED_SAVED_FRAME =      0x200,
     };
 
     mutable uint32_t    flags_;         /* bits described by Flags */
     uint32_t            nactual_;       /* number of actual arguments, for function frames */
     JSScript*           script_;        /* the script we're executing */
     JSObject*           envChain_;      /* current environment chain */
     Value               rval_;          /* if HAS_RVAL, return value of the frame */
     ArgumentsObject*    argsObj_;       /* if HAS_ARGS_OBJ, the call's arguments object */
@@ -754,25 +750,16 @@ class InterpreterFrame
         return flags_ & HAS_INITIAL_ENV;
     }
 
     bool hasArgsObj() const {
         MOZ_ASSERT(script()->needsArgsObj());
         return flags_ & HAS_ARGS_OBJ;
     }
 
-    void setCreateSingleton() {
-        MOZ_ASSERT(isConstructing());
-        flags_ |= CREATE_SINGLETON;
-    }
-    bool createSingleton() const {
-        MOZ_ASSERT(isConstructing());
-        return flags_ & CREATE_SINGLETON;
-    }
-
     /*
      * Debugger eval frames.
      *
      * - If evalInFramePrev_ is non-null, frame was created for an "eval in
      *   frame" call, which can push a successor to any live frame; so its
      *   logical "prev" frame is not necessarily the previous frame in memory.
      *   Iteration should treat evalInFramePrev_ as this frame's previous frame.
      *
--- a/js/src/wasm/WasmBuiltins.cpp
+++ b/js/src/wasm/WasmBuiltins.cpp
@@ -287,38 +287,44 @@ WasmReportOutOfBounds()
 static void
 WasmReportUnalignedAccess()
 {
     JSContext* cx = TlsContext.get();
     JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_WASM_UNALIGNED_ACCESS);
 }
 
 static int32_t
-CoerceInPlace_ToInt32(MutableHandleValue val)
+CoerceInPlace_ToInt32(Value* rawVal)
 {
     JSContext* cx = TlsContext.get();
 
     int32_t i32;
-    if (!ToInt32(cx, val, &i32))
+    RootedValue val(cx, *rawVal);
+    if (!ToInt32(cx, val, &i32)) {
+        *rawVal = PoisonedObjectValue(0x42);
         return false;
-    val.set(Int32Value(i32));
+    }
 
+    *rawVal = Int32Value(i32);
     return true;
 }
 
 static int32_t
-CoerceInPlace_ToNumber(MutableHandleValue val)
+CoerceInPlace_ToNumber(Value* rawVal)
 {
     JSContext* cx = TlsContext.get();
 
     double dbl;
-    if (!ToNumber(cx, val, &dbl))
+    RootedValue val(cx, *rawVal);
+    if (!ToNumber(cx, val, &dbl)) {
+        *rawVal = PoisonedObjectValue(0x42);
         return false;
-    val.set(DoubleValue(dbl));
+    }
 
+    *rawVal = DoubleValue(dbl);
     return true;
 }
 
 static int64_t
 DivI64(uint32_t x_hi, uint32_t x_lo, uint32_t y_hi, uint32_t y_lo)
 {
     int64_t x = ((uint64_t)x_hi << 32) + x_lo;
     int64_t y = ((uint64_t)y_hi << 32) + y_lo;
--- a/js/src/wasm/WasmStubs.cpp
+++ b/js/src/wasm/WasmStubs.cpp
@@ -765,16 +765,25 @@ GenerateImportJitExit(MacroAssembler& ma
     masm.loadBaselineOrIonNoArgCheck(callee, callee, nullptr);
 
     Label rejoinBeforeCall;
     masm.bind(&rejoinBeforeCall);
 
     AssertStackAlignment(masm, JitStackAlignment, sizeOfRetAddr);
     masm.callJitNoProfiler(callee);
 
+    // Note that there might be a GC thing in the JSReturnOperand now.
+    // In all the code paths from here:
+    // - either the value is unboxed because it was a primitive and we don't
+    //   need to worry about rooting anymore.
+    // - or the value needs to be rooted, but nothing can cause a GC between
+    //   here and CoerceInPlace, which roots before coercing to a primitive.
+    //   In particular, this is true because wasm::InInterruptibleCode will
+    //   return false when PC is in the jit exit.
+
     // The JIT callee clobbers all registers, including WasmTlsReg and
     // FramePointer, so restore those here. During this sequence of
     // instructions, FP can't be trusted by the profiling frame iterator.
     offsets->untrustedFPStart = masm.currentOffset();
     AssertStackAlignment(masm, JitStackAlignment, sizeOfRetAddr);
 
     masm.loadWasmTlsRegFromFrame();
     masm.moveStackPtrTo(FramePointer);
--- a/layout/generic/nsPageFrame.cpp
+++ b/layout/generic/nsPageFrame.cpp
@@ -637,27 +637,27 @@ nsPageFrame::PaintHeaderFooter(gfxContex
   nscoord visibleHeight = 0;
   if (fontMet) {
     visibleHeight = fontMet->MaxHeight();
     ascent = fontMet->MaxAscent();
   }
 
   // print document headers and footers
   nsString headerLeft, headerCenter, headerRight;
-  mPD->mPrintSettings->GetHeaderStrLeft(getter_Copies(headerLeft));
-  mPD->mPrintSettings->GetHeaderStrCenter(getter_Copies(headerCenter));
-  mPD->mPrintSettings->GetHeaderStrRight(getter_Copies(headerRight));
+  mPD->mPrintSettings->GetHeaderStrLeft(headerLeft);
+  mPD->mPrintSettings->GetHeaderStrCenter(headerCenter);
+  mPD->mPrintSettings->GetHeaderStrRight(headerRight);
   DrawHeaderFooter(aRenderingContext, *fontMet, eHeader,
                    headerLeft, headerCenter, headerRight,
                    rect, ascent, visibleHeight);
 
   nsString footerLeft, footerCenter, footerRight;
-  mPD->mPrintSettings->GetFooterStrLeft(getter_Copies(footerLeft));
-  mPD->mPrintSettings->GetFooterStrCenter(getter_Copies(footerCenter));
-  mPD->mPrintSettings->GetFooterStrRight(getter_Copies(footerRight));
+  mPD->mPrintSettings->GetFooterStrLeft(footerLeft);
+  mPD->mPrintSettings->GetFooterStrCenter(footerCenter);
+  mPD->mPrintSettings->GetFooterStrRight(footerRight);
   DrawHeaderFooter(aRenderingContext, *fontMet, eFooter,
                    footerLeft, footerCenter, footerRight,
                    rect, ascent, visibleHeight);
 }
 
 void
 nsPageFrame::SetSharedPageData(nsSharedPageData* aPD)
 {
--- a/layout/printing/nsPrintEngine.cpp
+++ b/layout/printing/nsPrintEngine.cpp
@@ -1006,29 +1006,29 @@ nsPrintEngine::CheckForPrinters(nsIPrint
   if (!XRE_IsParentProcess()) {
     return NS_OK;
   }
 #endif
   NS_ENSURE_ARG_POINTER(aPrintSettings);
 
   // See if aPrintSettings already has a printer
   nsString printerName;
-  nsresult rv = aPrintSettings->GetPrinterName(getter_Copies(printerName));
+  nsresult rv = aPrintSettings->GetPrinterName(printerName);
   if (NS_SUCCEEDED(rv) && !printerName.IsEmpty()) {
     return NS_OK;
   }
 
   // aPrintSettings doesn't have a printer set. Try to fetch the default.
   nsCOMPtr<nsIPrintSettingsService> printSettingsService =
     do_GetService(sPrintSettingsServiceContractID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = printSettingsService->GetDefaultPrinterName(getter_Copies(printerName));
+  rv = printSettingsService->GetDefaultPrinterName(printerName);
   if (NS_SUCCEEDED(rv) && !printerName.IsEmpty()) {
-    rv = aPrintSettings->SetPrinterName(printerName.get());
+    rv = aPrintSettings->SetPrinterName(printerName);
   }
   return rv;
 #endif
 }
 
 //----------------------------------------------------------------------
 // Set up to use the "pluggable" Print Progress Dialog
 void
@@ -1450,31 +1450,18 @@ nsPrintEngine::GetDisplayTitleAndURL(con
     return;
 
   aTitle.Truncate();
   aURLStr.Truncate();
 
   // First check to see if the PrintSettings has defined an alternate title
   // and use that if it did
   if (mPrt->mPrintSettings) {
-    char16_t * docTitleStrPS = nullptr;
-    char16_t * docURLStrPS   = nullptr;
-    mPrt->mPrintSettings->GetTitle(&docTitleStrPS);
-    mPrt->mPrintSettings->GetDocURL(&docURLStrPS);
-
-    if (docTitleStrPS) {
-      aTitle = docTitleStrPS;
-    }
-
-    if (docURLStrPS) {
-      aURLStr = docURLStrPS;
-    }
-
-    free(docTitleStrPS);
-    free(docURLStrPS);
+    mPrt->mPrintSettings->GetTitle(aTitle);
+    mPrt->mPrintSettings->GetDocURL(aURLStr);
   }
 
   nsAutoString docTitle;
   nsAutoString docUrl;
   GetDocumentTitleAndURL(aPO->mDocument, docTitle, docUrl);
 
   if (aURLStr.IsEmpty() && !docUrl.IsEmpty()) {
     aURLStr = docUrl;
@@ -1823,17 +1810,17 @@ nsPrintEngine::SetupToPrintContent()
   }
 
   nsAutoString fileNameStr;
   // check to see if we are printing to a file
   bool isPrintToFile = false;
   printData->mPrintSettings->GetPrintToFile(&isPrintToFile);
   if (isPrintToFile) {
     // On some platforms The BeginDocument needs to know the name of the file.
-    printData->mPrintSettings->GetToFileName(getter_Copies(fileNameStr));
+    printData->mPrintSettings->GetToFileName(fileNameStr);
   }
 
   nsAutoString docTitleStr;
   nsAutoString docURLStr;
   GetDisplayTitleAndURL(printData->mPrintObject, docTitleStr, docURLStr,
                         eDocTitleDefURLDoc);
 
   int32_t startPage = 1;
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -2106,17 +2106,17 @@ pref("network.ftp.idleConnectionTimeout"
 // 3: XUL directory viewer
 // all other values are treated like 2
 pref("network.dir.format", 2);
 
 // enables the prefetch service (i.e., prefetching of <link rel="next"> and
 // <link rel="prefetch"> URLs).
 pref("network.prefetch-next", true);
 // enables the preloading (i.e., preloading of <link rel="preload"> URLs).
-pref("network.preload", true);
+pref("network.preload", false);
 
 // enables the predictive service
 pref("network.predictor.enabled", true);
 pref("network.predictor.enable-hover-on-ssl", false);
 pref("network.predictor.enable-prefetch", false);
 pref("network.predictor.page-degradation.day", 0);
 pref("network.predictor.page-degradation.week", 5);
 pref("network.predictor.page-degradation.month", 10);
--- a/rdf/base/nsIRDFXMLSerializer.idl
+++ b/rdf/base/nsIRDFXMLSerializer.idl
@@ -2,27 +2,30 @@
  *
  * 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 "nsISupports.idl"
 #include "nsIRDFDataSource.idl"
 
-interface nsAtom;  // not a real interface; used in [noscript] methods only
+%{C++
+class nsAtom;
+%}
+[ptr] native nsAtomPtr(nsAtom);
 
 [scriptable, uuid(8ae1fbf8-1dd2-11b2-bd21-d728069cca92)]
 interface nsIRDFXMLSerializer : nsISupports
 {
     /**
      * Initialize the serializer with the specified datasource.
      * @param aDataSource the datasource from which data will be
      *   serialized
      */
     void init(in nsIRDFDataSource aDataSource);
 
     /**
      * Add the specified namespace to the serializer.
      * @param aPrefix the attribute namespace prefix
      * @param aURI the namespace URI
      */
-    [noscript] void addNameSpace(in nsAtom aPrefix, in DOMString aURI);
+    [noscript] void addNameSpace(in nsAtomPtr aPrefix, in DOMString aURI);
 };
--- a/rdf/base/nsIRDFXMLSink.idl
+++ b/rdf/base/nsIRDFXMLSink.idl
@@ -7,17 +7,20 @@
 
   Interfaces for the RDF/XML sink, which parses RDF/XML into
   a graph representation.
 
 */
 
 #include "nsISupports.idl"
 
-interface nsAtom;  // not a real interface; used in [noscript] methods only
+%{C++
+class nsAtom;
+%}
+[ptr] native nsAtomPtr(nsAtom);
 
 // XXX Until these get scriptable. See nsIRDFXMLSink::AddNameSpace()
 [ref] native nsStringRef(nsString);
 %{C++
 #include "nsStringFwd.h"
 %}
 
 interface nsIRDFXMLSink;
@@ -97,17 +100,17 @@ interface nsIRDFXMLSink : nsISupports
      */
     void endLoad();
 
     /**
      * Add namespace information to the RDF/XML sink.
      * @param aPrefix the namespace prefix
      * @param aURI the namespace URI
      */
-    [noscript] void addNameSpace(in nsAtom aPrefix,
+    [noscript] void addNameSpace(in nsAtomPtr aPrefix,
                                  [const] in nsStringRef aURI);
 
     /**
      * Add an observer that will be notified as the RDF/XML load
      * progresses.
      * <p>
      *
      * Note that the sink will acquire a strong reference to the
--- a/security/manager/ssl/StaticHPKPins.h
+++ b/security/manager/ssl/StaticHPKPins.h
@@ -1154,9 +1154,9 @@ static const TransportSecurityPreload kP
   { "za.search.yahoo.com", false, true, false, -1, &kPinset_yahoo },
   { "zh.search.yahoo.com", false, true, false, -1, &kPinset_yahoo },
 };
 
 // Pinning Preload List Length = 480;
 
 static const int32_t kUnknownId = -1;
 
-static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1516256426469000);
+static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1516297752722000);
--- a/security/manager/ssl/nsSTSPreloadList.errors
+++ b/security/manager/ssl/nsSTSPreloadList.errors
@@ -2,17 +2,16 @@ 0day.su: could not connect to host
 0i0.nl: could not connect to host
 125m125.de: could not connect to host
 174.net.nz: could not connect to host
 300mbmovie24.com: could not connect to host
 360live.fr: could not connect to host
 47tech.com: could not connect to host
 4loc.us: could not connect to host
 4x4.lk: could not connect to host
-68277.me: could not connect to host
 724go.com: could not connect to host
 8560.be: could not connect to host
 87577.com: could not connect to host
 8887999.com: could not connect to host
 8ack.de: could not connect to host
 8t88.biz: could not connect to host
 91-freedom.com: could not connect to host
 aamwa.com: could not connect to host
@@ -24,175 +23,177 @@ aerotheque.fr: could not connect to host
 aevpn.org: could not connect to host
 agowa338.de: could not connect to host
 aivd.lol: could not connect to host
 akoww.de: could not connect to host
 akul.co.in: could not connect to host
 alrait.com: could not connect to host
 altahrim.net: could not connect to host
 amua.fr: could not connect to host
-annetaan.fi: could not connect to host
 arent.kz: could not connect to host
 arksan.com.tr: could not connect to host
 artisense.de: could not connect to host
 askmagicconch.com: could not connect to host
 assdecoeur.org: could not connect to host
 avi9526.pp.ua: could not connect to host
 aviv.nyc: could not connect to host
 azabani.com: could not connect to host
 backschues.com: could not connect to host
 backschues.net: could not connect to host
+baitulongbaycruises.com: could not connect to host
 balonmano.co: could not connect to host
-batfoundry.com: could not connect to host
 bbdos.ru: could not connect to host
 bencorby.com: could not connect to host
 benjamin-horvath.com: could not connect to host
 benjamindietrich.com: could not connect to host
 benjamindietrich.de: could not connect to host
-berdu.id: could not connect to host
 berna.fr: could not connect to host
 bip.gov.sa: could not connect to host
 blumen-garage.de: could not connect to host
 blumiges-fischbachtal.de: could not connect to host
 bodrumfarm.com: could not connect to host
 bowlsheet.com: could not connect to host
 brettabel.com: could not connect to host
 bullbits.com: could not connect to host
 businessfurs.info: could not connect to host
 buyshoe.org: could not connect to host
 by1898.com: could not connect to host
 cais.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 119"  data: no]
 cake-time.co.uk: could not connect to host
 calculatoaresecondhand.xyz: could not connect to host
 callabs.net: could not connect to host
 capekeen.com: could not connect to host
-capellidipremoli.com: could not connect to host
+carloshmm.stream: could not connect to host
 casperpanel.com: could not connect to host
-cbdev.de: could not connect to host
+charr.xyz: could not connect to host
 china-line.org: could not connect to host
 chloehorler.com: could not connect to host
 chonghe.org: could not connect to host
 christina-quast.de: could not connect to host
 cielly.com: could not connect to host
 clearviewwealthprojector.com.au: could not connect to host
 cloudbleed.info: could not connect to host
 cmpr.es: could not connect to host
 cnlic.com: could not connect to host
-cocaine.ninja: could not connect to host
 coinmewallet.com: could not connect to host
 colleencornez.com: could not connect to host
 comssa.org.au: could not connect to host
 consejosdenutricion.com: could not connect to host
+corbax.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 119"  data: no]
 corinnanese.de: could not connect to host
 cpaneltips.com: could not connect to host
+crapouill.es: could not connect to host
 creative-wave.fr: could not connect to host
 criticalaim.com: could not connect to host
 cryptopartyutah.org: could not connect to host
 cselzer.com: could not connect to host
 csgo77.com: could not connect to host
+ctnguyen.de: could not connect to host
+ctnguyen.net: could not connect to host
 cypherpunk.ws: could not connect to host
 czlx.co: could not connect to host
 dahlberg.cologne: could not connect to host
-dao.spb.su: could not connect to host
 dataprotectionadvisors.com: could not connect to host
 datorb.com: could not connect to host
 davevelopment.net: could not connect to host
 dawnsonb.com: could not connect to host
 dcc.moe: could not connect to host
 de-servers.de: could not connect to host
 decoyrouting.com: could not connect to host
 derchris.me: could not connect to host
 derivativeshub.pro: could not connect to host
 derrickemery.com: could not connect to host
 dev-talk.eu: could not connect to host
 devops.moe: could not connect to host
 dick.red: could not connect to host
 digioccumss.ddns.net: could not connect to host
 dijks.com: could not connect to host
+dingcc.org: could not connect to host
 dingcc.xyz: could not connect to host
 disco-crazy-world.de: could not connect to host
+djieno.com: could not connect to host
 dkravchenko.su: could not connect to host
 donotspellitgav.in: could not connect to host
-dostavkakurierom.ru: could not connect to host
 dreizwosechs.de: could not connect to host
 drkmtrx.xyz: could not connect to host
+drlazarina.net: could not connect to host
 duch.cloud: could not connect to host
 duelsow.eu: could not connect to host
 duo.money: could not connect to host
 dynts.pro: could not connect to host
 ectora.com: could not connect to host
 edit.yahoo.com: could not connect to host
 educatoys.com.br: could not connect to host
 eeb98.com: could not connect to host
-eez.ee: could not connect to host
 ehuber.info: could not connect to host
 endlessdiy.ca: could not connect to host
 estan.cn: could not connect to host
 etzi.myds.me: could not connect to host
 eurostrategy.vn.ua: could not connect to host
 exceed.global: could not connect to host
 expatads.com: could not connect to host
+exploit.cz: could not connect to host
+familletouret.fr: could not connect to host
 farm24.co.uk: could not connect to host
 ficklenote.net: could not connect to host
 filhomes.ph: could not connect to host
 firebaseio.com: could not connect to host
 firexarxa.de: could not connect to host
 first-time-offender.com: could not connect to host
 fixate.ru: could not connect to host
 fixmyglitch.com: could not connect to host
 fossewayflowers.co.uk: could not connect to host
 fossewayflowers.com: could not connect to host
 foxmay.co.uk: could not connect to host
+freaksites.dk: could not connect to host
 fsf.moe: could not connect to host
 fukuko.biz: could not connect to host
 fukuko.xyz: could not connect to host
 funfunmstdn.tokyo: could not connect to host
 funideas.org: could not connect to host
 funksteckdosen24.de: could not connect to host
-fuwafuwa.moe: could not connect to host
 fyol.pw: could not connect to host
 g4w.co: could not connect to host
 gam3rs.de: could not connect to host
 gaygeeks.de: could not connect to host
-gdevpenze.ru: could not connect to host
 geeks.berlin: could not connect to host
 geneve.guide: could not connect to host
 getwarden.net: could not connect to host
 gevaulug.fr: could not connect to host
 gfoss.gr: could not connect to host
 ggs.jp: could not connect to host
 ggx.us: could not connect to host
 globalgivingtime.com: could not connect to host
 google: could not connect to host
-gorn.ch: could not connect to host
 gottfridsberg.org: could not connect to host
 gradsm-ci.net: could not connect to host
 gritte.net: could not connect to host
 gtdgo.com: could not connect to host
 gvt2.com: could not connect to host
 gvt3.com: could not connect to host
 heijblok.com: could not connect to host
 helsingfors.guide: could not connect to host
 here.ml: could not connect to host
 hg881.com: could not connect to host
 hoodoo.io: could not connect to host
 hoodoo.tech: could not connect to host
-hukkatavara.com: could not connect to host
 hundter.com: could not connect to host
 ifxnet.com: could not connect to host
-imouyang.com: could not connect to host
 industreiler.com: could not connect to host
 industreiler.com.br: could not connect to host
 inexpensivecomputers.net: could not connect to host
+injust.eu.org: could not connect to host
+injust.me: could not connect to host
 installgentoo.net: could not connect to host
 ipv6.watch: could not connect to host
 iskai.net: could not connect to host
 islief.com: could not connect to host
 isoroc-nidzica.pl: could not connect to host
 issuesofconcern.in: could not connect to host
+ixio.cz: could not connect to host
 jaredfraser.com: could not connect to host
 javascriptlab.fr: could not connect to host
 jcyz.cf: could not connect to host
 jeffreymagee.com: could not connect to host
 jhburton.co.uk: could not connect to host
 jie.dance: could not connect to host
 johnblackbourn.com: could not connect to host
 jonpads.com: could not connect to host
@@ -202,23 +203,21 @@ k-wallet.com: could not connect to host
 kamikaichimaru.com: could not connect to host
 kapo.info: could not connect to host
 karanlyons.com: could not connect to host
 kayleen.net: could not connect to host
 kenrogers.co: could not connect to host
 kenvix.com: could not connect to host
 kieranweightman.me: could not connect to host
 kinepolis-studio.ga: could not connect to host
-kingdomcrc.org: could not connect to host
 knapp.noip.me: could not connect to host
 kollawat.me: could not connect to host
 kousaku.jp: could not connect to host
 kozmik.co: could not connect to host
 kteen.info: could not connect to host
-laboiteanem.fr: could not connect to host
 lacasa.fr: could not connect to host
 lachawoj.de: could not connect to host
 lathamlabs.com: could not connect to host
 lathamlabs.net: could not connect to host
 lathamlabs.org: could not connect to host
 lcht.ch: could not connect to host
 legitaxi.com: could not connect to host
 leninalbertop.com.ve: could not connect to host
@@ -243,28 +242,28 @@ martin-mattel.com: could not connect to 
 martinrogalla.com: could not connect to host
 mc-team.org: could not connect to host
 mcdanieldevelopmentservices.com: could not connect to host
 mcea-hld.jp: could not connect to host
 mchopkins.net: could not connect to host
 meanevo.com: could not connect to host
 metachris.com: could not connect to host
 mhjuma.com: could not connect to host
-mikes.tk: could not connect to host
-minakov.pro: could not connect to host
 mingy.ddns.net: could not connect to host
+missionsgemeinde.de: could not connect to host
 mmstick.tk: could not connect to host
 modded-minecraft-server-list.com: could not connect to host
 mosaique-lachenaie.fr: could not connect to host
 moskva.guide: could not connect to host
 mrliu.me: could not connect to host
-muh.io: could not connect to host
 muj-svet.cz: could not connect to host
 munduch.cz: could not connect to host
+napcae.de: could not connect to host
 narada.com.ua: could not connect to host
+narodsovety.ru: could not connect to host
 navdeep.ca: could not connect to host
 ncdesigns-studio.com: could not connect to host
 nedcf.org.uk: could not connect to host
 negai.moe: could not connect to host
 nevolution.me: could not connect to host
 nikolasbradshaw.com: could not connect to host
 niva.synology.me: could not connect to host
 nkb.in.th: could not connect to host
@@ -273,37 +272,34 @@ nostraspace.com: could not connect to ho
 notesforpebble.com: could not connect to host
 nsbfalconacademy.org: could not connect to host
 nup.pw: could not connect to host
 ogkw.de: could not connect to host
 oliverspringer.eu: could not connect to host
 onewebdev.info: could not connect to host
 onstud.com: could not connect to host
 optimist.bg: could not connect to host
-oranges.tokyo: could not connect to host
 oscsdp.cz: could not connect to host
 osterkraenzchen.de: could not connect to host
 oxygaming.com: could not connect to host
 oxymc.com: could not connect to host
 pandymic.com: could not connect to host
 paragon.edu: could not connect to host
 pascalchristen.ch: could not connect to host
 pe-bank.co.jp: could not connect to host
 pengisatelier.net: could not connect to host
 perkbrian.com: could not connect to host
 persjrp.ca: could not connect to host
 persoform.ch: could not connect to host
-petrachuk.ru: could not connect to host
 philippa.cool: could not connect to host
 picallo.es: could not connect to host
 pkautodesign.com: could not connect to host
 pkov.cz: could not connect to host
 plaasprodukte.com: could not connect to host
-pm13.cz: could not connect to host
-pm13.org: could not connect to host
+podemos.info: could not connect to host
 pointagri.com: could not connect to host
 polit.im: could not connect to host
 poolinstallers.co.za: could not connect to host
 pouets.ovh: could not connect to host
 projectasterk.com: could not connect to host
 proxydesk.eu: could not connect to host
 proxyweb.us: could not connect to host
 pythia.nz: could not connect to host
@@ -324,31 +320,32 @@ s1mplescripts.de: could not connect to h
 sallysubs.com: could not connect to host
 salon-minipli.de: could not connect to host
 sanatrans.com: could not connect to host
 sarndipity.com: could not connect to host
 scrumbleship.com: could not connect to host
 securitymap.wiki: could not connect to host
 sellmoretires.com: could not connect to host
 semantheme.fr: could not connect to host
+sgtsnookums.net: could not connect to host
 shadowplus.net: could not connect to host
 shadowrocket.net: could not connect to host
 sharevari.com: could not connect to host
 shavingks.com: could not connect to host
 sheratan.web.id: could not connect to host
 shirakaba-cc.com: could not connect to host
 simbolo.co.uk: could not connect to host
 simplerses.com: could not connect to host
+sistemy48.ru: could not connect to host
 sky-aroma.com: could not connect to host
-snille.com: could not connect to host
+sl1pkn07.wtf: could not connect to host
 socialworkout.com: could not connect to host
 socialworkout.net: could not connect to host
 socialworkout.org: could not connect to host
 socialworkout.tv: could not connect to host
-solariiknight.org: could not connect to host
 somali-derp.com: could not connect to host
 sonic.sk: could not connect to host
 soontm.de: could not connect to host
 soubriquet.org: could not connect to host
 soulema.com: could not connect to host
 sowingseasons.com: could not connect to host
 spicywombat.com: could not connect to host
 spom.net: could not connect to host
@@ -356,56 +353,64 @@ sputnik1net.org: could not connect to ho
 sqzryang.com: could not connect to host
 sss3s.com: could not connect to host
 stitthappens.com: could not connect to host
 stpip.com: could not connect to host
 stytt.com: could not connect to host
 sufix.cz: could not connect to host
 surdam.casa: could not connect to host
 sviz.pro: could not connect to host
-systemreboot.net: could not connect to host
 tenispopular.com: could not connect to host
 terminalvelocity.co.nz: could not connect to host
 theprivacysolution.com: could not connect to host
 thesehighsandlows.com: could not connect to host
 thinkcash.nl: could not connect to host
 tiliaze.info: could not connect to host
 tiliaze.net: could not connect to host
 tokage.me: could not connect to host
 totch.de: could not connect to host
 totot.net: could not connect to host
 transcendmotor.sg: could not connect to host
 turn-sticks.com: could not connect to host
 tusb.ml: could not connect to host
+twiri.net: could not connect to host
+unseen.tw: could not connect to host
 upr.com.ua: could not connect to host
+varta.io: could not connect to host
+vcelin-na-doliku.cz: could not connect to host
 venmos.com: could not connect to host
 viditut.com: could not connect to host
 vilog.me: could not connect to host
-visionless.me: could not connect to host
 vitapingu.de: could not connect to host
 vmgirls.com: could not connect to host
+voidptr.eu: could not connect to host
 vxapps.com: could not connect to host
+wachter.biz: could not connect to host
 warhaggis.com: could not connect to host
-warlions.info: could not connect to host
 watchweasel.com: could not connect to host
 weareincognito.org: could not connect to host
 webart-factory.de: could not connect to host
 webduck.nl: could not connect to host
 webthings.com.br: could not connect to host
+weed.ren: could not connect to host
 weicn.org: could not connect to host
 welby.cat: could not connect to host
 werhatunsverraten.eu: could not connect to host
 werkinc.de: could not connect to host
 whilsttraveling.com: could not connect to host
+wipc.net: could not connect to host
 wm-talk.net: could not connect to host
 wnnc.co.uk: could not connect to host
 wordpresspro.cl: could not connect to host
+wormdisk.net: could not connect to host
 www-8887999.com: could not connect to host
 www.simbolo.co.uk: could not connect to host
+x64architecture.com: could not connect to host
 xa1.uk: could not connect to host
+xecureit.com: could not connect to host
 xing.ml: could not connect to host
 xtremenutrition.com.br: could not connect to host
 yoitsu.moe: could not connect to host
 yux.fr: could not connect to host
 zenfusion.fr: could not connect to host
 zenghx.tk: could not connect to host
 zmk.fr: could not connect to host
 zulu7.com: could not connect to host
@@ -452,17 +457,17 @@ 12vpn.org: could not connect to host
 12vpnchina.com: could not connect to host
 1391kj.com: did not receive HSTS header
 1396.net: could not connect to host
 1536.cf: could not connect to host
 163pwd.com: could not connect to host
 166166.com: could not connect to host
 16deza.com: did not receive HSTS header
 16packets.com: could not connect to host
-173vpn.cn: did not receive HSTS header
+173vpn.cn: could not connect to host
 173vpns.com: did not receive HSTS header
 188betwarriors.co.uk: could not connect to host
 188trafalgar.ca: did not receive HSTS header
 1921958389.rsc.cdn77.org: did not receive HSTS header
 195gm.com: could not connect to host
 1a-jva.de: could not connect to host
 1atic.com: could not connect to host
 1co-jp.net: did not receive HSTS header
@@ -470,16 +475,17 @@ 1cover.com: could not connect to host
 1k8b.com: could not connect to host
 1password.com: did not receive HSTS header
 1s.tn: could not connect to host
 1stcapital.com.sg: did not receive HSTS header
 1xcess.com: did not receive HSTS header
 1years.cc: could not connect to host
 206rc.net: max-age too low: 2592000
 20hs.cn: did not receive HSTS header
+21.co.uk: did not receive HSTS header
 21lg.co: could not connect to host
 22228522.com: could not connect to host
 247quickbooks.com: did not receive HSTS header
 24hourpaint.com: could not connect to host
 24sihu.com: could not connect to host
 25daysof.io: could not connect to host
 2859cc.com: could not connect to host
 2acbi-asso.fr: did not receive HSTS header
@@ -495,17 +501,17 @@ 300m.com: did not receive HSTS header
 300mbmovies4u.cc: could not connect to host
 301.website: could not connect to host
 302.nyc: could not connect to host
 314166.com: did not receive HSTS header
 32ph.com: could not connect to host
 33338522.com: could not connect to host
 3338522.com: could not connect to host
 33drugstore.com: did not receive HSTS header
-341.mg: did not receive HSTS header
+341.mg: could not connect to host
 3555aa.com: could not connect to host
 35792.de: could not connect to host
 360gradus.com: did not receive HSTS header
 365.or.jp: could not connect to host
 368mibn.com: could not connect to host
 3778xl.com: did not receive HSTS header
 38sihu.com: could not connect to host
 39sihu.com: could not connect to host
@@ -530,17 +536,17 @@ 4cclothing.com: could not connect to hos
 4elements.com: did not receive HSTS header
 4eyes.ch: did not receive HSTS header
 4miners.net: could not connect to host
 4ourty2.org: did not receive HSTS header
 4sqsu.eu: could not connect to host
 4w-performers.link: could not connect to host
 50millionablaze.org: could not connect to host
 513vpn.net: did not receive HSTS header
-517vpn.cn: did not receive HSTS header
+517vpn.cn: could not connect to host
 540.co: did not receive HSTS header
 54bf.com: could not connect to host
 55558522.com: could not connect to host
 56ct.com: could not connect to host
 5piecesofadvice.com: could not connect to host
 5w5.la: could not connect to host
 60ych.net: did not receive HSTS header
 6120.eu: did not receive HSTS header
@@ -589,17 +595,17 @@ 89955.com: could not connect to host
 90smthng.com: could not connect to host
 9118b.com: could not connect to host
 911911.pw: could not connect to host
 922.be: could not connect to host
 960news.ca: could not connect to host
 9651678.ru: could not connect to host
 98laba.com: could not connect to host
 98laba.net: could not connect to host
-99511.fi: did not receive HSTS header
+99511.fi: could not connect to host
 99998522.com: could not connect to host
 9jadirect.com: did not receive HSTS header
 9point6.com: could not connect to host
 9tolife.be: did not receive HSTS header
 a-intel.com: could not connect to host
 a-plus.space: could not connect to host
 a-rickroll-n.pw: could not connect to host
 a-theme.com: could not connect to host
@@ -679,16 +685,17 @@ addaxpetroleum.com: could not connect to
 addvocate.com: could not connect to host
 adelevie.com: could not connect to host
 adelinlydia-coach.com: did not receive HSTS header
 adequatetechnology.com: could not connect to host
 aderal.io: could not connect to host
 adfa-1.com: could not connect to host
 adhs-chaoten.net: did not receive HSTS header
 adindexr.com: could not connect to host
+adiponectinsupplement.net: did not receive HSTS header
 admin.google.com: did not receive HSTS header (error ignored - included regardless)
 admiral.dp.ua: did not receive HSTS header
 admitcard.co.in: did not receive HSTS header
 admsel.ec: could not connect to host
 adoge.me: could not connect to host
 adonairelogios.com.br: did not receive HSTS header
 adopteunsiteflash.com: could not connect to host
 adquisitio.de: could not connect to host
@@ -960,16 +967,17 @@ appengine.google.com: did not receive HS
 applez.xyz: could not connect to host
 applic8.com: did not receive HSTS header
 appraisal-comps.com: could not connect to host
 appreciationkards.com: did not receive HSTS header
 approlys.fr: did not receive HSTS header
 apps-for-fishing.com: could not connect to host
 appsbystudio.co.uk: did not receive HSTS header
 appsdash.io: could not connect to host
+aquariumaccessories.shop: did not receive HSTS header
 aquilalab.com: could not connect to host
 arabdigitalexpression.org: did not receive HSTS header
 aradulconteaza.ro: could not connect to host
 aran.me.uk: could not connect to host
 arboineuropa.nl: did not receive HSTS header
 arboleda-hurtado.com: could not connect to host
 arbu.eu: max-age too low: 2419200
 arcbit.io: could not connect to host
@@ -1126,16 +1134,17 @@ babybic.hu: did not receive HSTS header
 babycs.house: could not connect to host
 babyhouse.xyz: could not connect to host
 babymasaze.cz: did not receive HSTS header
 babysaying.me: could not connect to host
 bacchanallia.com: could not connect to host
 back-bone.nl: did not receive HSTS header
 backschues.de: could not connect to host
 bad.show: could not connect to host
+badai.at: did not receive HSTS header
 badcronjob.com: could not connect to host
 badenhard.eu: could not connect to host
 badkamergigant.com: could not connect to host
 badlink.org: could not connect to host
 baff.lu: could not connect to host
 bagiobella.com: max-age too low: 0
 baiduaccount.com: could not connect to host
 bailbondsaffordable.com: did not receive HSTS header
@@ -1245,16 +1254,17 @@ bernieware.de: could not connect to host
 berrymark.be: max-age too low: 0
 besixdouze.world: could not connect to host
 besnik.de: could not connect to host
 besola.de: did not receive HSTS header
 bestbeards.ca: could not connect to host
 bestbridal.top: could not connect to host
 bestcellular.com: did not receive HSTS header
 besthost.cz: did not receive HSTS header
+bestmodels.su: did not receive HSTS header
 bestof1001.de: did not receive HSTS header
 bestorangeseo.com: could not connect to host
 bestschools.top: could not connect to host
 betaclean.fr: did not receive HSTS header
 betafive.net: could not connect to host
 betakah.net: could not connect to host
 betcafearena.ro: could not connect to host
 bethanyduke.com: max-age too low: 7776000
@@ -1315,17 +1325,16 @@ bioespuna.eu: did not receive HSTS heade
 biofam.ru: did not receive HSTS header
 bioknowme.com: did not receive HSTS header
 bionicspirit.com: could not connect to host
 biophysik-ssl.de: did not receive HSTS header
 birkman.com: did not receive HSTS header
 bisterfeldt.com: could not connect to host
 bit-rapid.com: could not connect to host
 bitbit.org: did not receive HSTS header
-bitcantor.com: did not receive HSTS header
 bitchan.it: could not connect to host
 bitcoinprivacy.net: did not receive HSTS header
 bitcoinworld.me: could not connect to host
 bitconcepts.co.uk: could not connect to host
 biteoftech.com: did not receive HSTS header
 bitf.ly: could not connect to host
 bitfactory.ws: could not connect to host
 bitfarm-archiv.com: did not receive HSTS header
@@ -1337,16 +1346,17 @@ bitnet.io: did not receive HSTS header
 bitrage.de: could not connect to host
 bitraum.io: could not connect to host
 bitsafe.systems: could not connect to host
 bitvigor.com: did not receive HSTS header
 bitwrought.net: could not connect to host
 bivsi.com: could not connect to host
 bizcms.com: did not receive HSTS header
 bizon.sk: did not receive HSTS header
+bizpare.com: did not receive HSTS header
 bkb-skandal.ch: could not connect to host
 black-armada.com: could not connect to host
 black-armada.com.pl: could not connect to host
 black-armada.pl: could not connect to host
 black-octopus.ru: could not connect to host
 blackburn.link: could not connect to host
 blackkeg.ca: could not connect to host
 blacklane.com: did not receive HSTS header
@@ -1438,17 +1448,16 @@ bran.cc: could not connect to host
 branchtrack.com: did not receive HSTS header
 brandnewdays.nl: could not connect to host
 brandon.so: could not connect to host
 brandred.net: could not connect to host
 brandspray.com: could not connect to host
 brasilien.guide: could not connect to host
 brasilmorar.com: could not connect to host
 bratteng.xyz: could not connect to host
-brava.bg: did not receive HSTS header
 bravz.de: could not connect to host
 bremensaki.com: max-age too low: 2592000
 brenden.net.au: did not receive HSTS header
 brfvh24.se: could not connect to host
 brickoo.com: could not connect to host
 brickyardbuffalo.com: did not receive HSTS header
 bridholm.se: could not connect to host
 brightstarkids.com.au: did not receive HSTS header
@@ -1687,30 +1696,31 @@ cesidianroot.eu: could not connect to ho
 cevrimici.com: could not connect to host
 cfcproperties.com: did not receive HSTS header
 cfetengineering.com: could not connect to host
 cfoitplaybook.com: could not connect to host
 cg.search.yahoo.com: did not receive HSTS header
 cganx.org: could not connect to host
 cgerstner.eu: could not connect to host
 cgsshelper.tk: could not connect to host
+chabik.com: did not receive HSTS header
 chahub.com: could not connect to host
 chainmonitor.com: could not connect to host
 championsofregnum.com: did not receive HSTS header
 chandlerredding.com: did not receive HSTS header
 changetip.com: did not receive HSTS header
 chaos.fail: could not connect to host
 chaoswebs.net: did not receive HSTS header
 charityclear.com: did not receive HSTS header
 charitystreet.co.uk: could not connect to host
 charlipopkids.com.au: could not connect to host
 charnleyhouse.co.uk: did not receive HSTS header
 charp.eu: could not connect to host
 chartstoffarm.de: max-age too low: 10
-chaska.co.za: could not connect to host
+chaska.co.za: did not receive HSTS header
 chat-porc.eu: did not receive HSTS header
 chatbot.me: did not receive HSTS header
 chateauconstellation.ch: did not receive HSTS header
 chatup.cf: could not connect to host
 chcemvediet.sk: max-age too low: 1555200
 cheapdns.org: could not connect to host
 cheazey.net: did not receive HSTS header
 chebedara.com: could not connect to host
@@ -2050,33 +2060,33 @@ csgf.ru: did not receive HSTS header
 csgodicegame.com: did not receive HSTS header
 csgoelemental.com: could not connect to host
 csgokings.eu: could not connect to host
 csgoshifter.com: could not connect to host
 csohack.tk: could not connect to host
 cspbuilder.info: could not connect to host
 cssps.org: could not connect to host
 cssu.in: did not receive HSTS header
+csvalpha.nl: did not receive HSTS header
 csvape.com: did not receive HSTS header
 ct-status.org: could not connect to host
 ct.search.yahoo.com: did not receive HSTS header
 cthulhuden.com: could not connect to host
 ctrl.blog: did not receive HSTS header
 cubecart-demo.co.uk: did not receive HSTS header
 cubecart-hosting.co.uk: did not receive HSTS header
 cubecart.net: did not receive HSTS header
 cubeserver.eu: could not connect to host
 cubewano.com: could not connect to host
 cucc.date: did not receive HSTS header
 cujanovic.com: did not receive HSTS header
 cujba.com: could not connect to host
 culinae.nl: could not connect to host
 culture-school.top: could not connect to host
 cumshots-video.ru: could not connect to host
-cunha.be: could not connect to host
 cuntflaps.me: could not connect to host
 cuongquach.com: did not receive HSTS header
 curlyroots.com: did not receive HSTS header
 curroapp.com: could not connect to host
 curveweb.co.uk: did not receive HSTS header
 cusfit.com: did not receive HSTS header
 custe.rs: could not connect to host
 customadesign.com: did not receive HSTS header
@@ -2264,17 +2274,16 @@ devh.net: could not connect to host
 deviltraxxx.de: could not connect to host
 devincrow.me: could not connect to host
 devisonline.ch: could not connect to host
 devmsg.com: did not receive HSTS header
 devnsec.com: could not connect to host
 devnull.team: could not connect to host
 devopps.me: did not receive HSTS header
 devopsconnected.com: could not connect to host
-devpsy.info: could not connect to host
 devtub.com: did not receive HSTS header
 devuan.org: did not receive HSTS header
 dewebwerf.nl: did not receive HSTS header
 dewin.io: could not connect to host
 dfviana.com.br: max-age too low: 2592000
 dhaynes.xyz: could not connect to host
 dhpcs.com: did not receive HSTS header
 dhpiggott.net: did not receive HSTS header
@@ -2282,17 +2291,16 @@ diablotine.rocks: could not connect to h
 diagnosia.com: did not receive HSTS header
 dianlujitao.com: did not receive HSTS header
 diannaobos.com: did not receive HSTS header
 dicando.com: max-age too low: 2592000
 dicelab.co.uk: could not connect to host
 dicionariofinanceiro.com: did not receive HSTS header
 die-borts.ch: could not connect to host
 dieb.photo: could not connect to host
-diegorbaquero.com: did not receive HSTS header
 dierenkruiden.nl: could not connect to host
 diewebstube.de: could not connect to host
 diezel.com: could not connect to host
 diferenca.com: did not receive HSTS header
 digired.xyz: could not connect to host
 digitalbank.kz: could not connect to host
 digitaldaddy.net: could not connect to host
 digitaldashboard.gov: did not receive HSTS header
@@ -2451,21 +2459,20 @@ drycreekapiary.com: could not connect to
 ds-christiansen.de: could not connect to host
 dshiv.io: could not connect to host
 dtub.co: could not connect to host
 dualias.xyz: could not connect to host
 dubik.su: did not receive HSTS header
 duelysthub.com: could not connect to host
 duerls.de: did not receive HSTS header
 dukec.me: could not connect to host
-dullsir.com: could not connect to host
+dullsir.com: did not receive HSTS header
 dungi.org: could not connect to host
 duongpho.com: did not receive HSTS header
 duskopy.top: could not connect to host
-dutchessuganda.com: did not receive HSTS header
 dutchrank.com: did not receive HSTS header
 duuu.ch: could not connect to host
 dycontrol.de: could not connect to host
 dylanscott.com.au: did not receive HSTS header
 dynamic-innovations.net: could not connect to host
 dynamize.solutions: could not connect to host
 dyrkar.com: did not receive HSTS header
 dzimejl.sk: did not receive HSTS header
@@ -2562,16 +2569,17 @@ ego-world.org: could not connect to host
 ehealthcounselor.com: could not connect to host
 ehipaadev.com: could not connect to host
 ehito.ovh: could not connect to host
 ehrenamt-skpfcw.de: could not connect to host
 eicfood.com: could not connect to host
 eidolonhost.com: did not receive HSTS header
 eigo.work: could not connect to host
 einhorn.space: could not connect to host
+ejusu.com: did not receive HSTS header
 ekbanden.nl: could not connect to host
 eksik.com: could not connect to host
 elaintehtaat.fi: did not receive HSTS header
 elan-organics.com: did not receive HSTS header
 elanguest.pl: could not connect to host
 elanguest.ro: could not connect to host
 elanguest.ru: could not connect to host
 elaon.de: did not receive HSTS header
@@ -2584,17 +2592,16 @@ electricoperaduo.com: could not connect 
 electromc.com: could not connect to host
 elektronring.com: could not connect to host
 elementarywave.com: could not connect to host
 elemenx.com: could not connect to host
 elemprendedor.com.ve: did not receive HSTS header
 elenag.ga: could not connect to host
 elenagherta.ga: could not connect to host
 elenoon.ir: did not receive HSTS header
-elexprimidor.com: did not receive HSTS header
 elgacien.de: could not connect to host
 elimdengelen.com: did not receive HSTS header
 elite-porno.ru: could not connect to host
 elitecovering.fr: did not receive HSTS header
 elitefishtank.com: could not connect to host
 elmar-kraamzorg.nl: did not receive HSTS header
 elnutricionista.es: did not receive HSTS header
 elohna.ch: did not receive HSTS header
@@ -3010,16 +3017,17 @@ frau-inge.de: could not connect to host
 fraudempire.com: could not connect to host
 freeflow.tv: could not connect to host
 freelanced.co.za: could not connect to host
 freelo.cz: did not receive HSTS header
 freematthale.net: did not receive HSTS header
 freesoftwaredriver.com: did not receive HSTS header
 freethought.org.au: could not connect to host
 freeutopia.org: did not receive HSTS header
+freifunk-burgaltendorf.de: could not connect to host
 freqlabs.com: did not receive HSTS header
 freshfind.xyz: could not connect to host
 freshlymind.com: did not receive HSTS header
 frezbo.com: could not connect to host
 frforms.com: did not receive HSTS header
 fridolinka.cz: could not connect to host
 friendica.ch: could not connect to host
 friendlyfiregameshow.com: could not connect to host
@@ -3305,17 +3313,17 @@ grandchamproofing.com: did not receive H
 grandlinecsk.ru: did not receive HSTS header
 grandmascookieblog.com: did not receive HSTS header
 grantedby.me: max-age too low: 0
 grantmorrison.net: did not receive HSTS header
 graph.no: did not receive HSTS header
 graphsearchengine.com: could not connect to host
 gratis-app.com: did not receive HSTS header
 gratis-lovecheck.de: could not connect to host
-gravitation.pro: did not receive HSTS header
+gravitation.pro: could not connect to host
 gravito.nl: did not receive HSTS header
 gravity-net.de: could not connect to host
 graycell.net: could not connect to host
 grazetech.com: did not receive HSTS header
 grcnode.co.uk: could not connect to host
 greatideahub.com: did not receive HSTS header
 greatnet.de: did not receive HSTS header
 greatsong.net: did not receive HSTS header
@@ -3708,17 +3716,16 @@ ichnichtskaufmann.de: could not connect 
 ichoosebtec.com: did not receive HSTS header
 icity.ly: did not receive HSTS header
 icloud.net: could not connect to host
 icntorrent.download: could not connect to host
 icq-project.net: could not connect to host
 icreative.nl: did not receive HSTS header
 id-co.in: could not connect to host
 id-conf.com: did not receive HSTS header
-idcrane.com: could not connect to host
 ideal-envelopes.co.uk: did not receive HSTS header
 idealmoto.com: did not receive HSTS header
 idealmykonos.com: did not receive HSTS header
 ideaman924.com: did not receive HSTS header
 ideaplus.me: could not connect to host
 ideasmeetingpoint.com: could not connect to host
 ideation-inc.co.jp: could not connect to host
 idedr.com: could not connect to host
@@ -3782,16 +3789,17 @@ immunicity.today: did not receive HSTS h
 immunicity.top: could not connect to host
 immunicity.win: could not connect to host
 immunicity.works: did not receive HSTS header
 immunicity.world: did not receive HSTS header
 imolug.org: did not receive HSTS header
 imoni-blog.net: could not connect to host
 imoto.me: could not connect to host
 imouto.my: max-age too low: 5184000
+imouyang.com: did not receive HSTS header
 imperialwebsolutions.com: did not receive HSTS header
 imu.li: did not receive HSTS header
 imusic.dk: did not receive HSTS header
 inb4.us: could not connect to host
 inbox.li: did not receive HSTS header
 incendiary-arts.com: could not connect to host
 inche-ali.com: did not receive HSTS header
 inchomatic.com: did not receive HSTS header
@@ -4065,17 +4073,16 @@ jeugdkans.nl: did not receive HSTS heade
 jewellerydesignstore.com: could not connect to host
 jfmel.com: did not receive HSTS header
 jfx.space: did not receive HSTS header
 jh-media.eu: could not connect to host
 jhburton.uk: could not connect to host
 jhejderup.me: could not connect to host
 jia1hao.com: could not connect to host
 jiaidu.com: could not connect to host
-jiangzm.com: did not receive HSTS header
 jichi.me: could not connect to host
 jikken.de: could not connect to host
 jimas.eu: did not receive HSTS header
 jimenacocina.com: did not receive HSTS header
 jimgao.tk: did not receive HSTS header
 jimmehcai.com: could not connect to host
 jimmycai.org: could not connect to host
 jingyuesi.com: could not connect to host
@@ -4434,17 +4441,17 @@ lana.swedbank.se: did not receive HSTS h
 lanauzedesigns.com: did not receive HSTS header
 lanboll.com: could not connect to host
 lancehoteis.com: did not receive HSTS header
 lancehoteis.com.br: did not receive HSTS header
 land-links.org: did not receive HSTS header
 landgoedverkopen.nl: could not connect to host
 landhuisverkopen.nl: could not connect to host
 landscape.canonical.com: max-age too low: 2592000
-landscapingmedic.com: did not receive HSTS header
+landscapingmedic.com: could not connect to host
 langenbach.rocks: could not connect to host
 langendries.eu: could not connect to host
 langhun.me: did not receive HSTS header
 laniakean.com: did not receive HSTS header
 lanzainc.xyz: did not receive HSTS header
 laobox.fr: could not connect to host
 laospage.com: max-age too low: 2592000
 laplaceduvillage.net: could not connect to host
@@ -4554,16 +4561,17 @@ lifecoachproviders.com: did not receive 
 lifeguard.aecom.com: did not receive HSTS header
 lifeinitsownway.com: could not connect to host
 lifeskillsdirect.com: did not receive HSTS header
 lifetimemoneymachine.com: did not receive HSTS header
 lightarmory.com: could not connect to host
 lightning-ashe.com: did not receive HSTS header
 lightpaste.com: could not connect to host
 lightworx.io: did not receive HSTS header
+likc.me: max-age too low: 0
 lila.pink: did not receive HSTS header
 lillepuu.com: did not receive HSTS header
 lillpopp.eu: max-age too low: 10
 lilpwny.com: could not connect to host
 lilycms.com: could not connect to host
 lim-light.com: did not receive HSTS header
 limalama.eu: max-age too low: 1
 limeyeti.com: could not connect to host
@@ -4899,17 +4907,16 @@ mcc.re: could not connect to host
 mccarty.io: could not connect to host
 mcdonalds.ru: did not receive HSTS header
 mcga.media: could not connect to host
 mclab.su: could not connect to host
 mclist.it: could not connect to host
 mclyr.com: max-age too low: 7776000
 mcooperlaw.com: did not receive HSTS header
 mdfnet.se: did not receive HSTS header
-mdkr.nl: did not receive HSTS header
 mdscomp.net: did not receive HSTS header
 meadowfen.farm: could not connect to host
 meadowfenfarm.com: could not connect to host
 meamod.com: max-age too low: 0
 meat-education.com: could not connect to host
 mebio.us: did not receive HSTS header
 mecenat-cassous.com: did not receive HSTS header
 mechmk1.me: did not receive HSTS header
@@ -5006,17 +5013,17 @@ micro-rain-systems.com: did not receive 
 microme.ga: could not connect to host
 micropple.net: could not connect to host
 microtalk.org: could not connect to host
 midirs.org: did not receive HSTS header
 midonet.org: did not receive HSTS header
 midwestwomenworkers.org: could not connect to host
 miegl.cz: could not connect to host
 miemie.jp: could not connect to host
-migeeks.de: did not receive HSTS header
+migeeks.de: could not connect to host
 mightydicks.io: could not connect to host
 mightydicks.tech: could not connect to host
 mightysounds.cz: max-age too low: 0
 migrator.co: did not receive HSTS header
 miguksaram.com: could not connect to host
 mijcorijneveld.nl: did not receive HSTS header
 mijn-email.org: could not connect to host
 mijnetickets.nl: did not receive HSTS header
@@ -5239,19 +5246,20 @@ mutamatic.com: could not connect to host
 mutuelle-obligatoire-pme.fr: did not receive HSTS header
 muzgra.in: did not receive HSTS header
 muzykaprzeszladoplay.pl: could not connect to host
 mvanmarketing.nl: did not receive HSTS header
 mvsecurity.nl: could not connect to host
 mw.search.yahoo.com: did not receive HSTS header
 mwohlfarth.de: did not receive HSTS header
 my-owncloud.com: could not connect to host
+my-pawnshop.com.ua: did not receive HSTS header
 my-voice.nl: did not receive HSTS header
 my.alfresco.com: did not receive HSTS header
-my.swedbank.se: could not connect to host
+my.swedbank.se: did not receive HSTS header
 myairshop.gr: could not connect to host
 myandroid.tools: could not connect to host
 myandroidtools.cc: could not connect to host
 myandroidtools.pro: could not connect to host
 mybudget.xyz: could not connect to host
 mybuilderinlondon.co.uk: did not receive HSTS header
 mybusiness.cm: did not receive HSTS header
 mychocolateweightloss.com: did not receive HSTS header
@@ -5355,17 +5363,17 @@ ndtmarket.place: could not connect to ho
 near.st: did not receive HSTS header
 neavision.de: did not receive HSTS header
 nebra.io: could not connect to host
 nebulousenhanced.com: could not connect to host
 nedwave.com: could not connect to host
 nedzad.me: could not connect to host
 neftaly.com: did not receive HSTS header
 negativzinsen.info: did not receive HSTS header
-neilgreen.net: did not receive HSTS header
+neilgreen.net: could not connect to host
 neko-life.com: did not receive HSTS header
 neko-system.com: did not receive HSTS header
 nemno.de: could not connect to host
 nemovement.org: could not connect to host
 neoani.me: could not connect to host
 neofelhz.space: could not connect to host
 neonisi.com: could not connect to host
 neonnuke.tech: could not connect to host
@@ -5405,17 +5413,16 @@ newhdmovies.io: could not connect to hos
 newkaliningrad.ru: did not receive HSTS header
 newlooknow.com: did not receive HSTS header
 newmelalife.com: did not receive HSTS header
 newparadigmventures.net: did not receive HSTS header
 newportpropertygroup.com: could not connect to host
 newstarnootropics.com: max-age too low: 7776000
 newtonwarp.com: could not connect to host
 next176.sk: did not receive HSTS header
-next24.io: did not receive HSTS header
 next47.com: did not receive HSTS header
 nextcloud.org: could not connect to host
 nexth.de: could not connect to host
 nexth.net: could not connect to host
 nexth.us: could not connect to host
 nextpages.de: could not connect to host
 nextproject.us: could not connect to host
 nexusbyte.de: could not connect to host
@@ -5489,17 +5496,16 @@ nosecretshop.com: could not connect to h
 notadd.com: did not receive HSTS header
 notadd.io: could not connect to host
 notarankastojkovic.me: could not connect to host
 notenoughtime.de: could not connect to host
 nothing.net.nz: max-age too low: 7776000
 noticia.do: did not receive HSTS header
 notjustbitchy.com: did not receive HSTS header
 nottheonion.net: did not receive HSTS header
-nottres.com: did not receive HSTS header
 nou.si: could not connect to host
 nouvelle-vague-saint-cast.fr: did not receive HSTS header
 nova-elearning.com: did not receive HSTS header
 novaco.in: max-age too low: 3600
 novacoast.com: did not receive HSTS header
 novacraft.me: did not receive HSTS header
 novatrucking.de: could not connect to host
 novavoidhowl.com: did not receive HSTS header
@@ -5585,16 +5591,17 @@ officeclub.com.mx: did not receive HSTS 
 offshore-firma.org: could not connect to host
 offshore-unternehmen.com: could not connect to host
 offshorefirma-gruenden.com: could not connect to host
 offshoremarineparts.com: did not receive HSTS header
 oganek.ie: could not connect to host
 ogogoshop.com: could not connect to host
 ohai.su: could not connect to host
 ohling.org: could not connect to host
+ohm2013.org: did not receive HSTS header
 ohsocool.org: could not connect to host
 ohyooo.com: could not connect to host
 oiepoie.nl: could not connect to host
 oishioffice.com: did not receive HSTS header
 ojls.co: could not connect to host
 okane.love: could not connect to host
 okok-rent.com: could not connect to host
 okok.rent: could not connect to host
@@ -5817,17 +5824,16 @@ passwordrevelator.net: did not receive H
 pastaf.com: could not connect to host
 pastdream.xyz: did not receive HSTS header
 paste.linode.com: could not connect to host
 pastebin.linode.com: could not connect to host
 pastenib.com: could not connect to host
 paster.li: could not connect to host
 pataua.kiwi: did not receive HSTS header
 paternitydnatest.com: could not connect to host
-paterno-gaming.com: did not receive HSTS header
 patfs.com: did not receive HSTS header
 pathwaytofaith.com: could not connect to host
 patientinsight.net: did not receive HSTS header
 patt.us: could not connect to host
 patterson.mp: could not connect to host
 paul-kerebel.pro: could not connect to host
 paulbunyanmls.com: did not receive HSTS header
 paulproell.at: could not connect to host
@@ -5988,16 +5994,17 @@ play.google.com: did not receive HSTS he
 playerhunter.com: did not receive HSTS header
 playerscout.net: did not receive HSTS header
 playflick.com: did not receive HSTS header
 playmaker.io: could not connect to host
 playnation.io: could not connect to host
 pleasure.forsale: could not connect to host
 pleier-it.de: did not receive HSTS header
 pleier.it: did not receive HSTS header
+plexhome13.ddns.net: could not connect to host
 plfgr.eu.org: could not connect to host
 plhdb.org: did not receive HSTS header
 plirt.ru: could not connect to host
 plixer.com: did not receive HSTS header
 plogable.co: could not connect to host
 plombirator.kz: did not receive HSTS header
 plothost.com: did not receive HSTS header
 ploup.net: could not connect to host
@@ -6176,17 +6183,16 @@ pumpgames.net: could not connect to host
 punchr-kamikazee.rhcloud.com: did not receive HSTS header
 puppydns.com: did not receive HSTS header
 purewebmasters.com: could not connect to host
 purplebricks.com: did not receive HSTS header
 purplemoon.mobi: did not receive HSTS header
 purplestar.mobi: did not receive HSTS header
 push.world: did not receive HSTS header
 pushapp.org: did not receive HSTS header
-pv-paderborn-now.de: did not receive HSTS header
 pwd.ovh: could not connect to host
 pwm.jp: could not connect to host
 pwnsdx.pw: could not connect to host
 py.search.yahoo.com: did not receive HSTS header
 pyol.org: could not connect to host
 pypi-mirrors.org: did not receive HSTS header
 pypi-status.org: could not connect to host
 pyplo.org: did not receive HSTS header
@@ -6269,17 +6275,17 @@ randomwinpicker.de: could not connect to
 randy.pw: could not connect to host
 ranegroup.hosting: could not connect to host
 rankthespot.com: could not connect to host
 ranktopay.com: did not receive HSTS header
 rannseier.org: did not receive HSTS header
 rany.duckdns.org: could not connect to host
 rany.io: could not connect to host
 rany.pw: could not connect to host
-rapido.nu: did not receive HSTS header
+rapido.nu: could not connect to host
 rapidresearch.me: could not connect to host
 rapidthunder.io: could not connect to host
 rasing.me: did not receive HSTS header
 rastreador.com.es: did not receive HSTS header
 ratajczak.fr: could not connect to host
 rate-esport.de: could not connect to host
 ratuseks.com: could not connect to host
 ratuseks.net: could not connect to host
@@ -6563,16 +6569,17 @@ salserocafe.com: did not receive HSTS he
 salserototal.com: could not connect to host
 saltedskies.com: could not connect to host
 saltra.online: did not receive HSTS header
 saludsexualmasculina.org: did not receive HSTS header
 samegoal.org: did not receive HSTS header
 sametovymesic.cz: could not connect to host
 samfunnet.no: max-age too low: 0
 saml2.com: could not connect to host
+samm.com.au: did not receive HSTS header
 sampcup.com: could not connect to host
 sampoznay.ru: did not receive HSTS header
 samraskauskas.com: could not connect to host
 samsen.club: did not receive HSTS header
 samui-samui.de: did not receive HSTS header
 sanasalud.org: could not connect to host
 sanatfilan.com: could not connect to host
 sandviks.com: did not receive HSTS header
@@ -6951,17 +6958,16 @@ smksultanismail2.com: did not receive HS
 smove.sg: did not receive HSTS header
 smplix.com: could not connect to host
 smusg.com: could not connect to host
 smzsq.com: did not receive HSTS header
 snailing.org: could not connect to host
 snakehosting.dk: did not receive HSTS header
 snapappts.com: could not connect to host
 snapworks.net: did not receive HSTS header
-sneeuwhoogtes.eu: could not connect to host
 snekchat.moe: could not connect to host
 snel4u.nl: could not connect to host
 snelwerk.be: could not connect to host
 sng.my: could not connect to host
 snip.host: could not connect to host
 snippet.host: could not connect to host
 snoozedds.com: max-age too low: 600
 snoqualmiefiber.org: could not connect to host
@@ -7103,17 +7109,16 @@ standardssuck.org: did not receive HSTS 
 standingmist.com: did not receive HSTS header
 starandshield.com: did not receive HSTS header
 starapple.nl: did not receive HSTS header
 starfeeling.net: could not connect to host
 stargatepartners.com: did not receive HSTS header
 starmusic.ga: did not receive HSTS header
 starttraffic.com: did not receive HSTS header
 startuponcloud.com: max-age too low: 2678400
-startuppeople.co.uk: could not connect to host
 stash.ai: did not receive HSTS header
 stassi.ch: did not receive HSTS header
 state-sponsored-actors.net: could not connect to host
 statementinsertsforless.com: did not receive HSTS header
 stateofexception.io: could not connect to host
 static.or.at: did not receive HSTS header
 staticanime.net: could not connect to host
 stationaryjourney.com: did not receive HSTS header
@@ -7202,16 +7207,17 @@ sugarcitycon.com: could not connect to h
 suian.or.jp: max-age too low: 86400
 suite73.org: could not connect to host
 sujoydhar.in: did not receive HSTS header
 summitbankofkc.com: did not receive HSTS header
 sumoatm.com: did not receive HSTS header
 sumoscout.de: could not connect to host
 suncountrymarine.com: did not receive HSTS header
 sundanceusa.com: did not receive HSTS header
+sunflyer.cn: did not receive HSTS header
 sunlandsg.vn: did not receive HSTS header
 sunnyfruit.ru: could not connect to host
 sunshinepress.org: could not connect to host
 sunyanzi.tk: could not connect to host
 suos.io: could not connect to host
 supcro.com: could not connect to host
 super-erotica.ru: could not connect to host
 super-garciniaslim.com: could not connect to host
@@ -7305,17 +7311,16 @@ talado.gr: could not connect to host
 tales-of-interia.de: could not connect to host
 talheim-records.ca: could not connect to host
 talk.google.com: did not receive HSTS header (error ignored - included regardless)
 talkitup.mx: could not connect to host
 talkitup.online: did not receive HSTS header
 talklifestyle.nl: could not connect to host
 tallr.se: could not connect to host
 tallshoe.com: could not connect to host
-talon.rip: did not receive HSTS header
 tamex.xyz: could not connect to host
 tandarts-haarlem.nl: did not receive HSTS header
 tangel.me: could not connect to host
 tangibilizing.com: could not connect to host
 taniesianie.pl: did not receive HSTS header
 tankfreunde.de: did not receive HSTS header
 tante-bugil.net: could not connect to host
 tanze-jetzt.de: could not connect to host
@@ -7888,31 +7893,31 @@ univz.com: could not connect to host
 unixtime.pro: could not connect to host
 unknownphenomena.net: could not connect to host
 unleash.pw: max-age too low: 7889231
 unmanaged.space: could not connect to host
 unplugg3r.dk: could not connect to host
 unravel.ie: could not connect to host
 unsystem.net: could not connect to host
 unwiredbrain.com: could not connect to host
+unwomen.is: did not receive HSTS header
 unyq.me: could not connect to host
 uonstaffhub.com: could not connect to host
 uow.ninja: could not connect to host
 up1.ca: could not connect to host
 upaknship.com: did not receive HSTS header
 upboard.jp: could not connect to host
 upldr.pw: could not connect to host
 uporoops.com: could not connect to host
 uprotect.it: could not connect to host
 upstats.eu: could not connect to host
 ur-lauber.de: did not receive HSTS header
 urandom.eu.org: did not receive HSTS header
 urban-garden.lt: could not connect to host
 urban-garden.lv: could not connect to host
-urbanfi.sh: did not receive HSTS header
 urbanstylestaging.com: did not receive HSTS header
 urbpic.com: could not connect to host
 urlchomp.com: did not receive HSTS header
 urphp.com: could not connect to host
 us-immigration.com: did not receive HSTS header
 usaab.org: did not receive HSTS header
 usafuelservice.com: did not receive HSTS header
 usbirthcertificate.com: did not receive HSTS header
@@ -8125,17 +8130,16 @@ vyncke.org: max-age too low: 2678400
 vyvybean.cf: could not connect to host
 vyvygen.com: did not receive HSTS header
 vzk.io: could not connect to host
 w4a.fr: did not receive HSTS header
 w4xzr.top: could not connect to host
 w4xzr.xyz: could not connect to host
 waaw.tv: did not receive HSTS header
 wachtwoordencheck.nl: could not connect to host
-wafairhaven.com.au: did not receive HSTS header
 wait.moe: could not connect to host
 waixingrenfuli7.vip: could not connect to host
 wakapp.de: could not connect to host
 wakened.net: did not receive HSTS header
 walkeryoung.ca: could not connect to host
 wallabag.it: did not receive HSTS header
 wallabag.org: did not receive HSTS header
 wallet.google.com: did not receive HSTS header (error ignored - included regardless)
@@ -8214,17 +8218,16 @@ webwork.pw: could not connect to host
 webypass.xyz: could not connect to host
 wecanfindit.co.za: could not connect to host
 wecanvisit.com: could not connect to host
 weddingenvelopes.co.uk: did not receive HSTS header
 weddingibiza.nl: could not connect to host
 weekly.fyi: could not connect to host
 wegenaer.nl: could not connect to host
 weiji.ga: did not receive HSTS header
-weisse-liste.de: did not receive HSTS header
 welkers.org: could not connect to host
 wellastore.ru: did not receive HSTS header
 wellcomp.com.br: did not receive HSTS header
 wellies.com.au: max-age too low: 7776000
 wellness.so: could not connect to host
 welpy.com: could not connect to host
 weltentreff.com: could not connect to host
 weltmeisterschaft.net: could not connect to host
@@ -8513,17 +8516,17 @@ yaoidreams.com: did not receive HSTS hea
 yaporn.tv: did not receive HSTS header
 yard-fu.com: could not connect to host
 yardbird.us: could not connect to host
 yarnhookup.com: did not receive HSTS header
 yasinaydin.net: max-age too low: 2592000
 yasutomonodokoiko.com: did not receive HSTS header
 yatesun.com: did not receive HSTS header
 ycc.wtf: could not connect to host
-ychon.com: did not receive HSTS header
+ychon.com: could not connect to host
 ycm2.wtf: could not connect to host
 yd.io: could not connect to host
 ydy.jp: could not connect to host
 yello.website: could not connect to host
 yenniferallulli.com: could not connect to host
 yenniferallulli.de: could not connect to host
 yenniferallulli.es: did not receive HSTS header
 yenniferallulli.moda: could not connect to host
@@ -8562,22 +8565,22 @@ youon.tokyo: could not connect to host
 yourbapp.ch: could not connect to host
 yourcomputer.expert: did not receive HSTS header
 yoursecondphone.co: could not connect to host
 yourstrongbox.com: could not connect to host
 ypiresia.fr: could not connect to host
 ytcuber.xyz: could not connect to host
 ytvwld.de: did not receive HSTS header
 yu7.jp: did not receive HSTS header
+yufan.me: did not receive HSTS header
 yugege.cf: could not connect to host
 yuhen.ru: did not receive HSTS header
 yukiminami.net: could not connect to host
 yuko.moe: could not connect to host
 yukonrefugees.com: could not connect to host
-yum0.cn: did not receive HSTS header
 yummyfamilyrecipes.com: could not connect to host
 yunpan.blue: did not receive HSTS header
 yuntama.xyz: did not receive HSTS header
 yunzhan.io: could not connect to host
 yunzhu.li: did not receive HSTS header
 yunzhu.org: could not connect to host
 yuriykuzmin.com: did not receive HSTS header
 yutabon.com: could not connect to host
@@ -8594,17 +8597,16 @@ zahyantechnologies.com: could not connec
 zakoncontrol.com: did not receive HSTS header
 zamorano.edu: could not connect to host
 zamos.ru: max-age too low: 0
 zaneweb.org: could not connect to host
 zao.fi: did not receive HSTS header
 zaoshanghao-dajia.rhcloud.com: did not receive HSTS header
 zap.yt: did not receive HSTS header
 zarooba.com: could not connect to host
-zary.me: did not receive HSTS header
 zavca.com: did not receive HSTS header
 zbigniewgalucki.eu: did not receive HSTS header
 zcon.nl: could not connect to host
 zdravotnickasluzba.eu: could not connect to host
 zebrababy.cn: could not connect to host
 zebry.nl: could not connect to host
 zecrypto.com: could not connect to host
 zeedroom.be: did not receive HSTS header
@@ -8660,16 +8662,17 @@ zjutv.com: could not connect to host
 zk.gd: did not receive HSTS header
 zkillboard.com: did not receive HSTS header
 zking.ga: could not connect to host
 zmsastro.co.za: could not connect to host
 zmy.im: did not receive HSTS header
 zocken.com: did not receive HSTS header
 zoe.vc: could not connect to host
 zohar.link: could not connect to host
+zolotoy-standart.com.ua: did not receive HSTS header
 zomiac.pp.ua: could not connect to host
 zoneminder.com: did not receive HSTS header
 zoners.si: could not connect to host
 zonky.io: could not connect to host
 zoo24.de: did not receive HSTS header
 zoofaeth.de: did not receive HSTS header
 zoomingin.net: max-age too low: 5184000
 zoommailing.com: did not receive HSTS header
--- a/security/manager/ssl/nsSTSPreloadList.inc
+++ b/security/manager/ssl/nsSTSPreloadList.inc
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /*****************************************************************************/
 /* This is an automatically generated file. If you're not                    */
 /* nsSiteSecurityService.cpp, you shouldn't be #including it.     */
 /*****************************************************************************/
 
 #include <stdint.h>
-const PRTime gPreloadListExpirationTime = INT64_C(1518675616440000);
+const PRTime gPreloadListExpirationTime = INT64_C(1518716942697000);
 %%
 0.me.uk, 1
 00001.am, 1
 00002.am, 1
 0005pay.com, 1
 0010100.net, 1
 00220022.net, 1
 007-preisvergleich.de, 1
@@ -130,16 +130,17 @@ 1511774230.rsc.cdn77.org, 1
 1590284872.rsc.cdn77.org, 1
 1600esplanade.com, 1
 16164f.com, 1
 1644091933.rsc.cdn77.org, 1
 174.net.nz, 1
 1750studios.com, 0
 17hats.com, 1
 1844329061.rsc.cdn77.org, 1
+188522.com, 1
 18888msc.com, 1
 1888zr.com, 1
 18f.gov, 1
 18f.gsa.gov, 0
 1972969867.rsc.cdn77.org, 1
 1981612088.rsc.cdn77.org, 1
 1a-diamantscheiben.de, 1
 1a-vermessung.at, 1
@@ -177,17 +178,16 @@ 1three1.net, 1
 1whw.co.uk, 1
 1wirelog.de, 1
 1wl.uk, 1
 2-cpu.de, 1
 2.wtf, 1
 2048-spiel.de, 1
 2048game.co.uk, 1
 208.es, 1
-21.co.uk, 1
 21stnc.com, 1
 21x9.org, 1
 22scc.com, 1
 2333.press, 1
 233abc.com, 1
 24-7.jp, 1
 246060.ru, 1
 247a.co.uk, 1
@@ -704,17 +704,16 @@ adevel.eu, 1
 adhesivelaundry.co.uk, 1
 adhigamindia.com, 1
 adhoc.is, 1
 adhosting.nl, 1
 adigitali.biz, 1
 adimaja.com, 1
 adinariversloveschool.com, 1
 adiponectinsupplement.info, 1
-adiponectinsupplement.net, 1
 adjagu.org, 1
 adlershop.ch, 1
 adlerweb.info, 1
 adm-sarov.ru, 1
 adme.co.il, 1
 admin-serv.net, 1
 admin.fedoraproject.org, 1
 admin.google.com, 1
@@ -1727,32 +1726,32 @@ aqua-fotowelt.de, 1
 aquabio.ch, 1
 aquadonis.ch, 1
 aquahomo.com, 1
 aqualife.com.gr, 1
 aqualifeprojects.com, 1
 aqualogy.de, 1
 aquapoint.kiev.ua, 1
 aquarium-supplement.net, 1
-aquariumaccessories.shop, 1
 aquaron.com, 1
 aquaselect.eu, 1
 aquatechnologygroup.com, 1
 aquaundine.net, 1
 aquavitaedayspa.com.au, 1
 aquila.co.uk, 1
 aquilaguild.com, 1
 aquireceitas.com, 1
 aquitroc.com, 1
 ar-informatique.ch, 1
 ar.al, 1
 arab.dating, 1
 arabsexi.info, 1
 arachina.com, 1
 arados.de, 1
+arai21.net, 1
 araleeniken.com, 1
 aramado.com, 1
 aramido.de, 1
 aranel.me, 1
 aranycsillag.net, 1
 araratour.com, 1
 araro.ch, 1
 araseifudousan.com, 1
@@ -1897,16 +1896,17 @@ artlantis.nl, 1
 artleading.ru, 1
 artlego.com, 1
 artlifeisgood.com, 1
 artlogo.biz, 1
 artlogo.cz, 1
 artlogo.sk, 1
 artmaxi.eu, 1
 artmoney.com, 1
+arto.bg, 1
 artofeyes.nl, 1
 artofwhere.com, 1
 artroot.jp, 1
 artschmidtoptical.com, 1
 artsinthevalley.net.au, 1
 artspac.es, 1
 artstopinc.com, 1
 arturrossa.de, 1
@@ -1914,16 +1914,17 @@ arturszalak.com, 1
 artweby.cz, 1
 arty.name, 1
 artyland.ru, 1
 arubasunsetbeach.com, 1
 arveron.ch, 1
 arvid.io, 1
 arvindhariharan.com, 1
 arvindhariharan.me, 1
+arvutiladu.ee, 1
 arw.me, 1
 arxell.com, 1
 aryan-nation.com, 1
 aryasenna.net, 1
 arzid.com, 1
 as200753.com, 1
 as200753.net, 1
 as44222.net, 1
@@ -2263,23 +2264,25 @@ avtovokzaly.ru, 1
 avvcorda.com, 1
 avxo.pw, 1
 awan.tech, 1
 awaremi-tai.com, 1
 awaro.net, 1
 awccanadianpharmacy.com, 1
 awei.pub, 1
 awen.me, 1
+awf0.xyz, 1
 awin.la, 1
 awk.tw, 1
 awksolutions.com, 1
 awningsaboveus.com, 1
 awomaninherprime.com, 1
 awsmdev.de, 1
 ax25.org, 1
+axel-fischer.science, 1
 axelteichmann.net, 1
 axem.co.jp, 1
 axg.io, 1
 axialsports.com, 1
 axiomer.com, 1
 axiomer.es, 1
 axiomer.eu, 1
 axiomer.me, 1
@@ -2369,17 +2372,16 @@ backsideverbier.ch, 1
 backterris.com, 1
 backyardbbqbash.com, 1
 bacon-monitoring.org, 1
 baconate.com, 1
 bacontreeconsulting.com, 1
 bacula.jp, 1
 bad.horse, 1
 bad.pet, 1
-badai.at, 1
 badam.co, 1
 badbee.cc, 1
 badf00d.de, 1
 badges.fedoraproject.org, 1
 badges.stg.fedoraproject.org, 1
 badhusky.com, 1
 badoo.com, 1
 badpackets.net, 1
@@ -2862,17 +2864,16 @@ bestessaycheap.com, 1
 bestessayhelp.com, 1
 bestfitnesswatchreview.info, 1
 bestgiftever.ca, 1
 bestgifts4you.com, 1
 besthotsales.com, 1
 bestlashesandbrows.com, 1
 bestlashesandbrows.hu, 1
 bestleftwild.com, 1
-bestmodels.su, 1
 bestmotherfucking.website, 1
 bestperfumebrands.com, 1
 bestseries.tv, 1
 bestwarezone.com, 1
 bestwebsite.gallery, 1
 bet-99.com, 1
 betamint.org, 1
 betaworx.de, 1
@@ -3119,16 +3120,17 @@ bit.voyage, 1
 bit8.com, 1
 bitace.com, 1
 bitbeans.de, 1
 bitbr.net, 1
 bitbucket.com, 1
 bitbucket.io, 1
 bitbucket.org, 1
 bitburner.de, 1
+bitcantor.com, 1
 bitcoin-class.com, 1
 bitcoin-daijin.com, 1
 bitcoin-india.net, 1
 bitcoin-india.org, 1
 bitcoin.asia, 1
 bitcoin.ch, 1
 bitcoin.co.nz, 1
 bitcoin.com, 1
@@ -3197,17 +3199,16 @@ bityes.org, 1
 biurokarier.edu.pl, 1
 bixservice.com, 1
 biyou-homme.com, 1
 biz4x.com, 1
 bizeau.ch, 1
 bizedge.co.nz, 1
 bizniskatalog.mk, 1
 biznpro.ru, 1
-bizpare.com, 1
 biztera.com, 1
 biztok.eu, 1
 bizzartech.com, 1
 bizzi.tv, 1
 bjarnerest.de, 1
 bjgongyi.com, 1
 bjornhelmersson.se, 1
 bjornjohansen.no, 1
@@ -3650,16 +3651,17 @@ brasilbombas.com.br, 1
 brasserie-mino.fr, 1
 brasspipedreams.org, 1
 bratislava-airport-taxi.com, 1
 bratteng.me, 0
 bratvanov.com, 1
 brauingenieur.de, 1
 braunsteinpc.com, 1
 braunwarth.info, 1
+brava.bg, 1
 brave-foods.ch, 1
 brave-foods.com, 1
 brave.com, 1
 braviskindenjeugd.nl, 1
 bravisziekenhuis.nl, 1
 brazilian.dating, 1
 brazillens.com, 1
 brb.city, 1
@@ -3985,16 +3987,17 @@ bxdev.me, 1
 bxp40.at, 1
 by1896.com, 1
 by1898.com, 1
 by1899.com, 1
 by77.com, 1
 by777.com, 1
 byatte.com, 1
 bygningsregistrering.dk, 1
+byiu.info, 1
 byji.com, 1
 bymark.co, 1
 bymike.co, 1
 bynder.com, 1
 bypass.kr, 1
 bypass.sh, 1
 byrko.cz, 1
 byrko.sk, 1
@@ -4079,16 +4082,17 @@ cais.de, 1
 caitcs.com, 1
 caja-pdf.es, 1
 cajio.ru, 0
 cajunuk.co.uk, 1
 cake-time.co.uk, 1
 cakestart.net, 1
 caketoindia.com, 1
 cakingandbaking.com, 1
+cal.goip.de, 1
 calaad.net, 1
 calabasaselectrical.com, 1
 calaborlawnews.com, 1
 calc.pw, 1
 calculatoaresecondhand.xyz, 1
 calculator-imt.com, 1
 calculator.tf, 1
 calcworkshop.com, 1
@@ -4533,17 +4537,16 @@ cgbilling.com, 1
 cgcookiemarkets.com, 1
 cgsmart.com, 1
 cgtx.us, 1
 ch-laborit.fr, 1
 ch-sc.de, 1
 ch.search.yahoo.com, 0
 chabaojia.com, 1
 chabaudparfum.com, 1
-chabik.com, 0
 chad.ch, 1
 chadstoneapartments.com.au, 1
 chaifeng.com, 1
 chainedunion.info, 1
 chaisystems.net, 1
 chaldeen.pro, 1
 chaletmanager.com, 1
 chaletpierrot.ch, 1
@@ -5034,16 +5037,17 @@ clindoeilmontagne.com, 1
 clingout.com, 1
 clinia.ca, 1
 clinicadam.com, 1
 clinicadelogopedia.net, 1
 clinicaferrusbratos.com, 1
 clinicaltrials.gov, 1
 cliniko.com, 1
 clintonlibrary.gov, 1
+clintonplasticsurgery.com, 1
 clip.mx, 0
 clipclip.com, 1
 clmde.de, 1
 clnet.com.au, 1
 clnnet.ch, 1
 clochix.net, 1
 clockcaster.com, 1
 clockworksms.com, 1
@@ -5064,16 +5068,17 @@ cloud-surfer.net, 1
 cloud.bugatti, 1
 cloud.fail, 1
 cloud.google.com, 1
 cloud.gov, 1
 cloud2go.de, 1
 cloudapps.digital, 1
 cloudbased.info, 1
 cloudbasedsite.com, 1
+cloudberlin.goip.de, 1
 cloudbleed.info, 1
 cloudbolin.es, 1
 cloudbreaker.de, 1
 cloudcaprice.net, 1
 cloudflareonazure.com, 1
 cloudia.org, 1
 cloudily.com, 1
 cloudlight.biz, 1
@@ -5412,16 +5417,17 @@ computer-acquisti.com, 1
 computeracademy.co.za, 1
 computerassistance.co.uk, 1
 computerbase.de, 1
 computerhilfe-feucht.de, 1
 computernetwerkwestland.nl, 1
 computerslotopschool.nl, 1
 comssa.org.au, 1
 comunidadmontepinar.es, 1
+comw.cc, 1
 comyuno.com, 1
 conaudisa.com, 0
 concentrade.de, 1
 concept-web.ch, 1
 conceptatelier.de, 1
 concertengine.com, 1
 concerto.amsterdam, 1
 conciliumnotaire.ca, 1
@@ -5872,17 +5878,16 @@ cspeti.hu, 1
 cspvalidator.org, 1
 csru.net, 1
 css.net, 1
 cssai.eu, 1
 cssaunion.com, 1
 cstb.ch, 1
 cstp-marketing.com, 1
 csuw.net, 1
-csvalpha.nl, 1
 cthomas.work, 1
 ctj.im, 1
 ctliu.com, 1
 ctnguyen.de, 1
 ctnguyen.net, 1
 ctns.de, 1
 ctoforhire.com.au, 1
 ctomp.io, 1
@@ -5912,16 +5917,17 @@ cuentasmutualamr.org.ar, 1
 cuetoems.com, 1
 cuibonobo.com, 1
 cuisinezest.com, 1
 cultiv.nl, 1
 cultivo.bio, 1
 cultofperf.org.uk, 1
 culturedcode.com, 1
 cultureroll.com, 1
+cunha.be, 1
 cuni-cuni-club.com, 1
 cuni-rec.com, 1
 cuoc.org.uk, 1
 cuongthach.com, 1
 cuonic.com, 1
 cup.al, 1
 cupcake.io, 1
 cupcake.is, 1
@@ -6196,16 +6202,17 @@ danotage.tv, 1
 danoz.net, 1
 danpiel.net, 0
 danscomp.com, 1
 danselibre.net, 1
 danseressen.nl, 1
 dansk-skole.de, 1
 danskoferie.dk, 1
 danskringsporta.be, 1
+dantransports.fr, 1
 danw.io, 1
 danwin1210.me, 1
 danyabanya.com, 1
 dao.spb.su, 1
 daoro.net, 1
 daphne.informatik.uni-freiburg.de, 1
 daracokorilo.com, 1
 darbi.org, 1
@@ -6741,16 +6748,17 @@ devlamvzw.org, 1
 devlatron.net, 1
 devlogr.com, 1
 devlux.ch, 1
 devolution.ws, 1
 devonsawatzky.ca, 1
 devops-survey.com, 1
 devops.moe, 1
 devpgsv.com, 1
+devpsy.info, 1
 devstaff.gr, 1
 devyn.ca, 1
 devzero.io, 1
 dewalch.net, 1
 dewapress.com, 1
 dexalo.de, 1
 dezeregio.nl, 1
 dezet-ev.de, 1
@@ -6833,16 +6841,17 @@ die-gruenen-teufel.de, 1
 die-partei-reutlingen.de, 1
 die-sinlosen.de, 1
 die-speisekammer-reutlingen.de, 1
 diedrich.co, 0
 diedrich.me, 1
 diegelernten.de, 1
 diegerbers.de, 1
 diegogelin.com, 1
+diegorbaquero.com, 1
 diehl.io, 1
 diejanssens.net, 1
 diemattels.at, 1
 diemogebhardt.com, 1
 dienstplan.cc, 1
 dienstplan.one, 1
 dierenartsdeconinck.be, 1
 dieselanimals.lt, 1
@@ -6976,17 +6985,17 @@ discha.net, 1
 disciples.io, 1
 discipul.nl, 1
 disclosure.io, 1
 disco-crazy-world.de, 1
 discofitta.com, 1
 disconformity.net, 1
 discord-chan.net, 1
 discordapp.com, 1
-discotek.club, 1
+discotek.club, 0
 discount24.de, 1
 discountmania.eu, 1
 discountmetaux.fr, 1
 discountplush.com, 1
 discover-mercure.com, 1
 discoverhealthage.com, 0
 discoveringdocker.com, 1
 discoverrsv.com, 1
@@ -7531,16 +7540,17 @@ duria.de, 1
 duriaux-dentiste.ch, 1
 durys.be, 1
 dusmomente.com, 1
 dustri.org, 1
 dustygroove.com, 1
 dustyspokesbnb.ca, 1
 dutch.desi, 1
 dutch1.nl, 1
+dutchessuganda.com, 1
 dutchrank.nl, 1
 dutchwanderers.nl, 1
 dutchweballiance.nl, 1
 dutyfreeonboard.com, 1
 duyao.de, 1
 dvbris.co.uk, 1
 dvbris.com, 1
 dvdland.com.au, 1
@@ -7900,17 +7910,16 @@ eirastudios.co.uk, 0
 eisaev.ru, 1
 eisp.it, 0
 eit-web.de, 0
 eitler.cx, 1
 eiyoushi-shigoto.com, 1
 ejdv-anmeldung.de, 1
 ejeff.org, 1
 ejgconsultancy.co.uk, 1
-ejusu.com, 1
 ekd.de, 1
 ekedc.com, 1
 ekedp.com, 1
 eklepka.com, 1
 ekobudisantoso.net, 1
 ekodevices.com, 1
 ekokontakt.cz, 1
 ekonbenefits.com, 1
@@ -7971,16 +7980,17 @@ elena-baykova.ru, 1
 elenorsmadness.org, 1
 elephants.net, 1
 elephpant.cz, 1
 elepover.com, 1
 eletesstilus.hu, 1
 eleusis-zur-verschwiegenheit.de, 1
 elevateandprosper.com, 1
 elexel.ru, 1
+elexprimidor.com, 1
 elglobo.com.mx, 1
 elgosblanc.com, 1
 elhall.pro, 1
 elhall.ru, 1
 elhamadimi.com, 1
 elhossari.com, 1
 elia.cloud, 1
 elias-nicolas.com, 1
@@ -8715,16 +8725,17 @@ extensiblewebmanifesto.org, 1
 extensiblewebreportcard.org, 1
 extensiblewebsummit.org, 1
 extensiontree.com, 1
 extradesktops.com, 1
 extranetpuc.com.br, 1
 extrapagetab.com, 1
 extreme-gaming.de, 1
 extreme-gaming.us, 1
+extreme-players.com, 1
 extreme-players.de, 1
 extrememanual.net, 0
 exvs.org, 1
 eydesignguidelines.com, 1
 eyecandy.gr, 1
 eyeglasses.com, 0
 eyeonid.com, 1
 eyep.me, 1
@@ -9013,16 +9024,17 @@ fehngarten.de, 1
 fehnladen.de, 1
 feigling.net, 1
 feilen.de, 1
 feisbed.com, 1
 feisim.com, 1
 feisim.org, 1
 feistyduck.com, 1
 feitobrasilcosmeticos.com.br, 1
+fejes.house, 1
 feld.design, 1
 feld.saarland, 1
 feldhousen.com, 1
 felgitscher.xyz, 1
 felicifia.org, 1
 felistirnavia.sk, 1
 felixbarta.de, 1
 felixhefner.de, 1
@@ -9841,16 +9853,17 @@ fuglede.dk, 1
 fuite.ch, 1
 fuitedeau.ch, 1
 fuites.ch, 1
 fujianshipbuilding.com, 1
 fukakukeiba.com, 1
 fukuko.biz, 1
 fukuko.xyz, 1
 fukuoka-cityliner.jp, 1
+fukushimacoffee.com, 1
 fulgenzis.com, 1
 fuli.am, 1
 fuliwang.info, 1
 fuliwang.us, 1
 fuliydys.com, 1
 fullautomotivo.com.br, 1
 fullbundle.com, 1
 fullhub.ru, 1
@@ -9934,16 +9947,17 @@ fxopen.ru, 1
 fxp.co.il, 0
 fxpig-ib.com, 1
 fxtalk.cn, 1
 fxthai.com, 1
 fyfywka.com, 1
 fyn.nl, 1
 fyodorpi.com, 1
 fyol.pw, 1
+fysesbjerg.dk, 1
 fysiotherapieholtenbroek.nl, 1
 fysiotherapierossum.nl, 1
 fysiovdberg.nl, 1
 fzx750.ru, 1
 g-m-w.eu, 1
 g-marketing.ro, 1
 g-o.pl, 1
 g-rom.net, 1
@@ -11255,16 +11269,17 @@ hbbet.com, 1
 hbdesign.work, 1
 hbkonsult.com, 1
 hboeck.de, 1
 hbpowell.com, 1
 hbvip.com, 1
 hcbj.io, 1
 hcfhomelottery.ca, 1
 hcoe.fi, 1
+hcstr.com, 1
 hd-gaming.com, 1
 hd-offensive.at, 0
 hd-only.org, 1
 hd-outillage.com, 1
 hd1tj.org, 1
 hda.me, 1
 hdc.cz, 1
 hdcenter.cc, 1
@@ -11934,16 +11949,17 @@ hughtodd.ink, 1
 hugi.is, 1
 hugofs.com, 1
 hugolynx.fr, 1
 huguesblanchard.paris, 1
 huguesditciles.com, 1
 huihui.moe, 1
 huirongis.me, 1
 huiser.nl, 1
+huislaw.com, 1
 huitaodang.com, 1
 hukaloh.com, 1
 hukkatavara.com, 1
 hukutuu.com, 1
 hulet.tech, 1
 hulldevs.net, 1
 hulpbijmarketing.nl, 1
 hulsoft.co.uk, 1
@@ -12056,17 +12072,17 @@ i95.me, 0
 iaco.li, 1
 iacono.com.br, 1
 iactu.info, 1
 iadttaveras.com, 1
 iaeste.no, 1
 iainsimms.me, 1
 ialis.me, 1
 iamcarrico.com, 1
-iamprophet.pw, 1
+iamprophet.pw, 0
 iamsoareyou.se, 1
 iamtheib.me, 1
 iamusingtheinter.net, 1
 iamwoodbeard.com, 1
 ian.sh, 1
 iandouglasscott.com, 1
 ianix.com, 1
 iavian.com, 1
@@ -12138,16 +12154,17 @@ id.mayfirst.org, 0
 id.search.yahoo.com, 0
 id0-rsa.pub, 1
 id7.fr, 1
 idahoansforliberty.net, 1
 idaspis.com, 1
 idatha.de, 1
 idc-business.be, 1
 idconsult.nl, 1
+idcrane.com, 1
 iddconnect.com, 1
 iddconnect.org, 1
 ideadozz.hu, 1
 idealtruss.com, 1
 idealtruss.com.tw, 1
 idealwhite.space, 1
 ideashop.com, 1
 ideaweb.de, 0
@@ -12156,17 +12173,17 @@ idemo.in, 1
 idensys.nl, 1
 identifyme.net, 1
 identity-hash.online, 1
 identitytheft.gov, 1
 idexxpublicationportal.com, 1
 idgard.de, 1
 idhosts.co.id, 1
 idid.tk, 1
-idinby.dk, 1
+idinby.dk, 0
 idiopolis.org, 1
 idiotentruppe.de, 1
 idmanagement.gov, 1
 idmobile.co.uk, 1
 idndx.com, 1
 idoc24.com, 1
 idol-bikes.ru, 1
 idolf.dk, 1
@@ -12316,16 +12333,17 @@ imaginarymakings.me, 1
 imagine-programming.com, 1
 imagr.io, 1
 imanageproducts.uk, 1
 imanhearts.com, 1
 imanudin.net, 1
 imawhale.com, 1
 imbrian.org, 1
 imbushuo.net, 1
+imcsx.co, 1
 imed.com.pt, 1
 imed.pt, 1
 imedi.co.uk, 1
 imedi.it, 1
 imedikament.de, 1
 imeds.pl, 1
 imefuniversitario.org, 1
 imforza.com, 1
@@ -12357,17 +12375,16 @@ immobilien-badlippspringe.de, 1
 immobilien-wallat.de, 1
 immobilier-nice.fr, 1
 immobilier92.net, 1
 immobiza.com, 1
 immortal.run, 1
 imokuri123.com, 1
 imoner.com, 1
 imoner.ga, 1
-imouyang.com, 1
 impact.health.nz, 1
 impacter.eu, 1
 impactfestival.be, 1
 impactpub.ch, 1
 impakho.com, 1
 imperdin.com, 1
 imperdintechnologies.com, 1
 imperial-legrand.com, 1
@@ -13343,16 +13360,17 @@ jhalderm.com, 1
 jhaveri.net, 1
 jhburton.co.uk, 1
 jhcommunitysports.co.uk, 1
 jhermsmeier.de, 1
 jhollandtranslations.com, 1
 jhuang.me, 1
 jhwestover.com, 1
 jialinwu.com, 0
+jiangzm.com, 1
 jianjia.io, 0
 jiaqiang.vip, 1
 jichi.io, 1
 jie.dance, 1
 jief.me, 1
 jigsawdevelopments.com, 1
 jimbraaten.com, 1
 jimbutlerkiaparts.com, 1
@@ -13626,16 +13644,17 @@ jthackery.com, 0
 jtslay.com, 1
 jtwp470.net, 0
 ju1ro.de, 1
 juan23.edu.uy, 1
 juanmaguitar.com, 1
 juanxt.ddns.net, 1
 jubileum.online, 1
 juch.cc, 1
+juchheim-methode.de, 1
 juchit.at, 1
 judc-ge.ch, 1
 judoprodeti.cz, 1
 judosaintdenis.fr, 1
 juegosycodigos.mx, 1
 juergen-elbert.de, 1
 juergenhecht.de, 1
 juergenspecht.com, 1
@@ -13675,16 +13694,17 @@ jungaa.fr, 1
 jungesforumkonstanz.de, 1
 jungleculture.co.za, 1
 jungleducks.ca, 1
 junglist.org, 1
 juni.io, 1
 juniperroots.ca, 1
 juniwalk.cz, 1
 junkdrome.org, 1
+junqueiropolis.com, 1
 jurassicbarkharrogate.co.uk, 1
 jurassicgolf.nl, 1
 juridoc.com.br, 1
 juristas.com.br, 1
 juristeo.com, 1
 jurke.com, 1
 jurko.cz, 1
 jurriaan.ninja, 1
@@ -13784,16 +13804,17 @@ kaketalk.com, 1
 kakie-gobocha.jp, 1
 kakie-kolesa.ru, 1
 kakolightingmuseum.or.jp, 1
 kakoo-media.nl, 1
 kakoo.nl, 1
 kakoomedia.nl, 1
 kalastus.com, 1
 kalender.com, 1
+kalender.goip.de, 1
 kalevlamps.co.uk, 1
 kaliaa.fi, 1
 kalian.cz, 1
 kalifornien-tourismus.de, 1
 kall.is, 1
 kallies-net.de, 1
 kalmar.com, 1
 kaloix.de, 1
@@ -14143,16 +14164,17 @@ kimmel.com, 1
 kimmel.in, 1
 kimoota.net, 0
 kimotodental.com, 1
 kimsufi-jordi.tk, 1
 kinderbasar-luhe.de, 1
 kinderbuecher-kostenlos.de, 1
 kinderopvangengeltjes.nl, 1
 kindleworth.com, 1
+kinepolis-studio.be, 1
 kinepolis-studio.ga, 1
 kinetiq.com, 1
 kineto.space, 1
 kingant.net, 1
 kinganywhere.eu, 1
 kingbird.me, 1
 kingclass.cn, 1
 kingdomcrc.org, 1
@@ -14527,16 +14549,18 @@ krsn.de, 1
 krugermillions.org, 1
 krugoval.hr, 1
 kruin.net, 1
 kruk.co, 1
 krumberconsulting.com, 1
 krupa.net.pl, 0
 krutka.cz, 1
 kruu.de, 1
+kry.no, 1
+kry.se, 1
 kryglik.com, 1
 krypsys.com, 1
 kryptera.se, 1
 kryx.de, 1
 ks-watch.de, 1
 kschv-rdeck.de, 1
 ksero.center, 1
 kshlm.in, 1
@@ -15262,17 +15286,16 @@ lightpics.net, 1
 lights.co.uk, 1
 lightspeed.com, 0
 lighttp.com, 1
 lightworkerandempathsupport.com, 1
 lignoma.com, 1
 ligonier.com, 1
 lihaul.dnsalias.net, 1
 lijero.co, 1
-likc.me, 1
 likeablehub.com, 1
 likeabox.de, 1
 likeaross.com, 0
 likegeeks.com, 1
 likehifi.de, 1
 likemovies.de, 1
 likenewhearing.com.au, 1
 likenosis.com, 1
@@ -15292,16 +15315,17 @@ limitededitioncomputers.com, 1
 limitededitionsolutions.com, 1
 limix.com, 0
 limoairporttoronto.net, 1
 limousineservicezurich.com, 1
 limpens.net, 0
 limpid.nl, 1
 limules.ch, 1
 limunana.com, 1
+linan.blog, 1
 lincdavis.com, 1
 linden.me, 1
 lindeskar.se, 1
 lindo.ru, 1
 lindon.pw, 1
 lindsayanderson.com, 1
 lindskogen.se, 1
 lindy.co, 1
@@ -15930,16 +15954,17 @@ madokami.net, 1
 madrants.net, 1
 madreacqua.org, 1
 madtec.de, 1
 madusecurity.com, 1
 mae-berlinistanbul.com, 1
 maedchenflohmarkt.at, 1
 maedchenflohmarkt.de, 1
 maelstrom.ninja, 1
+maeplasticsurgery.com, 1
 maestrano.com, 1
 maff.co.uk, 1
 maff.scot, 0
 mafia.network, 1
 mafiaforum.de, 1
 mafiasi.de, 1
 magasindejouets.com, 1
 magasinsalledebains.be, 1
@@ -16526,16 +16551,17 @@ mcynews.com, 1
 mcyukon.com, 1
 md5file.com, 1
 md5hashing.net, 1
 mdcloudpracticesolutions.com, 1
 mdcloudps.com, 1
 mdek.at, 1
 mdewendt.de, 1
 mdf-bis.com, 1
+mdkr.nl, 1
 mdma.net, 1
 mdmed.clinic, 1
 mdosch.de, 1
 mdpraha.cz, 1
 mdsave.com, 1
 mdwftw.com, 1
 mdx.no, 1
 mdxn.org, 1
@@ -17341,16 +17367,17 @@ montsaintaignan.fr, 1
 montychristie.com, 1
 moo.la, 1
 moobo.co.jp, 1
 moobo.xyz, 1
 moodfoods.com, 1
 moodzshop.com, 1
 moojp.co.jp, 1
 moonagic.com, 1
+moonchart.co.uk, 1
 moondrop.org, 1
 moonmelo.com, 1
 moonraptor.co.uk, 1
 moonraptor.com, 1
 moonshyne.org, 1
 moonvpn.org, 1
 moorparkelectrical.com, 1
 mooselook.de, 1
@@ -17688,17 +17715,16 @@ my-contract.net, 1
 my-demo.co, 1
 my-dick.ru, 1
 my-dns.co.il, 1
 my-ebook.es, 1
 my-floor.com, 1
 my-host.ovh, 1
 my-hps.de, 1
 my-ip.work, 1
-my-pawnshop.com.ua, 0
 my-plancha.ch, 1
 my-static-demo-808795.c.cdn77.org, 1
 my-static-live-808795.c.cdn77.org, 1
 my.onlime.ch, 0
 my.usa.gov, 0
 my.xero.com, 0
 myaccount.google.com, 0
 myactivity.google.com, 1
@@ -18033,16 +18059,17 @@ naturheilpraxis-orlowsky.de, 1
 naturheilpraxis-p-grote.de, 1
 naturline.com, 1
 naturtint.co.uk, 1
 natusvita.com.br, 1
 natuterra.com.br, 1
 nauck.org, 1
 naude.co, 0
 naughty.audio, 1
+nautiljon.com, 1
 nautsch.de, 1
 navdeep.ca, 1
 navigate-it-services.de, 0
 naviteq.eu, 1
 navitime.me, 1
 navstevnik.sk, 1
 navycs.com, 1
 nawroth.info, 1
@@ -18366,16 +18393,17 @@ newtnote.com, 1
 newtonhaus.com, 1
 newtrackon.com, 1
 nex.sx, 1
 nexgeneration-solutions.com, 1
 nexicafiles.com, 1
 nexlab.org, 1
 next-log.ru, 0
 next-taxi.ru, 1
+next24.io, 1
 nextads.ch, 1
 nextcairn.com, 1
 nextcloud.com, 1
 nextcloud.li, 1
 nextend.net, 1
 nextend.org, 1
 nextgen.sk, 1
 nextgencel.com, 1
@@ -18717,16 +18745,17 @@ noticiasdehumor.com, 1
 notificami.com, 1
 notify.moe, 1
 notinglife.com, 1
 notjustvacs.com, 1
 notnize.net, 1
 notnl.com, 1
 notoriousdev.com, 1
 notrecourrier.net, 1
+nottres.com, 1
 notypiesni.sk, 0
 noudjalink.nl, 1
 nouma.fr, 1
 nova-dess.ch, 1
 nova-wd.org.uk, 1
 nova.live, 1
 novabench.com, 1
 novafreixo.pt, 1
@@ -18995,17 +19024,16 @@ ohadsoft.com, 1
 ohayosoro.me, 1
 ohchouette.com, 1
 ohd.dk, 1
 oheila.com, 1
 ohiohealthfortune100.com, 1
 ohlmeier.com, 0
 ohlmeier.net, 0
 ohlmeier.org, 0
-ohm2013.org, 1
 ohnemusik.com, 1
 ohreally.de, 1
 oilpaintingsonly.com, 1
 oinky.ddns.net, 1
 ojaioliveoil.com, 1
 ojdip.net, 1
 ojomovies.com, 1
 ojp.gov, 1
@@ -19218,16 +19246,17 @@ openfir.st, 1
 openfitapi-falke.azurewebsites.net, 1
 opengg.me, 1
 openings.ninja, 1
 openintelligence.uk, 1
 openiocdb.com, 1
 openitforum.pl, 1
 openkim.org, 1
 openkvk.nl, 1
+openmirrors.cf, 1
 opennippon.com, 1
 opennippon.ru, 1
 openpictures.ch, 1
 openquery.com.au, 1
 openrainbow.com, 1
 openrainbow.net, 1
 openrainbow.org, 1
 openrealestate.co, 1
@@ -19710,16 +19739,17 @@ pastorbelgagroenendael.com.br, 1
 pastorcanadense.com.br, 1
 pastordocaucaso.com.br, 1
 pastormaremanoabruzes.com.br, 1
 pastorsuico.com.br, 1
 pasztor.at, 1
 patadanabouca.pw, 1
 patechmasters.com, 1
 patentfamily.de, 1
+paterno-gaming.com, 1
 patflix.com, 1
 pathwaystoresilience.org, 1
 patikabiztositas.hu, 1
 patouille-et-gribouille.fr, 1
 patralos.at, 0
 patriaco.net, 1
 patric-lenhart.de, 1
 patrick-othmer.de, 1
@@ -20797,16 +20827,17 @@ privea.fr, 1
 privu.me, 1
 prjktruby.com, 1
 prlved.co.uk, 1
 prnav.com, 1
 pro-bike.ro, 1
 pro-ing.com, 1
 pro-link.eu, 1
 pro-mile.pl, 1
+pro-netz.de, 1
 proactive.run, 1
 probas.de, 1
 probase.ph, 1
 probely.com, 1
 probiv.biz, 1
 probiv.cc, 1
 procens.us, 1
 procensus.com, 1
@@ -21078,16 +21109,17 @@ putney.io, 1
 puurwonengeldrop.nl, 1
 puxlit.net, 1
 puyallupnissanparts.com, 1
 puyblanc.info, 1
 puzz.gg, 1
 puzz.me, 1
 puzzle-welt.ch, 1
 puzzlepoint.ch, 1
+pv-paderborn-now.de, 1
 pvagner.tk, 1
 pvcvoordeel.nl, 0
 pvpcraft.ca, 1
 pvtschlag.com, 1
 pwdgen.net, 0
 pwdsafe.com, 1
 pwe.vision, 1
 pwfrance.com, 1
@@ -21358,17 +21390,17 @@ randc.org, 1
 random-samplings.org, 1
 randomadversary.com, 1
 randombit.eu, 1
 randomdysfunctions.com, 1
 randomkoalafacts.com, 1
 randomprecision.co.uk, 1
 randomquotesapp.com, 1
 randstaddirect.nl, 1
-randy.su, 1
+randy.su, 0
 rangde.org, 1
 ranking-deli.jp, 1
 ranos.org, 1
 rantanda.com, 1
 ranzbak.nl, 1
 rapdogg.com, 1
 rapenroer.com, 1
 rapenroer.nl, 1
@@ -22506,17 +22538,16 @@ samenwerkingsportaal.nl, 1
 samenwerkingsportaal.tk, 1
 sameworks.com, 1
 samgrayson.me, 1
 samifar.in, 1
 samirnassar.com, 1
 samizdat.cz, 1
 samkelleher.com, 1
 saml-gateway.org, 1
-samm.com.au, 1
 sammyjohnson.com, 0
 sammyservers.com, 1
 samp.im, 1
 samsonova.de, 1
 samsungmobile.it, 1
 samsungphonegenerator.xyz, 1
 samsungxoa.com, 1
 samuelkeeley.com, 1
@@ -22743,16 +22774,17 @@ schlagma.de, 1
 schlarp.com, 1
 schlechtewitze.com, 1
 schlossereieder.at, 1
 schlueter-software.de, 1
 schmaeh-coaching.ch, 1
 schmelzle.io, 1
 schmetterlingsapp.at, 1
 schmidthomes.com, 1
+schmidtplasticsurgery.com, 1
 schmidttulskie.de, 1
 schmitt-max.com, 1
 schmitt.ws, 1
 schmitz.link, 1
 schnapke.name, 1
 schnegg.name, 1
 schneids.me, 1
 schnellno.de, 1
@@ -24001,16 +24033,17 @@ sneaker.date, 1
 sneakpod.de, 1
 sneakynote.com, 1
 sneakypaw.com, 1
 sneberger.cz, 0
 sneed.company, 1
 sneed.it, 1
 sneedit.com, 1
 sneedit.de, 1
+sneeuwhoogtes.eu, 1
 sneezry.com, 1
 snelbv.nl, 1
 snelshops.nl, 1
 snelwebshop.nl, 1
 snelxboxlivegold.nl, 1
 snerith.com, 1
 snfdata.com, 0
 sniderman.eu.org, 1
@@ -24472,16 +24505,17 @@ ssldecoder.org, 1
 ssldev.net, 1
 sslmate.com, 1
 sslok.com, 1
 sslping.com, 1
 sslpoint.com, 1
 ssls.cz, 1
 sslsurvey.de, 1
 sslzilla.de, 1
+ssnet.vip, 1
 sss3s.com, 1
 sstaging.com, 1
 sstewartgallus.com, 1
 st-kilian-markt-erlbach.de, 1
 st-news.de, 1
 st-steuern.de, 1
 staatschutz.at, 1
 staatsschutz.at, 1
@@ -24548,16 +24582,17 @@ starsam80.net, 1
 starstreak.net, 1
 startlab.sk, 1
 startpage.com, 1
 startpage.info, 1
 startrek.in, 1
 starttraffic.uk, 1
 startup.melbourne, 1
 startuplevel.com, 1
+startuppeople.co.uk, 1
 startupsort.com, 1
 startupum.ru, 1
 starwatches.eu, 1
 starwins.co.uk, 1
 stastka.ch, 1
 stat.ink, 1
 state-of-body-and-mind.com, 1
 statecollegemortgages.com, 1
@@ -24924,17 +24959,16 @@ summer.ga, 1
 summercampthailand.com, 1
 summitmasters.net, 1
 sumthing.com, 1
 sunbritetv.com, 1
 sundaycooks.com, 1
 sundayfundayjapan.com, 1
 suneilpatel.com, 1
 sunfireshop.com.br, 1
-sunflyer.cn, 0
 sunfox.cz, 1
 sunfulong.me, 1
 sungo.wtf, 1
 sunjaydhama.com, 1
 sunn.ie, 1
 sunsetwx.com, 1
 sunshinesf.org, 1
 sunsmartresorts.com, 1
@@ -25248,16 +25282,17 @@ talk.google.com, 1
 talkgadget.google.com, 1
 talkreal.net, 1
 talktodarcy.com, 1
 talktwincities.com, 1
 talkwithyourbaby.org, 1
 tallcraft.com, 1
 talldude.net, 1
 talltreeskv.com.au, 1
+talon.rip, 1
 talsi.eu, 1
 talun.de, 1
 tam7t.com, 1
 tamasszabo.net, 1
 tamchunho.com, 1
 tammy.pro, 1
 tampabaybusinesslistings.com, 1
 tanak3n.xyz, 1
@@ -25606,16 +25641,17 @@ testingbot.com, 0
 testnode.xyz, 0
 testomato.com, 1
 testosterone-complex.com, 1
 testpornsite.com, 1
 testsuite.org, 1
 testuje.net, 1
 tetedelacourse.ch, 1
 tetrarch.co, 1
+tetsai.com, 1
 tetsugakunomichi.jp, 1
 tetsumaki.net, 1
 teuniz.nl, 1
 teunstuinposters.nl, 0
 teva-li.com, 1
 tewarilab.co.uk, 1
 texasllcpros.com, 1
 texastwostepdivorce.com, 1
@@ -25731,16 +25767,17 @@ thecrazytravel.com, 1
 thecrew-exchange.com, 1
 thecsw.com, 1
 thecuppacakery.co.uk, 1
 thecuriouscat.net, 1
 thecustomizewindows.com, 0
 thedailyupvote.com, 1
 thedark1337.com, 1
 thedarkartsandcrafts.com, 1
+thederminstitute.com, 1
 thedevilwearswibra.nl, 1
 thedevrycommonsbrasil.com, 0
 thediaryofadam.com, 1
 thedisc.nl, 1
 thediscovine.com, 1
 thedocumentrefinery.com, 1
 thedreamtravelgroup.co.uk, 1
 thedrinks.co, 1
@@ -26858,18 +26895,20 @@ tweetfreq.net, 0
 twelve.rocks, 1
 twelve.today, 1
 twelverocks.com, 1
 twem.ddns.net, 1
 twenty71.com, 1
 twentymilliseconds.com, 1
 twilleys.com, 1
 twincitynissantxparts.com, 1
+twinkieman.com, 1
 twiri.net, 1
 twistapp.com, 1
+twisted-brains.org, 1
 twistedwave.com, 1
 twisto.cz, 1
 twit-guide.com, 1
 twittelzie.nl, 1
 twitter.ax, 1
 twitter.com, 0
 twitteroauth.com, 1
 twlan.org, 1
@@ -27029,16 +27068,17 @@ unblockall.xyz, 1
 unblocked.at, 1
 unblocked.bet, 1
 unblocked.bid, 1
 unblocked.blue, 1
 unblocked.cam, 1
 unblocked.ink, 1
 unblocked.live, 1
 unblocked.one, 1
+unblocked.pro, 1
 unblocked.pub, 1
 unblocked.uno, 1
 unblocked.vip, 1
 unblockedbay.info, 1
 unblockweb.co, 1
 uncensoreddns.dk, 1
 uncensoreddns.org, 1
 undeadbrains.de, 1
@@ -27145,25 +27185,25 @@ unsuspicious.click, 1
 unterfrankenclan.de, 1
 unterkunft.guru, 1
 unterschicht.tv, 1
 untethereddog.com, 1
 untoldstory.eu, 1
 unun.fi, 1
 unusualhatclub.com, 1
 unveiledgnosis.com, 1
-unwomen.is, 1
 unx.dk, 1
 unxicdellum.cat, 1
 upandclear.org, 1
 upani.net, 1
 upay.ru, 1
 upbad.com, 1
 upbeatrobot.com, 1
 upbeatrobot.eu, 1
+upd.jp, 1
 upgamerengine.com, 1
 upgamerengine.com.br, 1
 upgamerengine.net, 1
 upgauged.com, 1
 upitnik.rs, 1
 uplaqui.com.br, 1
 uplinklabs.net, 1
 upload.cat, 1
@@ -27189,16 +27229,17 @@ uptrends.de, 1
 upundit.com, 1
 upwork.com, 1
 ur2.pw, 1
 urbackups.com, 1
 urbalex.ch, 1
 urban-culture.fr, 1
 urban.melbourne, 1
 urbanesecurity.com, 1
+urbanfi.sh, 1
 urbanguerillas.de, 1
 urbanietz-immobilien.de, 1
 urbanmelbourne.info, 1
 urbannewsservice.com, 1
 urbansparrow.in, 1
 urbanwildlifealliance.org, 1
 urbexdk.nl, 1
 urcentral.com, 1
@@ -27226,16 +27267,17 @@ usabackground.com, 1
 usability.gov, 1
 usaestaonline.com, 1
 usajobs.com, 1
 usajobs.gov, 1
 usakitchensandflooring.com, 1
 usap.gov, 0
 usbcraft.com, 1
 uscloud.nl, 1
+uscp8.com, 1
 usd.de, 1
 use.be, 1
 usebean.com, 1
 usedesk.ru, 1
 useresponse.com, 1
 usetypo3.com, 1
 useyourloaf.com, 1
 usgande.com, 1
@@ -27566,16 +27608,17 @@ victorgbustamante.com, 1
 victoriaartist.ru, 1
 victoriastudio.ru, 1
 victoriaville.ca, 1
 victorjacobs.com, 1
 victornet.de, 1
 vicyu.com, 1
 vid-immobilien.de, 1
 vid.me, 1
+vida.es, 1
 vidbooster.com, 1
 vide-dressing.org, 0
 vide-greniers.org, 0
 vide-maisons.org, 0
 videnskabsklubben.dk, 1
 videogamesartwork.com, 1
 videomail.io, 1
 videorullen.se, 1
@@ -27588,16 +27631,17 @@ viditut.com, 1
 vidkovaomara.si, 1
 vieaw.com, 1
 vieclam24h.vn, 0
 viekelis.lt, 0
 viemeister.com, 1
 viemontante.be, 1
 viennan.net, 1
 vientos.coop, 1
+viepixel.at, 1
 vierdaagsehotel.nl, 1
 vierpfeile.de, 1
 vierpluseins.wtf, 1
 vietnam-lifer.com, 1
 vietnamese.dating, 1
 vietnamhost.vn, 1
 vietnamwomenveterans.org, 1
 vieux.pro, 1
@@ -27918,16 +27962,17 @@ wabatam.com, 1
 wabifoggynuts.com, 1
 wachter.biz, 1
 wadidi.com, 1
 wadsworth.gallery, 1
 wadvisor.com, 1
 waelisch.de, 1
 waelti.xxx, 1
 wafa4hw.com, 1
+wafairhaven.com.au, 0
 waffle.at, 1
 wafni.com, 1
 wahhoi.net, 0
 wahidhasan.com, 1
 wahlman.org, 1
 wahrnehmungswelt.de, 1
 wahrnehmungswelten.de, 1
 wai-in.com, 1
@@ -28213,16 +28258,17 @@ weiler.xyz, 1
 weils.net, 1
 weimaraner.com.br, 1
 weimz.com, 1
 wein.cc, 1
 weinbergerlawgroup.com, 1
 weinhandel-preissler.de, 1
 weirdesigns.com, 1
 weirdserver.com, 1
+weisse-liste.de, 1
 weissman.agency, 1
 weiterbildung-vdz.de, 1
 weiyuz.com, 1
 weizenke.im, 1
 weizenspr.eu, 1
 wekibe.de, 1
 welby.cat, 1
 welches-kinderfahrrad.de, 1
@@ -28594,16 +28640,17 @@ wmfusercontent.org, 1
 wmkowa.de, 1
 wmoda.com.br, 1
 wmustore.com, 1
 wnnc.co.uk, 1
 wnu.com, 1
 wo-ist-elvira.net, 1
 wo2forum.nl, 0
 wobble.ninja, 1
+wochennummern.de, 1
 wod-stavby.cz, 1
 wodboss.com, 1
 wodinaz.com, 1
 wodka-division.de, 1
 woelkchen.me, 1
 wofford-ecs.org, 1
 woffs.de, 1
 woheni.de, 1
@@ -28717,16 +28764,17 @@ wpac.de, 1
 wpandup.org, 1
 wpcharged.nz, 1
 wpdesigner.ir, 1
 wpdirecto.com, 1
 wpenhance.com, 1
 wphostingblog.nl, 1
 wpinfos.de, 1
 wpinter.com, 1
+wplatin.com, 1
 wpldn.uk, 1
 wpletter.de, 0
 wpmeetup-berlin.de, 1
 wpostats.com, 1
 wprevs.com, 1
 wpruby.com, 1
 wpscans.com, 1
 wpserp.com, 1
@@ -28866,16 +28914,17 @@ www.re, 1
 www.rememberthemilk.com, 1
 www.sb, 1
 www.simbolo.co.uk, 0
 www.simple.com, 0
 www.theguardian.com, 1
 www.therapynotes.com, 1
 www.tinfoilsecurity.com, 0
 www.torproject.org, 0
+www.tumblr.com, 0
 www.twitter.com, 0
 www.united.com, 1
 www.usaa.com, 0
 www.vino75.com, 0
 www.wepay.com, 0
 www.wordpress.com, 0
 www68277.com, 1
 wxcafe.net, 1
@@ -29441,24 +29490,24 @@ yubikey.io, 1
 yubikey.org, 1
 yubikey.sg, 1
 yubikey.us, 1
 yubiking.com, 1
 yudan.com.br, 1
 yude.ml, 1
 yue.la, 1
 yue2.net, 1
-yufan.me, 1
 yuhuo.org, 1
 yuka.one, 1
 yuki.xyz, 1
 yukonconnector.com, 1
 yukonlip.com, 1
 yukontec.com, 1
 yum.beer, 1
+yum0.cn, 1
 yumeconcert.com, 1
 yuna.love, 1
 yuna.tg, 1
 yunity.org, 1
 yunjishou.pro, 1
 yuricarlenzoli.it, 1
 yurikirin.me, 1
 yurimoens.be, 1
@@ -29516,16 +29565,17 @@ zamow.co, 1
 zandcell.com, 1
 zanthra.com, 1
 zaoext.com, 1
 zapier.com, 1
 zappbuildapps.com, 1
 zaratan.fr, 1
 zarmarket.org, 1
 zarpo.com.br, 1
+zary.me, 1
 zaufanatrzeciastrona.pl, 1
 zavec.com.ec, 1
 zavetaji.lv, 1
 zawo-electric.de, 1
 zbasenem.pl, 1
 zbchen.com, 1
 zberger.com, 1
 zbetcheck.in, 1
@@ -29650,18 +29700,18 @@ zionvps.com, 0
 zip.ch, 1
 ziptie.com, 1
 zircode.com, 1
 ziroh.be, 1
 zittingskalender.be, 1
 zivava.ge, 1
 zivmergers.com, 1
 zivver.com, 1
-zivy-ruzenec.cz, 1
-zivyruzenec.cz, 1
+zivy-ruzenec.cz, 0
+zivyruzenec.cz, 0
 zixiao.wang, 1
 zkrypt.cc, 1
 zlatakus.cz, 1
 zlatosnadno.cz, 1
 zlavomat.sk, 1
 zlc1994.com, 1
 zlima12.com, 1
 zmk.fr, 0
@@ -29674,17 +29724,16 @@ zodiacohouses.com, 1
 zoeller.me, 1
 zohar.shop, 1
 zohar.wang, 0
 zoigl.club, 1
 zojadravai.com, 1
 zoki.art, 1
 zokster.net, 1
 zolokar.xyz, 1
-zolotoy-standart.com.ua, 1
 zombiesecured.com, 1
 zomerschoen.nl, 1
 zone-produkte.de, 1
 zone39.com, 1
 zonecb.com, 1
 zonemaster.fr, 1
 zonemaster.net, 1
 zonesec.org, 1
--- a/security/nss/TAG-INFO
+++ b/security/nss/TAG-INFO
@@ -1,1 +1,1 @@
-6fb9c5396d52
+f3766809817b
--- a/security/nss/coreconf/coreconf.dep
+++ b/security/nss/coreconf/coreconf.dep
@@ -5,9 +5,8 @@
 
 /*
  * A dummy header file that is a dependency for all the object files.
  * Used to force a full recompilation of NSS in Mozilla's Tinderbox
  * depend builds.  See comments in rules.mk.
  */
 
 #error "Do not include this header file."
-
--- a/security/nss/gtests/pk11_gtest/pk11_ecdsa_unittest.cc
+++ b/security/nss/gtests/pk11_gtest/pk11_ecdsa_unittest.cc
@@ -10,145 +10,159 @@
 #include "gtest/gtest.h"
 #include "scoped_ptrs.h"
 
 #include "pk11_ecdsa_vectors.h"
 #include "pk11_signature_test.h"
 
 namespace nss_test {
 
-class Pkcs11EcdsaTest : public Pk11SignatureTest {
+class Pkcs11EcdsaTestBase : public Pk11SignatureTest {
  protected:
-  CK_MECHANISM_TYPE mechanism() { return CKM_ECDSA; }
-  SECItem* parameters() { return nullptr; }
+  Pkcs11EcdsaTestBase(SECOidTag hash_oid)
+      : Pk11SignatureTest(CKM_ECDSA, hash_oid) {}
 };
 
-class Pkcs11EcdsaSha256Test : public Pkcs11EcdsaTest {
- protected:
-  SECOidTag hashOID() { return SEC_OID_SHA256; }
+struct Pkcs11EcdsaTestParams {
+  SECOidTag hash_oid_;
+  Pkcs11SignatureTestParams sig_params_;
 };
 
-class Pkcs11EcdsaSha384Test : public Pkcs11EcdsaTest {
- protected:
-  SECOidTag hashOID() { return SEC_OID_SHA384; }
-};
-
-class Pkcs11EcdsaSha512Test : public Pkcs11EcdsaTest {
- protected:
-  SECOidTag hashOID() { return SEC_OID_SHA512; }
+class Pkcs11EcdsaTest
+    : public Pkcs11EcdsaTestBase,
+      public ::testing::WithParamInterface<Pkcs11EcdsaTestParams> {
+ public:
+  Pkcs11EcdsaTest() : Pkcs11EcdsaTestBase(GetParam().hash_oid_) {}
 };
 
-TEST_F(Pkcs11EcdsaSha256Test, VerifyP256) {
-  SIG_TEST_VECTOR_VERIFY(kP256Spki, kP256Data, kP256Signature)
-}
-TEST_F(Pkcs11EcdsaSha256Test, SignAndVerifyP256) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kP256Pkcs8, kP256Spki, kP256Data)
+TEST_P(Pkcs11EcdsaTest, Verify) { Verify(GetParam().sig_params_); }
+
+TEST_P(Pkcs11EcdsaTest, SignAndVerify) {
+  SignAndVerify(GetParam().sig_params_);
 }
 
-TEST_F(Pkcs11EcdsaSha384Test, VerifyP384) {
-  SIG_TEST_VECTOR_VERIFY(kP384Spki, kP384Data, kP384Signature)
-}
-TEST_F(Pkcs11EcdsaSha384Test, SignAndVerifyP384) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kP384Pkcs8, kP384Spki, kP384Data)
-}
+static const Pkcs11EcdsaTestParams kEcdsaVectors[] = {
+    {SEC_OID_SHA256,
+     {DataBuffer(kP256Pkcs8, sizeof(kP256Pkcs8)),
+      DataBuffer(kP256Spki, sizeof(kP256Spki)),
+      DataBuffer(kP256Data, sizeof(kP256Data)),
+      DataBuffer(kP256Signature, sizeof(kP256Signature))}},
+    {SEC_OID_SHA384,
+     {DataBuffer(kP384Pkcs8, sizeof(kP384Pkcs8)),
+      DataBuffer(kP384Spki, sizeof(kP384Spki)),
+      DataBuffer(kP384Data, sizeof(kP384Data)),
+      DataBuffer(kP384Signature, sizeof(kP384Signature))}},
+    {SEC_OID_SHA512,
+     {DataBuffer(kP521Pkcs8, sizeof(kP521Pkcs8)),
+      DataBuffer(kP521Spki, sizeof(kP521Spki)),
+      DataBuffer(kP521Data, sizeof(kP521Data)),
+      DataBuffer(kP521Signature, sizeof(kP521Signature))}}};
 
-TEST_F(Pkcs11EcdsaSha512Test, VerifyP521) {
-  SIG_TEST_VECTOR_VERIFY(kP521Spki, kP521Data, kP521Signature)
-}
-TEST_F(Pkcs11EcdsaSha512Test, SignAndVerifyP521) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kP521Pkcs8, kP521Spki, kP521Data)
-}
+INSTANTIATE_TEST_CASE_P(EcdsaSignVerify, Pkcs11EcdsaTest,
+                        ::testing::ValuesIn(kEcdsaVectors));
+
+class Pkcs11EcdsaSha256Test : public Pkcs11EcdsaTestBase {
+ public:
+  Pkcs11EcdsaSha256Test() : Pkcs11EcdsaTestBase(SEC_OID_SHA256) {}
+};
 
 // Importing a private key in PKCS#8 format must fail when the outer AlgID
 // struct contains neither id-ecPublicKey nor a namedCurve parameter.
 TEST_F(Pkcs11EcdsaSha256Test, ImportNoCurveOIDOrAlgorithmParams) {
-  EXPECT_FALSE(ImportPrivateKey(kP256Pkcs8NoCurveOIDOrAlgorithmParams,
-                                sizeof(kP256Pkcs8NoCurveOIDOrAlgorithmParams)));
+  DataBuffer k(kP256Pkcs8NoCurveOIDOrAlgorithmParams,
+               sizeof(kP256Pkcs8NoCurveOIDOrAlgorithmParams));
+  EXPECT_FALSE(ImportPrivateKey(k));
 };
 
 // Importing a private key in PKCS#8 format must succeed when only the outer
 // AlgID struct contains the namedCurve parameters.
 TEST_F(Pkcs11EcdsaSha256Test, ImportOnlyAlgorithmParams) {
-  EXPECT_TRUE(ImportPrivateKeyAndSignHashedData(
-      kP256Pkcs8OnlyAlgorithmParams, sizeof(kP256Pkcs8OnlyAlgorithmParams),
-      kP256Data, sizeof(kP256Data)));
+  DataBuffer k(kP256Pkcs8OnlyAlgorithmParams,
+               sizeof(kP256Pkcs8OnlyAlgorithmParams));
+  DataBuffer data(kP256Data, sizeof(kP256Data));
+  DataBuffer sig;
+  EXPECT_TRUE(ImportPrivateKeyAndSignHashedData(k, data, &sig));
 };
 
 // Importing a private key in PKCS#8 format must succeed when the outer AlgID
 // struct and the inner ECPrivateKey contain the same namedCurve parameters.
 // The inner curveOID is always ignored, so only the outer one will be used.
 TEST_F(Pkcs11EcdsaSha256Test, ImportMatchingCurveOIDAndAlgorithmParams) {
-  EXPECT_TRUE(ImportPrivateKeyAndSignHashedData(
-      kP256Pkcs8MatchingCurveOIDAndAlgorithmParams,
-      sizeof(kP256Pkcs8MatchingCurveOIDAndAlgorithmParams), kP256Data,
-      sizeof(kP256Data)));
+  DataBuffer k(kP256Pkcs8MatchingCurveOIDAndAlgorithmParams,
+               sizeof(kP256Pkcs8MatchingCurveOIDAndAlgorithmParams));
+  DataBuffer data(kP256Data, sizeof(kP256Data));
+  DataBuffer sig;
+  EXPECT_TRUE(ImportPrivateKeyAndSignHashedData(k, data, &sig));
 };
 
 // Importing a private key in PKCS#8 format must succeed when the outer AlgID
 // struct and the inner ECPrivateKey contain dissimilar namedCurve parameters.
 // The inner curveOID is always ignored, so only the outer one will be used.
 TEST_F(Pkcs11EcdsaSha256Test, ImportDissimilarCurveOIDAndAlgorithmParams) {
-  EXPECT_TRUE(ImportPrivateKeyAndSignHashedData(
-      kP256Pkcs8DissimilarCurveOIDAndAlgorithmParams,
-      sizeof(kP256Pkcs8DissimilarCurveOIDAndAlgorithmParams), kP256Data,
-      sizeof(kP256Data)));
+  DataBuffer k(kP256Pkcs8DissimilarCurveOIDAndAlgorithmParams,
+               sizeof(kP256Pkcs8DissimilarCurveOIDAndAlgorithmParams));
+  DataBuffer data(kP256Data, sizeof(kP256Data));
+  DataBuffer sig;
+  EXPECT_TRUE(ImportPrivateKeyAndSignHashedData(k, data, &sig));
 };
 
 // Importing a private key in PKCS#8 format must fail when the outer ASN.1
 // AlgorithmID struct contains only id-ecPublicKey but no namedCurve parameter.
 TEST_F(Pkcs11EcdsaSha256Test, ImportNoAlgorithmParams) {
-  EXPECT_FALSE(ImportPrivateKey(kP256Pkcs8NoAlgorithmParams,
-                                sizeof(kP256Pkcs8NoAlgorithmParams)));
+  DataBuffer k(kP256Pkcs8NoAlgorithmParams,
+               sizeof(kP256Pkcs8NoAlgorithmParams));
+  EXPECT_FALSE(ImportPrivateKey(k));
 };
 
 // Importing a private key in PKCS#8 format must fail when id-ecPublicKey is
 // given (so we know it's an EC key) but the namedCurve parameter is unknown.
 TEST_F(Pkcs11EcdsaSha256Test, ImportInvalidAlgorithmParams) {
-  EXPECT_FALSE(ImportPrivateKey(kP256Pkcs8InvalidAlgorithmParams,
-                                sizeof(kP256Pkcs8InvalidAlgorithmParams)));
+  DataBuffer k(kP256Pkcs8InvalidAlgorithmParams,
+               sizeof(kP256Pkcs8InvalidAlgorithmParams));
+  EXPECT_FALSE(ImportPrivateKey(k));
 };
 
 // Importing a private key in PKCS#8 format with a point not on the curve will
 // succeed. Using the contained public key however will fail when trying to
 // import it before using it for any operation.
 TEST_F(Pkcs11EcdsaSha256Test, ImportPointNotOnCurve) {
-  ScopedSECKEYPrivateKey privKey(ImportPrivateKey(
-      kP256Pkcs8PointNotOnCurve, sizeof(kP256Pkcs8PointNotOnCurve)));
+  DataBuffer k(kP256Pkcs8PointNotOnCurve, sizeof(kP256Pkcs8PointNotOnCurve));
+  ScopedSECKEYPrivateKey privKey(ImportPrivateKey(k));
   ASSERT_TRUE(privKey);
 
   ScopedSECKEYPublicKey pubKey(SECKEY_ConvertToPublicKey(privKey.get()));
   ASSERT_TRUE(pubKey);
 
   ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
   ASSERT_TRUE(slot);
 
   auto handle = PK11_ImportPublicKey(slot.get(), pubKey.get(), false);
   EXPECT_EQ(handle, static_cast<decltype(handle)>(CK_INVALID_HANDLE));
 };
 
 // Importing a private key in PKCS#8 format must fail when no point is given.
 // PK11 currently offers no APIs to derive raw public keys from private values.
 TEST_F(Pkcs11EcdsaSha256Test, ImportNoPublicKey) {
-  EXPECT_FALSE(
-      ImportPrivateKey(kP256Pkcs8NoPublicKey, sizeof(kP256Pkcs8NoPublicKey)));
+  DataBuffer k(kP256Pkcs8NoPublicKey, sizeof(kP256Pkcs8NoPublicKey));
+  EXPECT_FALSE(ImportPrivateKey(k));
 };
 
 // Importing a public key in SPKI format must fail when id-ecPublicKey is
 // given (so we know it's an EC key) but the namedCurve parameter is missing.
 TEST_F(Pkcs11EcdsaSha256Test, ImportSpkiNoAlgorithmParams) {
-  EXPECT_FALSE(ImportPublicKey(kP256SpkiNoAlgorithmParams,
-                               sizeof(kP256SpkiNoAlgorithmParams)));
+  DataBuffer k(kP256SpkiNoAlgorithmParams, sizeof(kP256SpkiNoAlgorithmParams));
+  EXPECT_FALSE(ImportPublicKey(k));
 }
 
 // Importing a public key in SPKI format with a point not on the curve will
 // succeed. Using the public key however will fail when trying to import
 // it before using it for any operation.
 TEST_F(Pkcs11EcdsaSha256Test, ImportSpkiPointNotOnCurve) {
-  ScopedSECKEYPublicKey pubKey(ImportPublicKey(
-      kP256SpkiPointNotOnCurve, sizeof(kP256SpkiPointNotOnCurve)));
+  DataBuffer k(kP256SpkiPointNotOnCurve, sizeof(kP256SpkiPointNotOnCurve));
+  ScopedSECKEYPublicKey pubKey(ImportPublicKey(k));
   ASSERT_TRUE(pubKey);
 
   ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
   ASSERT_TRUE(slot);
 
   auto handle = PK11_ImportPublicKey(slot.get(), pubKey.get(), false);
   EXPECT_EQ(handle, static_cast<decltype(handle)>(CK_INVALID_HANDLE));
 }
--- a/security/nss/gtests/pk11_gtest/pk11_rsapss_unittest.cc
+++ b/security/nss/gtests/pk11_gtest/pk11_rsapss_unittest.cc
@@ -7,44 +7,42 @@
 #include <memory>
 #include "nss.h"
 #include "pk11pub.h"
 #include "sechash.h"
 
 #include "gtest/gtest.h"
 #include "scoped_ptrs.h"
 
+#include "pk11_signature_test.h"
 #include "pk11_rsapss_vectors.h"
-#include "pk11_signature_test.h"
 
 namespace nss_test {
 
-class Pkcs11RsaPssVectorTest : public Pk11SignatureTest {
+class Pkcs11RsaPssTest : public Pk11SignatureTest {
  public:
-  Pkcs11RsaPssVectorTest() {
+  Pkcs11RsaPssTest() : Pk11SignatureTest(CKM_RSA_PKCS_PSS, SEC_OID_SHA1) {
     rsaPssParams_.hashAlg = CKM_SHA_1;
     rsaPssParams_.mgf = CKG_MGF1_SHA1;
     rsaPssParams_.sLen = HASH_ResultLenByOidTag(SEC_OID_SHA1);
 
     params_.type = siBuffer;
     params_.data = reinterpret_cast<unsigned char*>(&rsaPssParams_);
     params_.len = sizeof(rsaPssParams_);
   }
 
  protected:
-  CK_MECHANISM_TYPE mechanism() { return CKM_RSA_PKCS_PSS; }
-  SECItem* parameters() { return &params_; }
-  SECOidTag hashOID() { return SEC_OID_SHA1; }
+  const SECItem* parameters() const { return &params_; }
 
  private:
   CK_RSA_PKCS_PSS_PARAMS rsaPssParams_;
   SECItem params_;
 };
 
-TEST_F(Pkcs11RsaPssVectorTest, GenerateAndSignAndVerify) {
+TEST_F(Pkcs11RsaPssTest, GenerateAndSignAndVerify) {
   // Sign data with a 1024-bit RSA key, using PSS/SHA-256.
   SECOidTag hashOid = SEC_OID_SHA256;
   CK_MECHANISM_TYPE hashMech = CKM_SHA256;
   CK_RSA_PKCS_MGF_TYPE mgf = CKG_MGF1_SHA256;
   PK11RSAGenParams rsaGenParams = {1024, 0x10001};
 
   // Generate RSA key pair.
   ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
@@ -90,110 +88,61 @@ TEST_F(Pkcs11RsaPssVectorTest, GenerateA
   // Verification with original data but the wrong signature must fail.
   data.data[0] ^= 0xff;  // Revert previous changes.
   sig.data[0] ^= 0xff;
   rv = PK11_VerifyWithMechanism(pubKey.get(), mechanism(), &params, &sig, &data,
                                 nullptr);
   EXPECT_EQ(rv, SECFailure);
 }
 
-// RSA-PSS test vectors, pss-vect.txt, Example 1.1: A 1024-bit RSA Key Pair
-// <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
-TEST_F(Pkcs11RsaPssVectorTest, VerifyKnownSignature1) {
-  SIG_TEST_VECTOR_VERIFY(kTestVector1Spki, kTestVector1Data, kTestVector1Sig);
-}
-TEST_F(Pkcs11RsaPssVectorTest, SignAndVerify1) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kTestVector1Pkcs8, kTestVector1Spki,
-                              kTestVector1Data);
-}
+class Pkcs11RsaPssVectorTest
+    : public Pkcs11RsaPssTest,
+      public ::testing::WithParamInterface<Pkcs11SignatureTestParams> {};
 
-// RSA-PSS test vectors, pss-vect.txt, Example 2.1: A 1025-bit RSA Key Pair
-// <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
-TEST_F(Pkcs11RsaPssVectorTest, VerifyKnownSignature2) {
-  SIG_TEST_VECTOR_VERIFY(kTestVector2Spki, kTestVector2Data, kTestVector2Sig);
-}
-TEST_F(Pkcs11RsaPssVectorTest, SignAndVerify2) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kTestVector2Pkcs8, kTestVector2Spki,
-                              kTestVector2Data);
-}
+TEST_P(Pkcs11RsaPssVectorTest, Verify) { Verify(GetParam()); }
+
+TEST_P(Pkcs11RsaPssVectorTest, SignAndVerify) { SignAndVerify(GetParam()); }
 
-// RSA-PSS test vectors, pss-vect.txt, Example 3.1: A 1026-bit RSA Key Pair
-// <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
-TEST_F(Pkcs11RsaPssVectorTest, VerifyKnownSignature3) {
-  SIG_TEST_VECTOR_VERIFY(kTestVector3Spki, kTestVector3Data, kTestVector3Sig);
-}
-TEST_F(Pkcs11RsaPssVectorTest, SignAndVerify3) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kTestVector3Pkcs8, kTestVector3Spki,
-                              kTestVector3Data);
-}
-
-// RSA-PSS test vectors, pss-vect.txt, Example 4.1: A 1027-bit RSA Key Pair
-// <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
-TEST_F(Pkcs11RsaPssVectorTest, VerifyKnownSignature4) {
-  SIG_TEST_VECTOR_VERIFY(kTestVector4Spki, kTestVector4Data, kTestVector4Sig);
-}
-TEST_F(Pkcs11RsaPssVectorTest, SignAndVerify4) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kTestVector4Pkcs8, kTestVector4Spki,
-                              kTestVector4Data);
-}
-
-// RSA-PSS test vectors, pss-vect.txt, Example 5.1: A 1028-bit RSA Key Pair
-// <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
-TEST_F(Pkcs11RsaPssVectorTest, VerifyKnownSignature5) {
-  SIG_TEST_VECTOR_VERIFY(kTestVector5Spki, kTestVector5Data, kTestVector5Sig);
-}
-TEST_F(Pkcs11RsaPssVectorTest, SignAndVerify5) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kTestVector5Pkcs8, kTestVector5Spki,
-                              kTestVector5Data);
-}
+#define VECTOR(pkcs8, spki, data, sig)                                \
+  {                                                                   \
+    DataBuffer(pkcs8, sizeof(pkcs8)), DataBuffer(spki, sizeof(spki)), \
+        DataBuffer(data, sizeof(data)), DataBuffer(sig, sizeof(sig))  \
+  }
+#define VECTOR_N(n)                                                         \
+  VECTOR(kTestVector##n##Pkcs8, kTestVector##n##Spki, kTestVector##n##Data, \
+         kTestVector##n##Sig)
 
-// RSA-PSS test vectors, pss-vect.txt, Example 6.1: A 1029-bit RSA Key Pair
-// <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
-TEST_F(Pkcs11RsaPssVectorTest, VerifyKnownSignature6) {
-  SIG_TEST_VECTOR_VERIFY(kTestVector6Spki, kTestVector6Data, kTestVector6Sig);
-}
-TEST_F(Pkcs11RsaPssVectorTest, SignAndVerify6) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kTestVector6Pkcs8, kTestVector6Spki,
-                              kTestVector6Data);
-}
-
-// RSA-PSS test vectors, pss-vect.txt, Example 7.1: A 1030-bit RSA Key Pair
-// <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
-TEST_F(Pkcs11RsaPssVectorTest, VerifyKnownSignature7) {
-  SIG_TEST_VECTOR_VERIFY(kTestVector7Spki, kTestVector7Data, kTestVector7Sig);
-}
-TEST_F(Pkcs11RsaPssVectorTest, SignAndVerify7) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kTestVector7Pkcs8, kTestVector7Spki,
-                              kTestVector7Data);
-}
+static const Pkcs11SignatureTestParams kRsaPssVectors[] = {
+    // RSA-PSS test vectors, pss-vect.txt, Example 1.1: A 1024-bit RSA Key Pair
+    // <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
+    VECTOR_N(1),
+    // RSA-PSS test vectors, pss-vect.txt, Example 2.1: A 1025-bit RSA Key Pair
+    // <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
+    VECTOR_N(2),
+    // RSA-PSS test vectors, pss-vect.txt, Example 3.1: A 1026-bit RSA Key Pair
+    // <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
+    VECTOR_N(3),
+    // RSA-PSS test vectors, pss-vect.txt, Example 4.1: A 1027-bit RSA Key Pair
+    // <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
+    VECTOR_N(4),
+    // RSA-PSS test vectors, pss-vect.txt, Example 5.1: A 1028-bit RSA Key Pair
+    // <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
+    VECTOR_N(5),
+    // RSA-PSS test vectors, pss-vect.txt, Example 6.1: A 1029-bit RSA Key Pair
+    // <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
+    VECTOR_N(6),
+    // RSA-PSS test vectors, pss-vect.txt, Example 7.1: A 1030-bit RSA Key Pair
+    // <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
+    VECTOR_N(7),
+    // RSA-PSS test vectors, pss-vect.txt, Example 8.1: A 1031-bit RSA Key Pair
+    // <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
+    VECTOR_N(8),
+    // RSA-PSS test vectors, pss-vect.txt, Example 9.1: A 1536-bit RSA Key Pair
+    // <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
+    VECTOR_N(9),
+    // RSA-PSS test vectors, pss-vect.txt, Example 10.1: A 2048-bit RSA Key Pair
+    // <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
+    VECTOR_N(10)};
 
-// RSA-PSS test vectors, pss-vect.txt, Example 8.1: A 1031-bit RSA Key Pair
-// <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
-TEST_F(Pkcs11RsaPssVectorTest, VerifyKnownSignature8) {
-  SIG_TEST_VECTOR_VERIFY(kTestVector8Spki, kTestVector8Data, kTestVector8Sig);
-}
-TEST_F(Pkcs11RsaPssVectorTest, SignAndVerify8) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kTestVector8Pkcs8, kTestVector8Spki,
-                              kTestVector8Data);
-}
-
-// RSA-PSS test vectors, pss-vect.txt, Example 9.1: A 1536-bit RSA Key Pair
-// <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
-TEST_F(Pkcs11RsaPssVectorTest, VerifyKnownSignature9) {
-  SIG_TEST_VECTOR_VERIFY(kTestVector9Spki, kTestVector9Data, kTestVector9Sig);
-}
-TEST_F(Pkcs11RsaPssVectorTest, SignAndVerify9) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kTestVector9Pkcs8, kTestVector9Spki,
-                              kTestVector9Data);
-}
-
-// RSA-PSS test vectors, pss-vect.txt, Example 10.1: A 2048-bit RSA Key Pair
-// <ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip>
-TEST_F(Pkcs11RsaPssVectorTest, VerifyKnownSignature10) {
-  SIG_TEST_VECTOR_VERIFY(kTestVector10Spki, kTestVector10Data,
-                         kTestVector10Sig);
-}
-TEST_F(Pkcs11RsaPssVectorTest, SignAndVerify10) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kTestVector10Pkcs8, kTestVector10Spki,
-                              kTestVector10Data);
-}
+INSTANTIATE_TEST_CASE_P(RsaPssSignVerify, Pkcs11RsaPssVectorTest,
+                        ::testing::ValuesIn(kRsaPssVectors));
 
 }  // namespace nss_test
--- a/security/nss/gtests/pk11_gtest/pk11_signature_test.h
+++ b/security/nss/gtests/pk11_gtest/pk11_signature_test.h
@@ -4,135 +4,133 @@
 
 #include <memory>
 #include "nss.h"
 #include "pk11pub.h"
 #include "sechash.h"
 
 #include "cpputil.h"
 #include "scoped_ptrs.h"
+#include "databuffer.h"
 
 #include "gtest/gtest.h"
 
 namespace nss_test {
 
+// For test vectors.
+struct Pkcs11SignatureTestParams {
+  const DataBuffer pkcs8_;
+  const DataBuffer spki_;
+  const DataBuffer data_;
+  const DataBuffer signature_;
+};
+
 class Pk11SignatureTest : public ::testing::Test {
  protected:
-  virtual CK_MECHANISM_TYPE mechanism() = 0;
-  virtual SECItem* parameters() = 0;
-  virtual SECOidTag hashOID() = 0;
+  Pk11SignatureTest(CK_MECHANISM_TYPE mechanism, SECOidTag hash_oid)
+      : mechanism_(mechanism), hash_oid_(hash_oid) {}
 
-  ScopedSECKEYPrivateKey ImportPrivateKey(const uint8_t* pkcs8,
-                                          size_t pkcs8_len) {
+  virtual const SECItem* parameters() const { return nullptr; }
+  CK_MECHANISM_TYPE mechanism() const { return mechanism_; }
+
+  ScopedSECKEYPrivateKey ImportPrivateKey(const DataBuffer& pkcs8) {
     ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
     if (!slot) {
+      ADD_FAILURE() << "No slot";
       return nullptr;
     }
 
-    SECItem pkcs8Item = {siBuffer, toUcharPtr(pkcs8),
-                         static_cast<unsigned int>(pkcs8_len)};
+    SECItem pkcs8Item = {siBuffer, toUcharPtr(pkcs8.data()),
+                         static_cast<unsigned int>(pkcs8.len())};
 
     SECKEYPrivateKey* key = nullptr;
     SECStatus rv = PK11_ImportDERPrivateKeyInfoAndReturnKey(
         slot.get(), &pkcs8Item, nullptr, nullptr, false, false, KU_ALL, &key,
         nullptr);
 
     if (rv != SECSuccess) {
       return nullptr;
     }
 
     return ScopedSECKEYPrivateKey(key);
   }
 
-  ScopedSECKEYPublicKey ImportPublicKey(const uint8_t* spki, size_t spki_len) {
-    SECItem spkiItem = {siBuffer, toUcharPtr(spki),
-                        static_cast<unsigned int>(spki_len)};
+  ScopedSECKEYPublicKey ImportPublicKey(const DataBuffer& spki) {
+    SECItem spkiItem = {siBuffer, toUcharPtr(spki.data()),
+                        static_cast<unsigned int>(spki.len())};
 
     ScopedCERTSubjectPublicKeyInfo certSpki(
         SECKEY_DecodeDERSubjectPublicKeyInfo(&spkiItem));
 
     return ScopedSECKEYPublicKey(SECKEY_ExtractPublicKey(certSpki.get()));
   }
 
-  ScopedSECItem ComputeHash(const uint8_t* data, size_t len) {
-    unsigned int hLen = HASH_ResultLenByOidTag(hashOID());
-    ScopedSECItem hash(SECITEM_AllocItem(nullptr, nullptr, hLen));
-    if (!hash) {
-      return nullptr;
-    }
-
-    SECStatus rv = PK11_HashBuf(hashOID(), hash->data, data, len);
-    if (rv != SECSuccess) {
-      return nullptr;
-    }
-
-    return hash;
+  bool ComputeHash(const DataBuffer& data, DataBuffer* hash) {
+    hash->Allocate(static_cast<size_t>(HASH_ResultLenByOidTag(hash_oid_)));
+    SECStatus rv =
+        PK11_HashBuf(hash_oid_, hash->data(), data.data(), data.len());
+    return rv == SECSuccess;
   }
 
-  ScopedSECItem SignHashedData(ScopedSECKEYPrivateKey& privKey,
-                               ScopedSECItem& hash) {
-    unsigned int sLen = PK11_SignatureLen(privKey.get());
-    ScopedSECItem sig(SECITEM_AllocItem(nullptr, nullptr, sLen));
-    if (!sig) {
-      return nullptr;
-    }
-
-    SECStatus rv = PK11_SignWithMechanism(privKey.get(), mechanism(),
-                                          parameters(), sig.get(), hash.get());
-    if (rv != SECSuccess) {
-      return nullptr;
-    }
-
-    return sig;
+  bool SignHashedData(ScopedSECKEYPrivateKey& privKey, const DataBuffer& hash,
+                      DataBuffer* sig) {
+    SECItem hashItem = {siBuffer, toUcharPtr(hash.data()),
+                        static_cast<unsigned int>(hash.len())};
+    int sigLen = PK11_SignatureLen(privKey.get());
+    EXPECT_LT(0, sigLen);
+    sig->Allocate(static_cast<size_t>(sigLen));
+    SECItem sigItem = {siBuffer, toUcharPtr(sig->data()),
+                       static_cast<unsigned int>(sig->len())};
+    SECStatus rv = PK11_SignWithMechanism(privKey.get(), mechanism_,
+                                          parameters(), &sigItem, &hashItem);
+    return rv == SECSuccess;
   }
 
-  ScopedSECItem ImportPrivateKeyAndSignHashedData(const uint8_t* pkcs8,
-                                                  size_t pkcs8_len,
-                                                  const uint8_t* data,
-                                                  size_t data_len) {
-    ScopedSECKEYPrivateKey privKey(ImportPrivateKey(pkcs8, pkcs8_len));
+  bool ImportPrivateKeyAndSignHashedData(const DataBuffer& pkcs8,
+                                         const DataBuffer& data,
+                                         DataBuffer* sig) {
+    ScopedSECKEYPrivateKey privKey(ImportPrivateKey(pkcs8));
     if (!privKey) {
-      return nullptr;
-    }
-
-    ScopedSECItem hash(ComputeHash(data, data_len));
-    if (!hash) {
-      return nullptr;
+      return false;
     }
 
-    return ScopedSECItem(SignHashedData(privKey, hash));
+    DataBuffer hash;
+    if (!ComputeHash(data, &hash)) {
+      ADD_FAILURE() << "Failed to compute hash";
+      return false;
+    }
+    return SignHashedData(privKey, hash, sig);
   }
 
-  void Verify(const uint8_t* spki, size_t spki_len, const uint8_t* data,
-              size_t data_len, const uint8_t* sig, size_t sig_len) {
-    ScopedSECKEYPublicKey pubKey(ImportPublicKey(spki, spki_len));
+  void Verify(const Pkcs11SignatureTestParams& params, const DataBuffer& sig) {
+    ScopedSECKEYPublicKey pubKey(ImportPublicKey(params.spki_));
     ASSERT_TRUE(pubKey);
 
-    ScopedSECItem hash(ComputeHash(data, data_len));
-    ASSERT_TRUE(hash);
-
-    SECItem sigItem = {siBuffer, toUcharPtr(sig),
-                       static_cast<unsigned int>(sig_len)};
+    DataBuffer hash;
+    ASSERT_TRUE(ComputeHash(params.data_, &hash));
 
     // Verify.
+    SECItem hashItem = {siBuffer, toUcharPtr(hash.data()),
+                        static_cast<unsigned int>(hash.len())};
+    SECItem sigItem = {siBuffer, toUcharPtr(sig.data()),
+                       static_cast<unsigned int>(sig.len())};
     SECStatus rv = PK11_VerifyWithMechanism(
-        pubKey.get(), mechanism(), parameters(), &sigItem, hash.get(), nullptr);
+        pubKey.get(), mechanism_, parameters(), &sigItem, &hashItem, nullptr);
     EXPECT_EQ(rv, SECSuccess);
   }
 
-  void SignAndVerify(const uint8_t* pkcs8, size_t pkcs8_len,
-                     const uint8_t* spki, size_t spki_len, const uint8_t* data,
-                     size_t data_len) {
-    ScopedSECItem sig(
-        ImportPrivateKeyAndSignHashedData(pkcs8, pkcs8_len, data, data_len));
-    ASSERT_TRUE(sig);
+  void Verify(const Pkcs11SignatureTestParams& params) {
+    Verify(params, params.signature_);
+  }
 
-    Verify(spki, spki_len, data, data_len, sig->data, sig->len);
+  void SignAndVerify(const Pkcs11SignatureTestParams& params) {
+    DataBuffer sig;
+    ASSERT_TRUE(
+        ImportPrivateKeyAndSignHashedData(params.pkcs8_, params.data_, &sig));
+    Verify(params, sig);
   }
+
+ private:
+  CK_MECHANISM_TYPE mechanism_;
+  SECOidTag hash_oid_;
 };
 
-#define SIG_TEST_VECTOR_VERIFY(spki, data, sig) \
-  Verify(spki, sizeof(spki), data, sizeof(data), sig, sizeof(sig));
-
-#define SIG_TEST_VECTOR_SIGN_VERIFY(pkcs8, spki, data) \
-  SignAndVerify(pkcs8, sizeof(pkcs8), spki, sizeof(spki), data, sizeof(data));
-
 }  // namespace nss_test
--- a/security/nss/gtests/softoken_gtest/softoken_gtest.cc
+++ b/security/nss/gtests/softoken_gtest/softoken_gtest.cc
@@ -1,10 +1,12 @@
 #include <cstdlib>
 
+#include "cert.h"
+#include "certdb.h"
 #include "nspr.h"
 #include "nss.h"
 #include "pk11pub.h"
 #include "secerr.h"
 
 #include "scoped_ptrs.h"
 
 #define GTEST_HAS_RTTI 0
@@ -195,16 +197,120 @@ TEST_F(SoftokenTest, CreateObjectChangeT
   EXPECT_EQ(SEC_ERROR_TOKEN_NOT_LOGGED_IN, PORT_GetError());
   ScopedPK11GenericObject obj(PK11_CreateGenericObject(
       slot.get(), attributes, PR_ARRAY_SIZE(attributes), true));
   // Because there's no password we can't logout and the operation should have
   // succeeded.
   EXPECT_NE(nullptr, obj);
 }
 
+// This is just any X509 certificate. Its contents don't matter.
+static unsigned char certDER[] = {
+    0x30, 0x82, 0x01, 0xEF, 0x30, 0x82, 0x01, 0x94, 0xA0, 0x03, 0x02, 0x01,
+    0x02, 0x02, 0x14, 0x49, 0xC4, 0xC4, 0x4A, 0xB6, 0x86, 0x07, 0xA3, 0x06,
+    0xDC, 0x4D, 0xC8, 0xC3, 0xFE, 0xC7, 0x21, 0x3A, 0x2D, 0xE4, 0xDA, 0x30,
+    0x0B, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0B,
+    0x30, 0x0F, 0x31, 0x0D, 0x30, 0x0B, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C,
+    0x04, 0x74, 0x65, 0x73, 0x74, 0x30, 0x22, 0x18, 0x0F, 0x32, 0x30, 0x31,
+    0x35, 0x31, 0x31, 0x32, 0x38, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5A,
+    0x18, 0x0F, 0x32, 0x30, 0x31, 0x38, 0x30, 0x32, 0x30, 0x35, 0x30, 0x30,
+    0x30, 0x30, 0x30, 0x30, 0x5A, 0x30, 0x0F, 0x31, 0x0D, 0x30, 0x0B, 0x06,
+    0x03, 0x55, 0x04, 0x03, 0x0C, 0x04, 0x74, 0x65, 0x73, 0x74, 0x30, 0x82,
+    0x01, 0x22, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D,
+    0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0F, 0x00, 0x30, 0x82,
+    0x01, 0x0A, 0x02, 0x82, 0x01, 0x01, 0x00, 0xBA, 0x88, 0x51, 0xA8, 0x44,
+    0x8E, 0x16, 0xD6, 0x41, 0xFD, 0x6E, 0xB6, 0x88, 0x06, 0x36, 0x10, 0x3D,
+    0x3C, 0x13, 0xD9, 0xEA, 0xE4, 0x35, 0x4A, 0xB4, 0xEC, 0xF5, 0x68, 0x57,
+    0x6C, 0x24, 0x7B, 0xC1, 0xC7, 0x25, 0xA8, 0xE0, 0xD8, 0x1F, 0xBD, 0xB1,
+    0x9C, 0x06, 0x9B, 0x6E, 0x1A, 0x86, 0xF2, 0x6B, 0xE2, 0xAF, 0x5A, 0x75,
+    0x6B, 0x6A, 0x64, 0x71, 0x08, 0x7A, 0xA5, 0x5A, 0xA7, 0x45, 0x87, 0xF7,
+    0x1C, 0xD5, 0x24, 0x9C, 0x02, 0x7E, 0xCD, 0x43, 0xFC, 0x1E, 0x69, 0xD0,
+    0x38, 0x20, 0x29, 0x93, 0xAB, 0x20, 0xC3, 0x49, 0xE4, 0xDB, 0xB9, 0x4C,
+    0xC2, 0x6B, 0x6C, 0x0E, 0xED, 0x15, 0x82, 0x0F, 0xF1, 0x7E, 0xAD, 0x69,
+    0x1A, 0xB1, 0xD3, 0x02, 0x3A, 0x8B, 0x2A, 0x41, 0xEE, 0xA7, 0x70, 0xE0,
+    0x0F, 0x0D, 0x8D, 0xFD, 0x66, 0x0B, 0x2B, 0xB0, 0x24, 0x92, 0xA4, 0x7D,
+    0xB9, 0x88, 0x61, 0x79, 0x90, 0xB1, 0x57, 0x90, 0x3D, 0xD2, 0x3B, 0xC5,
+    0xE0, 0xB8, 0x48, 0x1F, 0xA8, 0x37, 0xD3, 0x88, 0x43, 0xEF, 0x27, 0x16,
+    0xD8, 0x55, 0xB7, 0x66, 0x5A, 0xAA, 0x7E, 0x02, 0x90, 0x2F, 0x3A, 0x7B,
+    0x10, 0x80, 0x06, 0x24, 0xCC, 0x1C, 0x6C, 0x97, 0xAD, 0x96, 0x61, 0x5B,
+    0xB7, 0xE2, 0x96, 0x12, 0xC0, 0x75, 0x31, 0xA3, 0x0C, 0x91, 0xDD, 0xB4,
+    0xCA, 0xF7, 0xFC, 0xAD, 0x1D, 0x25, 0xD3, 0x09, 0xEF, 0xB9, 0x17, 0x0E,
+    0xA7, 0x68, 0xE1, 0xB3, 0x7B, 0x2F, 0x22, 0x6F, 0x69, 0xE3, 0xB4, 0x8A,
+    0x95, 0x61, 0x1D, 0xEE, 0x26, 0xD6, 0x25, 0x9D, 0xAB, 0x91, 0x08, 0x4E,
+    0x36, 0xCB, 0x1C, 0x24, 0x04, 0x2C, 0xBF, 0x16, 0x8B, 0x2F, 0xE5, 0xF1,
+    0x8F, 0x99, 0x17, 0x31, 0xB8, 0xB3, 0xFE, 0x49, 0x23, 0xFA, 0x72, 0x51,
+    0xC4, 0x31, 0xD5, 0x03, 0xAC, 0xDA, 0x18, 0x0A, 0x35, 0xED, 0x8D, 0x02,
+    0x03, 0x01, 0x00, 0x01, 0x30, 0x0B, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86,
+    0xF7, 0x0D, 0x01, 0x01, 0x0B, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x20,
+    0x5C, 0x75, 0x51, 0x9F, 0x13, 0x11, 0x50, 0xCD, 0x5D, 0x8A, 0xDE, 0x20,
+    0xA3, 0xBC, 0x06, 0x30, 0x91, 0xFF, 0xB2, 0x73, 0x75, 0x5F, 0x31, 0x64,
+    0xEC, 0xFD, 0xCB, 0x42, 0x80, 0x0A, 0x70, 0xE6, 0x02, 0x21, 0x00, 0x82,
+    0x12, 0xF7, 0xE5, 0xEA, 0x40, 0x27, 0xFD, 0xF7, 0xC0, 0x0E, 0x25, 0xF3,
+    0x3E, 0x34, 0x95, 0x80, 0xB9, 0xA3, 0x38, 0xE0, 0x56, 0x68, 0xDA, 0xE5,
+    0xC1, 0xF5, 0x37, 0xC7, 0xB5, 0xCE, 0x0D};
+
+struct PasswordPair {
+  const char *mInitialPassword;
+  const char *mSecondPassword;
+};
+
+class SoftokenPasswordChangeTest
+    : public SoftokenTest,
+      public ::testing::WithParamInterface<PasswordPair> {};
+
+TEST_P(SoftokenPasswordChangeTest, KeepTrustAfterPasswordChange) {
+  const PasswordPair &passwords = GetParam();
+  ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
+  ASSERT_TRUE(slot);
+  // Set a password.
+  EXPECT_EQ(SECSuccess,
+            PK11_InitPin(slot.get(), nullptr, passwords.mInitialPassword));
+  SECItem certDERItem = {siBuffer, certDER, sizeof(certDER)};
+  // Import a certificate.
+  ScopedCERTCertificate cert(CERT_NewTempCertificate(
+      CERT_GetDefaultCertDB(), &certDERItem, nullptr, true, true));
+  EXPECT_TRUE(cert);
+  SECStatus result =
+      PK11_ImportCert(slot.get(), cert.get(), CK_INVALID_HANDLE, "test", false);
+  EXPECT_EQ(SECSuccess, result);
+  // Set a trust value.
+  CERTCertTrust trust = {CERTDB_TRUSTED_CLIENT_CA | CERTDB_NS_TRUSTED_CA |
+                             CERTDB_TRUSTED_CA | CERTDB_VALID_CA,
+                         0, 0};
+  result = CERT_ChangeCertTrust(nullptr, cert.get(), &trust);
+  EXPECT_EQ(SECSuccess, result);
+  // Release the certificate to ensure we get it from the DB rather than an
+  // in-memory cache, below.
+  cert = nullptr;
+  // Change the password.
+  result = PK11_ChangePW(slot.get(), passwords.mInitialPassword,
+                         passwords.mSecondPassword);
+  EXPECT_EQ(SECSuccess, result);
+  // Look up the certificate again.
+  ScopedCERTCertificate newCert(
+      PK11_FindCertFromDERCertItem(slot.get(), &certDERItem, nullptr));
+  EXPECT_TRUE(newCert.get());
+  // The trust should be the same as before.
+  CERTCertTrust newTrust = {0, 0, 0};
+  result = CERT_GetCertTrust(newCert.get(), &newTrust);
+  EXPECT_EQ(SECSuccess, result);
+  EXPECT_EQ(trust.sslFlags, newTrust.sslFlags);
+  EXPECT_EQ(trust.emailFlags, newTrust.emailFlags);
+  EXPECT_EQ(trust.objectSigningFlags, newTrust.objectSigningFlags);
+}
+
+static const PasswordPair PASSWORD_CHANGE_TESTS[] = {
+    {"password", ""},           // non-empty to empty password
+    {"", "password"},           // empty to non-empty password
+    {"password", "password2"},  // non-empty to non-empty password
+};
+
+INSTANTIATE_TEST_CASE_P(SoftokenPasswordChangeTests, SoftokenPasswordChangeTest,
+                        ::testing::ValuesIn(PASSWORD_CHANGE_TESTS));
+
 class SoftokenNoDBTest : public ::testing::Test {};
 
 TEST_F(SoftokenNoDBTest, NeedUserInitNoDB) {
   ASSERT_EQ(SECSuccess, NSS_NoDB_Init("."));
   ScopedPK11SlotInfo slot(PK11_GetInternalKeySlot());
   ASSERT_TRUE(slot);
   EXPECT_EQ(PR_FALSE, PK11_NeedUserInit(slot.get()));
 
--- a/security/nss/lib/softoken/sftkdb.c
+++ b/security/nss/lib/softoken/sftkdb.c
@@ -35,17 +35,17 @@
  * are endian/length independent except those attributes that pass CK_ULONG.
  *
  * The following functions fixes up the CK_ULONG type attributes so that the data
  * base sees a machine independent view. CK_ULONGs are stored as 4 byte network
  * byte order values (big endian).
  */
 #define BBP 8
 
-static PRBool
+PRBool
 sftkdb_isULONGAttribute(CK_ATTRIBUTE_TYPE type)
 {
     switch (type) {
         case CKA_CERTIFICATE_CATEGORY:
         case CKA_CERTIFICATE_TYPE:
         case CKA_CLASS:
         case CKA_JAVA_MIDP_SECURITY_DOMAIN:
         case CKA_KEY_GEN_MECHANISM:
@@ -1365,34 +1365,35 @@ sftkdb_SetAttributeValue(SFTKDBHandle *h
     }
 
     ntemplate = sftkdb_fixupTemplateIn(template, count, &data);
     if (ntemplate == NULL) {
         return CKR_HOST_MEMORY;
     }
 
     /* make sure we don't have attributes that conflict with the existing DB */
-    crv = sftkdb_checkConflicts(db, object->objclass, template, count, objectID);
+    crv = sftkdb_checkConflicts(db, object->objclass, ntemplate, count,
+                                objectID);
     if (crv != CKR_OK) {
         goto loser;
     }
 
     arena = PORT_NewArena(256);
     if (arena == NULL) {
         crv = CKR_HOST_MEMORY;
         goto loser;
     }
 
     crv = (*db->sdb_Begin)(db);
     if (crv != CKR_OK) {
         goto loser;
     }
     inTransaction = PR_TRUE;
-    crv = sftkdb_setAttributeValue(arena, handle, db,
-                                   objectID, template, count);
+    crv = sftkdb_setAttributeValue(arena, handle, db, objectID, ntemplate,
+                                   count);
     if (crv != CKR_OK) {
         goto loser;
     }
     crv = (*db->sdb_Commit)(db);
 loser:
     if (crv != CKR_OK && inTransaction) {
         (*db->sdb_Abort)(db);
     }
--- a/security/nss/lib/softoken/sftkdbti.h
+++ b/security/nss/lib/softoken/sftkdbti.h
@@ -44,15 +44,16 @@ SECStatus sftkdb_SignAttribute(PLArenaPo
                                CK_OBJECT_HANDLE objectID,
                                CK_ATTRIBUTE_TYPE attrType,
                                SECItem *plainText, SECItem **sigText);
 SECStatus sftkdb_VerifyAttribute(SECItem *passKey,
                                  CK_OBJECT_HANDLE objectID,
                                  CK_ATTRIBUTE_TYPE attrType,
                                  SECItem *plainText, SECItem *sigText);
 
+PRBool sftkdb_isULONGAttribute(CK_ATTRIBUTE_TYPE type);
 void sftk_ULong2SDBULong(unsigned char *data, CK_ULONG value);
 CK_RV sftkdb_Update(SFTKDBHandle *handle, SECItem *key);
 CK_RV sftkdb_PutAttributeSignature(SFTKDBHandle *handle,
                                    SDB *keyTarget, CK_OBJECT_HANDLE objectID,
                                    CK_ATTRIBUTE_TYPE type, SECItem *signText);
 
 #endif
--- a/security/nss/lib/softoken/sftkpwd.c
+++ b/security/nss/lib/softoken/sftkpwd.c
@@ -921,16 +921,23 @@ sftk_updateMacs(PLArenaPool *arena, SFTK
         SECItem *signText;
         SECItem plainText;
         SECStatus rv;
 
         if ((authAttrs[i].ulValueLen == -1) || (authAttrs[i].ulValueLen == 0)) {
             continue;
         }
 
+        if (authAttrs[i].ulValueLen == sizeof(CK_ULONG) &&
+            sftkdb_isULONGAttribute(authAttrs[i].type)) {
+            CK_ULONG value = *(CK_ULONG *)authAttrs[i].pValue;
+            sftk_ULong2SDBULong(authAttrs[i].pValue, value);
+            authAttrs[i].ulValueLen = SDB_ULONG_SIZE;
+        }
+
         plainText.data = authAttrs[i].pValue;
         plainText.len = authAttrs[i].ulValueLen;
         rv = sftkdb_SignAttribute(arena, newKey, id,
                                   authAttrs[i].type, &plainText, &signText);
         if (rv != SECSuccess) {
             return CKR_GENERAL_ERROR;
         }
         rv = sftkdb_PutAttributeSignature(handle, keyTarget, id,
--- a/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp
+++ b/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp
@@ -33,20 +33,16 @@
 // processes and so they will be unloaded if they attempt to load.
 const std::vector<std::wstring> kDllsToUnload = {
   // HitmanPro - SurfRight now part of Sophos (bug 1400637)
   L"hmpalert.dll",
 
   // K7 Computing (bug 1400637)
   L"k7pswsen.dll",
 
-  // Symantec (bug 1400637)
-  L"prntm64.dll",
-  L"sysfer.dll",
-
   // Avast Antivirus (bug 1400637)
   L"snxhk64.dll",
   L"snxhk.dll",
 
   // Webroot SecureAnywhere (bug 1400637)
   L"wrusr.dll",
 };
 
--- a/services/sync/modules/engines/history.js
+++ b/services/sync/modules/engines/history.js
@@ -240,26 +240,27 @@ HistoryStore.prototype = {
                       + record.uri.spec + ": can't add this URI.");
       return false;
     }
 
     // We dupe visits by date and type. So an incoming visit that has
     // the same timestamp and type as a local one won't get applied.
     // To avoid creating new objects, we rewrite the query result so we
     // can simply check for containment below.
-    let curVisits = [];
+    let curVisitsAsArray = [];
+    let curVisits = new Set();
     try {
-      curVisits = await PlacesSyncUtils.history.fetchVisitsForURL(record.histUri);
+      curVisitsAsArray = await PlacesSyncUtils.history.fetchVisitsForURL(record.histUri);
     } catch (e) {
       this._log.error("Error while fetching visits for URL ${record.histUri}", record.histUri);
     }
 
     let i, k;
-    for (i = 0; i < curVisits.length; i++) {
-      curVisits[i] = curVisits[i].date + "," + curVisits[i].type;
+    for (i = 0; i < curVisitsAsArray.length; i++) {
+      curVisits.add(curVisitsAsArray[i].date + "," + curVisitsAsArray[i].type);
     }
 
     // Walk through the visits, make sure we have sound data, and eliminate
     // dupes. The latter is done by rewriting the array in-place.
     for (i = 0, k = 0; i < record.visits.length; i++) {
       let visit = record.visits[k] = record.visits[i];
 
       if (!visit.date || typeof visit.date != "number" || !Number.isInteger(visit.date)) {
@@ -277,25 +278,25 @@ HistoryStore.prototype = {
 
       // Dates need to be integers. Future and far past dates are clamped to the
       // current date and earliest sensible date, respectively.
       let originalVisitDate = PlacesUtils.toDate(Math.round(visit.date));
       visit.date = PlacesSyncUtils.history.clampVisitDate(originalVisitDate);
 
       let visitDateAsPRTime = PlacesUtils.toPRTime(visit.date);
       let visitKey = visitDateAsPRTime + "," + visit.type;
-      if (curVisits.indexOf(visitKey) != -1) {
+      if (curVisits.has(visitKey)) {
         // Visit is a dupe, don't increment 'k' so the element will be
         // overwritten.
         continue;
       }
 
       // Note the visit key, so that we don't add duplicate visits with
       // clamped timestamps.
-      curVisits.push(visitKey);
+      curVisits.add(visitKey);
 
       visit.transition = visit.type;
       k += 1;
     }
     record.visits.length = k; // truncate array
 
     // No update if there aren't any visits to apply.
     // mozIAsyncHistory::updatePlaces() wants at least one visit.
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py
@@ -185,17 +185,18 @@ class FirefoxBrowser(Browser):
 
         self.profile = FirefoxProfile(locations=locations,
                                       preferences=preferences)
         self.profile.set_preferences({"marionette.port": self.marionette_port,
                                       "dom.disable_open_during_load": False,
                                       "network.dns.localDomains": ",".join(hostnames),
                                       "network.proxy.type": 0,
                                       "places.history.enabled": False,
-                                      "dom.send_after_paint_to_content": True})
+                                      "dom.send_after_paint_to_content": True,
+                                      "network.preload": True})
         if self.e10s:
             self.profile.set_preferences({"browser.tabs.remote.autostart": True})
 
         if self.test_type == "reftest":
             self.profile.set_preferences({"layout.interruptible-reflow.enabled": False})
 
         if self.leak_check and kwargs.get("check_leaks", True):
             self.leak_report_file = os.path.join(self.profile.profile, "runtests_leaks.log")
--- a/toolkit/components/extensions/ExtensionParent.jsm
+++ b/toolkit/components/extensions/ExtensionParent.jsm
@@ -766,29 +766,33 @@ ParentAPIManager = {
   async addListener(data, target) {
     let context = this.getContextById(data.childId);
     if (context.parentMessageManager !== target.messageManager) {
       throw new Error("Got message on unexpected message manager");
     }
 
     let {childId} = data;
     let handlingUserInput = false;
+    let lowPriority = data.path.startsWith("webRequest.");
 
     function listener(...listenerArgs) {
       return context.sendMessage(
         context.parentMessageManager,
         "API:RunListener",
         {
           childId,
           handlingUserInput,
           listenerId: data.listenerId,
           path: data.path,
-          args: new StructuredCloneHolder(listenerArgs),
+          get args() {
+            return new StructuredCloneHolder(listenerArgs);
+          },
         },
         {
+          lowPriority,
           recipient: {childId},
         }).then(result => {
           return result && result.deserialize(global);
         });
     }
 
     context.listenerProxies.set(data.listenerId, listener);
 
--- a/toolkit/components/extensions/MessageChannel.jsm
+++ b/toolkit/components/extensions/MessageChannel.jsm
@@ -107,16 +107,62 @@ Cu.import("resource://gre/modules/Extens
 Cu.import("resource://gre/modules/Services.jsm");
 
 const {
   MessageManagerProxy,
 } = ExtensionUtils;
 
 const {DEBUG} = AppConstants;
 
+// Idle callback timeout for low-priority message dispatch.
+const LOW_PRIORITY_TIMEOUT_MS = 250;
+
+const MESSAGE_MESSAGES = "MessageChannel:Messages";
+const MESSAGE_RESPONSE = "MessageChannel:Response";
+
+// ESLint can't tell that these are referenced, so tell it that they're
+// exported to make it happy.
+/* exported _deferredResult, _makeDeferred */
+var _deferredResult;
+var _makeDeferred = (resolve, reject) => {
+  // We use arrow functions here and refer to the outer variables via
+  // `this`, to avoid a lexical name lookup. Yes, it makes a difference.
+  // No, I don't like it any more than you do.
+  this._deferredResult.resolve = resolve;
+  this._deferredResult.reject = reject;
+};
+
+/**
+ * Helper to create a new Promise without allocating any closures to
+ * receive its resolution functions.
+ *
+ * I know what you're thinking: "This is crazy. There is no possible way
+ * this can be necessary. Just use the ordinary Promise constructor the
+ * way it was meant to be used, you lunatic."
+ *
+ * And, against all odds, it turns out that you're wrong. Creating
+ * lambdas to receive promise resolution functions consistently turns
+ * out to be one of the most expensive parts of message dispatch in this
+ * code.
+ *
+ * So we do the stupid micro-optimization, and try to live with
+ * ourselves for it.
+ *
+ * (See also bug 1404950.)
+ *
+ * @returns {object}
+ */
+let Deferred = () => {
+  let res = {};
+  this._deferredResult = res;
+  res.promise = new Promise(this._makeDeferred);
+  this._deferredResult = null;
+  return res;
+};
+
 /**
  * Handles the mapping and dispatching of messages to their registered
  * handlers. There is one broker per message manager and class of
  * messages. Each class of messages is mapped to one native message
  * name, e.g., "MessageChannel:Message", and is dispatched to handlers
  * based on an internal message name, e.g., "Extension:ExecuteScript".
  */
 class FilteringMessageManager {
@@ -144,42 +190,48 @@ class FilteringMessageManager {
     this.messageManager = messageManager;
 
     this.messageManager.addMessageListener(this.messageName, this, true);
 
     this.handlers = new Map();
   }
 
   /**
-   * Receives a message from our message manager, maps it to a handler, and
-   * passes the result to our message callback.
+   * Receives a set of messages from our message manager, maps each to a
+   * handler, and passes the results to our message callbacks.
    */
   receiveMessage({data, target}) {
-    let handlers = Array.from(this.getHandlers(data.messageName, data.sender || null, data.recipient));
+    data.forEach(msg => {
+      if (msg) {
+        let handlers = Array.from(this.getHandlers(msg.messageName,
+                                                   msg.sender || null,
+                                                   msg.recipient));
 
-    data.target = target;
-    this.callback(handlers, data);
+        msg.target = target;
+        this.callback(handlers, msg);
+      }
+    });
   }
 
   /**
    * Iterates over all handlers for the given message name. If `recipient`
    * is provided, only iterates over handlers whose filters match it.
    *
    * @param {string|number} messageName
    *     The message for which to return handlers.
    * @param {object} sender
    *     The sender data on which to filter handlers.
    * @param {object} recipient
    *     The recipient data on which to filter handlers.
    */
   * getHandlers(messageName, sender, recipient) {
     let handlers = this.handlers.get(messageName) || new Set();
     for (let handler of handlers) {
-      if (MessageChannel.matchesFilter(handler.messageFilterStrict || {}, recipient) &&
-          MessageChannel.matchesFilter(handler.messageFilterPermissive || {}, recipient, false) &&
+      if (MessageChannel.matchesFilter(handler.messageFilterStrict || null, recipient) &&
+          MessageChannel.matchesFilter(handler.messageFilterPermissive || null, recipient, false) &&
           (!handler.filterMessage || handler.filterMessage(sender, recipient))) {
         yield handler;
       }
     }
   }
 
   /**
    * Registers a handler for the given message.
@@ -213,20 +265,96 @@ class FilteringMessageManager {
   removeHandler(messageName, handler) {
     if (this.handlers.has(messageName)) {
       this.handlers.get(messageName).delete(handler);
     }
   }
 }
 
 /**
- * A simplified subclass of FilteringMessageManager that only supports
- * one handler per message, and does not support filtering.
+ * A message dispatch and response manager that wrapse a single native
+ * message manager. Handles dispatching messages through the manager
+ * (optionally coalescing several low-priority messages and dispatching
+ * them during an idle slice), and mapping their responses to the
+ * appropriate response callbacks.
+ *
+ * Note that this is a simplified subclass of FilteringMessageManager
+ * that only supports one handler per message, and does not support
+ * filtering.
  */
 class ResponseManager extends FilteringMessageManager {
+  constructor(messageName, callback, messageManager) {
+    super(messageName, callback, messageManager);
+
+    this.idleMessages = [];
+    this.idleScheduled = false;
+    this.onIdle = this.onIdle.bind(this);
+  }
+
+  /**
+   * Schedules a new idle callback to dispatch pending low-priority
+   * messages, if one is not already scheduled.
+   */
+  scheduleIdleCallback() {
+    if (!this.idleScheduled) {
+      ChromeUtils.idleDispatch(this.onIdle, {timeout: LOW_PRIORITY_TIMEOUT_MS});
+      this.idleScheduled = true;
+    }
+  }
+
+  /**
+   * Called when the event queue is idle, and dispatches any pending
+   * low-priority messages in a single chunk.
+   *
+   * @param {IdleDeadline} deadline
+   */
+  onIdle(deadline) {
+    this.idleScheduled = false;
+
+    let messages = this.idleMessages;
+    this.idleMessages = [];
+
+    let msgs = messages.map(msg => msg.getMessage());
+    try {
+      this.messageManager.sendAsyncMessage(MESSAGE_MESSAGES, msgs);
+    } catch (e) {
+      for (let msg of messages) {
+        msg.reject(e);
+      }
+    }
+  }
+
+  /**
+   * Sends a message through our wrapped message manager, or schedules
+   * it for low-priority dispatch during an idle callback.
+   *
+   * @param {any} message
+   *        The message to send.
+   * @param {object} [options]
+   *        Message dispatch options.
+   * @param {boolean} [options.lowPriority = false]
+   *        If true, dispatches the message in a single chunk with other
+   *        low-priority messages the next time the event queue is idle.
+   */
+  sendMessage(message, options = {}) {
+    if (options.lowPriority) {
+      this.idleMessages.push(message);
+      this.scheduleIdleCallback();
+    } else {
+      this.messageManager.sendAsyncMessage(MESSAGE_MESSAGES, [message.getMessage()]);
+    }
+  }
+
+  receiveMessage({data, target}) {
+    data.target = target;
+
+    this.callback(this.handlers.get(data.messageName),
+                  data);
+  }
+
   * getHandlers(messageName, sender, recipient) {
     let handler = this.handlers.get(messageName);
     if (handler) {
       yield handler;
     }
   }
 
   addHandler(messageName, handler) {
@@ -286,45 +414,140 @@ class FilteringMessageManagerMap extends
    * message manager.
    *
    * @param {nsIMessageListenerManager} target
    *     The message manager for which to return a broker.
    *
    * @returns {FilteringMessageManager}
    */
   get(target) {
-    if (this.has(target)) {
-      return super.get(target);
+    let broker = super.get(target);
+    if (broker) {
+      return broker;
     }
 
-    let broker = new this._constructor(this.messageName, this.callback, target);
+    broker = new this._constructor(this.messageName, this.callback, target);
     this.set(target, broker);
 
     if (target instanceof Ci.nsIDOMEventTarget) {
       let onUnload = event => {
         target.removeEventListener("unload", onUnload);
         this.delete(target);
       };
       target.addEventListener("unload", onUnload);
     }
 
     return broker;
   }
 }
 
-const MESSAGE_MESSAGE = "MessageChannel:Message";
-const MESSAGE_RESPONSE = "MessageChannel:Response";
+/**
+ * Represents a message being sent through a MessageChannel, which may
+ * or may not have been dispatched yet, and is pending a response.
+ *
+ * When a response has been received, or the message has been canceled,
+ * this class is responsible for settling the response promise as
+ * appropriate.
+ *
+ * @param {number} channelId
+ *        The unique ID for this message.
+ * @param {any} message
+ *        The message contents.
+ * @param {object} sender
+ *        An object describing the sender of the message, used by
+ *        `abortResponses` to determine whether the message should be
+ *        aborted.
+ * @param {ResponseManager} broker
+ *        The response broker on which we're expected to receive a
+ *        reply.
+ */
+class PendingMessage {
+  constructor(channelId, message, sender, broker) {
+    this.channelId = channelId;
+    this.message = message;
+    this.sender = sender;
+    this.broker = broker;
+    this.deferred = Deferred();
+
+    MessageChannel.pendingResponses.add(this);
+  }
+
+  /**
+   * Cleans up after this message once we've received or aborted a
+   * response.
+   */
+  cleanup() {
+    if (this.broker) {
+      this.broker.removeHandler(this.channelId, this);
+      MessageChannel.pendingResponses.delete(this);
+
+      this.message = null;
+      this.broker = null;
+    }
+  }
+
+  /**
+   * Returns the promise which will resolve when we've received or
+   * aborted a response to this message.
+   */
+  get promise() {
+    return this.deferred.promise;
+  }
+
+  /**
+   * Resolves the message's response promise, and cleans up.
+   *
+   * @param {any} value
+   */
+  resolve(value) {
+    this.cleanup();
+    this.deferred.resolve(value);
+  }
+
+  /**
+   * Rejects the message's response promise, and cleans up.
+   *
+   * @param {any} value
+   */
+  reject(value) {
+    this.cleanup();
+    this.deferred.reject(value);
+  }
+
+  get messageManager() {
+    return this.broker.messageManager;
+  }
+
+  /**
+   * Returns the contents of the message to be sent over a message
+   * manager, and registers the response with our response broker.
+   *
+   * Returns null if the response has already been canceled, and the
+   * message should not be sent.
+   *
+   * @returns {any}
+   */
+  getMessage() {
+    let msg = null;
+    if (this.broker) {
+      this.broker.addHandler(this.channelId, this);
+      msg = this.message;
+      this.message = null;
+    }
+    return msg;
+  }
+}
 
 this.MessageChannel = {
   init() {
     Services.obs.addObserver(this, "message-manager-close");
     Services.obs.addObserver(this, "message-manager-disconnect");
 
     this.messageManagers = new FilteringMessageManagerMap(
-      MESSAGE_MESSAGE, this._handleMessage.bind(this));
+      MESSAGE_MESSAGES, this._handleMessage.bind(this));
 
     this.responseManagers = new FilteringMessageManagerMap(
       MESSAGE_RESPONSE, this._handleResponse.bind(this),
       ResponseManager);
 
     /**
      * @property {Set<Deferred>} pendingResponses
      * Contains a set of pending responses, either waiting to be
@@ -431,28 +654,31 @@ this.MessageChannel = {
   },
 
   /**
    * Returns true if the properties of the `data` object match those in
    * the `filter` object. Matching is done on a strict equality basis,
    * and the behavior varies depending on the value of the `strict`
    * parameter.
    *
-   * @param {object} filter
+   * @param {object?} filter
    *    The filter object to match against.
    * @param {object} data
    *    The data object being matched.
    * @param {boolean} [strict=true]
    *    If true, all properties in the `filter` object have a
    *    corresponding property in `data` with the same value. If
    *    false, properties present in both objects must have the same
    *    value.
    * @returns {boolean} True if the objects match.
    */
   matchesFilter(filter, data, strict = true) {
+    if (!filter) {
+      return true;
+    }
     if (strict) {
       return Object.keys(filter).every(key => {
         return key in data && data[key] === filter[key];
       });
     }
     return Object.keys(filter).every(key => {
       return !(key in data) || data[key] === filter[key];
     });
@@ -570,71 +796,55 @@ this.MessageChannel = {
    *    `messageFilterPermissive` filters defined by recipients in order
    *    for the message to be received.
    * @param {object} [options.sender]
    *    A structured-clone-compatible object to identify the message
    *    sender. This object may also be used to avoid delivering the
    *    message to the sender, and as a filter to prematurely
    *    abort responses when the sender is being destroyed.
    *    @see `abortResponses`.
-   * @param {integer} [options.responseType=RESPONSE_SINGLE]
+   * @param {boolean} [options.lowPriority = false]
+   *    If true, treat this as a low-priority message, and attempt to
+   *    send it in the same chunk as other messages to the same target
+   *    the next time the event queue is idle. This option reduces
+   *    messaging overhead at the expense of adding some latency.
+   * @param {integer} [options.responseType = RESPONSE_SINGLE]
    *    Specifies the type of response expected. See the `RESPONSE_*`
    *    contents for details.
    * @returns {Promise}
    */
   sendMessage(target, messageName, data, options = {}) {
     let sender = options.sender || {};
     let recipient = options.recipient || {};
     let responseType = options.responseType || this.RESPONSE_SINGLE;
 
     let channelId = ExtensionUtils.getUniqueId();
     let message = {messageName, channelId, sender, recipient, data, responseType};
     data = null;
 
     if (responseType == this.RESPONSE_NONE) {
       try {
-        target.sendAsyncMessage(MESSAGE_MESSAGE, message);
+        target.sendAsyncMessage(MESSAGE_MESSAGES, [message]);
       } catch (e) {
         // Caller is not expecting a reply, so dump the error to the console.
         Cu.reportError(e);
         return Promise.reject(e);
       }
       return Promise.resolve();  // Not expecting any reply.
     }
 
-    let deferred = {};
-    deferred.promise = new Promise((resolve, reject) => {
-      deferred.resolve = resolve;
-      deferred.reject = reject;
-    });
-    deferred.sender = recipient;
-    deferred.messageManager = target;
-    deferred.channelId = channelId;
-
-    // The channel ID is used as the message name when routing responses.
-    // Add a message listener to the response broker, and remove it once
-    // we've gotten (or canceled) a response.
     let broker = this.responseManagers.get(target);
-    broker.addHandler(channelId, deferred);
-
-    this.pendingResponses.add(deferred);
-
-    let cleanup = () => {
-      broker.removeHandler(channelId, deferred);
-      this.pendingResponses.delete(deferred);
-    };
-    deferred.promise.then(cleanup, cleanup);
-
+    let pending = new PendingMessage(channelId, message, recipient, broker);
+    message = null;
     try {
-      target.sendAsyncMessage(MESSAGE_MESSAGE, message);
+      broker.sendMessage(pending, options);
     } catch (e) {
-      deferred.reject(e);
+      pending.reject(e);
     }
-    message = null;
-    return deferred.promise;
+    return pending.promise;
   },
 
   _callHandlers(handlers, data) {
     let responseType = data.responseType;
 
     // At least one handler is required for all response types but
     // RESPONSE_ALL.
     if (handlers.length == 0 && responseType != this.RESPONSE_ALL) {
@@ -776,39 +986,36 @@ this.MessageChannel = {
         cleanup();
         Cu.reportError(e);
       });
   },
 
   /**
    * Handles message callbacks from the response brokers.
    *
-   * Each handler object is a deferred object created by `sendMessage`, and
-   * should be resolved or rejected based on the contents of the response.
-   *
-   * @param {Array<MessageHandler>} handlers
+   * @param {MessageHandler?} handler
+   *        A deferred object created by `sendMessage`, to be resolved
+   *        or rejected based on the contents of the response.
    * @param {object} data
    * @param {nsIMessageSender|{messageManager:nsIMessageSender}} data.target
    */
-  _handleResponse(handlers, data) {
+  _handleResponse(handler, data) {
     // If we have an error at this point, we have handler to report it to,
     // so just log it.
-    if (handlers.length == 0) {
+    if (!handler) {
       if (this.abortedResponses.has(data.messageName)) {
         this.abortedResponses.delete(data.messageName);
         Services.console.logStringMessage(`Ignoring response to aborted listener for ${data.messageName}`);
       } else {
         Cu.reportError(`No matching message response handler for ${data.messageName}`);
       }
-    } else if (handlers.length > 1) {
-      Cu.reportError(`Multiple matching response handlers for ${data.messageName}`);
     } else if (data.result === this.RESULT_SUCCESS) {
-      handlers[0].resolve(data.value);
+      handler.resolve(data.value);
     } else {
-      handlers[0].reject(data.error);
+      handler.reject(data.error);
     }
   },
 
   /**
    * Aborts pending message response for the specific channel.
    *
    * @param {string} channelId
    *    A string for channelId of the response.
--- a/toolkit/components/extensions/test/mochitest/test_ext_webrequest_hsts.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_webrequest_hsts.html
@@ -49,16 +49,17 @@ add_task(async function test_hsts_reques
     browser.webRequest.onBeforeRedirect.addListener(details => {
       browser.test.assertEq(expect.shift(), "onBeforeRedirect");
     }, {urls});
     browser.webRequest.onResponseStarted.addListener(details => {
       browser.test.assertEq(expect.shift(), "onResponseStarted");
     }, {urls});
     browser.webRequest.onCompleted.addListener(details => {
       browser.test.assertEq(expect.shift(), "onCompleted");
+      browser.test.sendMessage("onCompleted", details.url);
     }, {urls});
     browser.webRequest.onErrorOccurred.addListener(details => {
       browser.test.notifyFail(`onErrorOccurred ${JSON.stringify(details)}`);
     }, {urls});
 
     async function onUpdated(tabId, tabInfo, tab) {
       if (tabInfo.status !== "complete") {
         return;
@@ -79,33 +80,38 @@ add_task(async function test_hsts_reques
   let sample = "https://example.org/tests/toolkit/components/extensions/test/mochitest/file_sample.html";
   extension.sendMessage(`https://${testPath}/redirect_auto.sjs?redirect_uri=${sample}`,
     ["onBeforeRequest", "onBeforeSendHeaders", "onSendHeaders",
      "onHeadersReceived", "onBeforeRedirect", "onBeforeRequest",
      "onBeforeSendHeaders", "onSendHeaders", "onHeadersReceived",
      "onResponseStarted", "onCompleted"]);
   // redirect_auto adds a query string
   ok((await extension.awaitMessage("tabs-done")).startsWith(sample), "redirection ok");
+  ok((await extension.awaitMessage("onCompleted")).startsWith(sample), "redirection ok");
 
   // priming hsts
   extension.sendMessage(`https://${testPath}/hsts.sjs`,
     ["onBeforeRequest", "onBeforeSendHeaders", "onSendHeaders",
      "onHeadersReceived", "onResponseStarted", "onCompleted"]);
   is(await extension.awaitMessage("tabs-done"),
      "https://example.org/tests/toolkit/components/extensions/test/mochitest/hsts.sjs",
      "hsts primed");
+  is(await extension.awaitMessage("onCompleted"),
+     "https://example.org/tests/toolkit/components/extensions/test/mochitest/hsts.sjs");
 
   // test upgrade
   extension.sendMessage(`http://${testPath}/hsts.sjs`,
     ["onBeforeRequest", "onBeforeRedirect", "onBeforeRequest",
      "onBeforeSendHeaders", "onSendHeaders", "onHeadersReceived",
      "onResponseStarted", "onCompleted"]);
   is(await extension.awaitMessage("tabs-done"),
      "https://example.org/tests/toolkit/components/extensions/test/mochitest/hsts.sjs",
      "hsts upgraded");
+  is(await extension.awaitMessage("onCompleted"),
+     "https://example.org/tests/toolkit/components/extensions/test/mochitest/hsts.sjs");
 
   await extension.unload();
 });
 </script>
 </head>
 <body>
 
 </body>
--- a/toolkit/components/printingui/ipc/PrintingParent.cpp
+++ b/toolkit/components/printingui/ipc/PrintingParent.cpp
@@ -132,36 +132,35 @@ PrintingParent::ShowPrintDialog(PBrowser
 
   rv = mPrintSettingsSvc->DeserializeToPrintSettings(aData, settings);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = settings->SetPrintSilent(printSilently);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsString printerName;
-  settings->GetPrinterName(getter_Copies(printerName));
+  settings->GetPrinterName(printerName);
 #ifdef MOZ_X11
   // Requesting the default printer name on Linux has been removed in the child,
   // because it was causing a sandbox violation (see Bug 1329216).
   // If no printer name is set at this point, use the print settings service
   // to get the default printer name.
   if (printerName.IsEmpty()) {
-    mPrintSettingsSvc->GetDefaultPrinterName(getter_Copies(printerName));
-    settings->SetPrinterName(printerName.get());
+    mPrintSettingsSvc->GetDefaultPrinterName(printerName);
+    settings->SetPrinterName(printerName);
   }
-  mPrintSettingsSvc->InitPrintSettingsFromPrinter(printerName.get(), settings);
+  mPrintSettingsSvc->InitPrintSettingsFromPrinter(printerName, settings);
 #endif
 
   // If this is for print preview or we are printing silently then we just need
   // to initialize the print settings with anything specific from the printer.
   if (isPrintPreview || printSilently ||
       Preferences::GetBool("print.always_print_silent", printSilently)) {
     settings->SetIsInitializedFromPrinter(false);
-    mPrintSettingsSvc->InitPrintSettingsFromPrinter(printerName.get(),
-                                                    settings);
+    mPrintSettingsSvc->InitPrintSettingsFromPrinter(printerName, settings);
   } else {
     rv = pps->ShowPrintDialog(parentWin, wbp, settings);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   if (isPrintPreview) {
     // For print preview we don't want a RemotePrintJob just the settings.
     rv = mPrintSettingsSvc->SerializeToPrintData(settings, nullptr, aResult);
--- a/toolkit/components/printingui/win/nsPrintDialogUtil.cpp
+++ b/toolkit/components/printingui/win/nsPrintDialogUtil.cpp
@@ -530,17 +530,17 @@ CreateGlobalDevModeAndInit(const nsStrin
 }
 
 //------------------------------------------------------------------
 // helper
 static void GetDefaultPrinterNameFromGlobalPrinters(nsAString &printerName)
 {
   nsCOMPtr<nsIPrinterEnumerator> prtEnum = do_GetService("@mozilla.org/gfx/printerenumerator;1");
   if (prtEnum) {
-    prtEnum->GetDefaultPrinterName(getter_Copies(printerName));
+    prtEnum->GetDefaultPrinterName(printerName);
   }
 }
 
 // Determine whether we have a completely native dialog
 // or whether we cshould extend it
 static bool ShouldExtendPrintDialog()
 {
   nsresult rv;
@@ -565,17 +565,17 @@ ShowNativePrintDialog(HWND              
 {
   //NS_ENSURE_ARG_POINTER(aHWnd);
   NS_ENSURE_ARG_POINTER(aPrintSettings);
 
   gDialogWasExtended  = false;
 
   // Get the Print Name to be used
   nsString printerName;
-  aPrintSettings->GetPrinterName(getter_Copies(printerName));
+  aPrintSettings->GetPrinterName(printerName);
 
   // If there is no name then use the default printer
   if (printerName.IsEmpty()) {
     GetDefaultPrinterNameFromGlobalPrinters(printerName);
   } else {
     HANDLE hPrinter = nullptr;
     if(!::OpenPrinterW(const_cast<wchar_t*>(static_cast<const wchar_t*>(printerName.get())),
                        &hPrinter, nullptr)) {
@@ -691,39 +691,39 @@ ShowNativePrintDialog(HWND              
     // NOTE:
     // As per Microsoft SDK documentation the returned value offset from
     // devnames->wOutputOffset is either "FILE:" or nullptr
     // if the "Print To File" checkbox is checked it MUST be "FILE:"
     // We assert as an extra safety check.
     if (prntdlg.Flags & PD_PRINTTOFILE) {
       char16ptr_t fileName = &(((wchar_t *)devnames)[devnames->wOutputOffset]);
       NS_ASSERTION(wcscmp(fileName, L"FILE:") == 0, "FileName must be `FILE:`");
-      aPrintSettings->SetToFileName(fileName);
+      aPrintSettings->SetToFileName(nsDependentString(fileName));
       aPrintSettings->SetPrintToFile(true);
     } else {
       // clear "print to file" info
       aPrintSettings->SetPrintToFile(false);
-      aPrintSettings->SetToFileName(nullptr);
+      aPrintSettings->SetToFileName(EmptyString());
     }
 
     nsCOMPtr<nsIPrintSettingsWin> psWin(do_QueryInterface(aPrintSettings));
     if (!psWin) {
       return NS_ERROR_FAILURE;
     }
 
     // Setup local Data members
-    psWin->SetDeviceName(device);
-    psWin->SetDriverName(driver);
+    psWin->SetDeviceName(nsDependentString(device));
+    psWin->SetDriverName(nsDependentString(driver));
 
 #if defined(DEBUG_rods) || defined(DEBUG_dcone)
     wprintf(L"printer: driver %s, device %s  flags: %d\n", driver, device, prntdlg.Flags);
 #endif
     // fill the print options with the info from the dialog
 
-    aPrintSettings->SetPrinterName(device);
+    aPrintSettings->SetPrinterName(nsDependentString(device));
 
     if (prntdlg.Flags & PD_SELECTION) {
       aPrintSettings->SetPrintRange(nsIPrintSettings::kRangeSelection);
 
     } else if (prntdlg.Flags & PD_PAGENUMS) {
       aPrintSettings->SetPrintRange(nsIPrintSettings::kRangeSpecifiedPageRange);
       aPrintSettings->SetStartPageRange(prntdlg.nFromPage);
       aPrintSettings->SetEndPageRange(prntdlg.nToPage);
--- a/view/nsViewManager.cpp
+++ b/view/nsViewManager.cpp
@@ -95,17 +95,17 @@ nsViewManager::~nsViewManager()
 
   if (gViewManagers->IsEmpty()) {
     // There aren't any more view managers so
     // release the global array of view managers
     delete gViewManagers;
     gViewManagers = nullptr;
   }
 
-  mPresShell = nullptr;
+  MOZ_RELEASE_ASSERT(!mPresShell, "Releasing nsViewManager without having called Destroy on the PresShell!");
 }
 
 // We don't hold a reference to the presentation context because it
 // holds a reference to us.
 nsresult
 nsViewManager::Init(nsDeviceContext* aContext)
 {
   NS_PRECONDITION(nullptr != aContext, "null ptr");
--- a/widget/android/nsDeviceContextAndroid.cpp
+++ b/widget/android/nsDeviceContextAndroid.cpp
@@ -57,17 +57,17 @@ nsDeviceContextSpecAndroid::BeginDocumen
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDeviceContextSpecAndroid::EndDocument()
 {
   nsString targetPath;
   nsCOMPtr<nsIFile> destFile;
-  mPrintSettings->GetToFileName(getter_Copies(targetPath));
+  mPrintSettings->GetToFileName(targetPath);
 
   nsresult rv = NS_NewLocalFile(targetPath, false, getter_AddRefs(destFile));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsAutoString destLeafName;
   rv = destFile->GetLeafName(destLeafName);
   NS_ENSURE_SUCCESS(rv, rv);
 
--- a/widget/android/nsPrintOptionsAndroid.cpp
+++ b/widget/android/nsPrintOptionsAndroid.cpp
@@ -7,18 +7,17 @@
 #include "nsPrintSettingsImpl.h"
 
 class nsPrintSettingsAndroid : public nsPrintSettings {
 public:
   nsPrintSettingsAndroid()
   {
     // The aim here is to set up the objects enough that silent printing works
     SetOutputFormat(nsIPrintSettings::kOutputFormatPDF);
-    SetPrinterName(u"PDF printer");
-    
+    SetPrinterName(NS_LITERAL_STRING("PDF printer"));
   }
 };
 
 nsPrintOptionsAndroid::nsPrintOptionsAndroid()
 {
 }
 
 nsPrintOptionsAndroid::~nsPrintOptionsAndroid()
--- a/widget/cocoa/nsPrintDialogX.mm
+++ b/widget/cocoa/nsPrintDialogX.mm
@@ -510,42 +510,42 @@ static const char sHeaderFooterTags[][4]
   [self addLabel:"pageFootersTitleMac" withFrame:NSMakeRect(0, 0, 151, 22)];
   [self addCenteredLabel:"left" withFrame:NSMakeRect(156, 22, 100, 22)];
   [self addCenteredLabel:"center" withFrame:NSMakeRect(256, 22, 100, 22)];
   [self addCenteredLabel:"right" withFrame:NSMakeRect(356, 22, 100, 22)];
 
   // Lists
   nsString sel;
 
-  mSettings->GetHeaderStrLeft(getter_Copies(sel));
+  mSettings->GetHeaderStrLeft(sel);
   mHeaderLeftList = [self headerFooterItemListWithFrame:NSMakeRect(156, 44, 100, 22)
                                            selectedItem:sel];
   [self addSubview:mHeaderLeftList];
 
-  mSettings->GetHeaderStrCenter(getter_Copies(sel));
+  mSettings->GetHeaderStrCenter(sel);
   mHeaderCenterList = [self headerFooterItemListWithFrame:NSMakeRect(256, 44, 100, 22)
                                              selectedItem:sel];
   [self addSubview:mHeaderCenterList];
 
-  mSettings->GetHeaderStrRight(getter_Copies(sel));
+  mSettings->GetHeaderStrRight(sel);
   mHeaderRightList = [self headerFooterItemListWithFrame:NSMakeRect(356, 44, 100, 22)
                                             selectedItem:sel];
   [self addSubview:mHeaderRightList];
 
-  mSettings->GetFooterStrLeft(getter_Copies(sel));
+  mSettings->GetFooterStrLeft(sel);
   mFooterLeftList = [self headerFooterItemListWithFrame:NSMakeRect(156, 0, 100, 22)
                                            selectedItem:sel];
   [self addSubview:mFooterLeftList];
 
-  mSettings->GetFooterStrCenter(getter_Copies(sel));
+  mSettings->GetFooterStrCenter(sel);
   mFooterCenterList = [self headerFooterItemListWithFrame:NSMakeRect(256, 0, 100, 22)
                                              selectedItem:sel];
   [self addSubview:mFooterCenterList];
 
-  mSettings->GetFooterStrRight(getter_Copies(sel));
+  mSettings->GetFooterStrRight(sel);
   mFooterRightList = [self headerFooterItemListWithFrame:NSMakeRect(356, 0, 100, 22)
                                             selectedItem:sel];
   [self addSubview:mFooterRightList];
 }
 
 // Export settings
 
 - (int16_t)chosenFrameSetting
@@ -565,32 +565,32 @@ static const char sHeaderFooterTags[][4]
   NS_ASSERTION(index < NSInteger(ArrayLength(sHeaderFooterTags)), "Index of dropdown is higher than expected!");
   return sHeaderFooterTags[index];
 }
 
 - (void)exportHeaderFooterSettings
 {
   const char* headerFooterStr;
   headerFooterStr = [self headerFooterStringForList:mHeaderLeftList];
-  mSettings->SetHeaderStrLeft(NS_ConvertUTF8toUTF16(headerFooterStr).get());
+  mSettings->SetHeaderStrLeft(NS_ConvertUTF8toUTF16(headerFooterStr));
 
   headerFooterStr = [self headerFooterStringForList:mHeaderCenterList];
-  mSettings->SetHeaderStrCenter(NS_ConvertUTF8toUTF16(headerFooterStr).get());
+  mSettings->SetHeaderStrCenter(NS_ConvertUTF8toUTF16(headerFooterStr));
 
   headerFooterStr = [self headerFooterStringForList:mHeaderRightList];
-  mSettings->SetHeaderStrRight(NS_ConvertUTF8toUTF16(headerFooterStr).get());
+  mSettings->SetHeaderStrRight(NS_ConvertUTF8toUTF16(headerFooterStr));
 
   headerFooterStr = [self headerFooterStringForList:mFooterLeftList];
-  mSettings->SetFooterStrLeft(NS_ConvertUTF8toUTF16(headerFooterStr).get());
+  mSettings->SetFooterStrLeft(NS_ConvertUTF8toUTF16(headerFooterStr));
 
   headerFooterStr = [self headerFooterStringForList:mFooterCenterList];
-  mSettings->SetFooterStrCenter(NS_ConvertUTF8toUTF16(headerFooterStr).get());
+  mSettings->SetFooterStrCenter(NS_ConvertUTF8toUTF16(headerFooterStr));
 
   headerFooterStr = [self headerFooterStringForList:mFooterRightList];
-  mSettings->SetFooterStrRight(NS_ConvertUTF8toUTF16(headerFooterStr).get());
+  mSettings->SetFooterStrRight(NS_ConvertUTF8toUTF16(headerFooterStr));
 }
 
 // Summary
 
 - (NSString*)summaryValueForCheckbox:(NSButton*)aCheckbox
 {
   if (![aCheckbox isEnabled])
     return [self localizedString:"summaryNAValue"];
--- a/widget/cocoa/nsPrintSettingsX.h
+++ b/widget/cocoa/nsPrintSettingsX.h
@@ -63,17 +63,17 @@ public:
   nsresult InitAdjustedPaperSize();
 
   void SetInchesScale(float aWidthScale, float aHeightScale);
   void GetInchesScale(float *aWidthScale, float *aHeightScale);
 
   NS_IMETHOD SetScaling(double aScaling) override;
   NS_IMETHOD GetScaling(double *aScaling) override;
 
-  NS_IMETHOD SetToFileName(const char16_t * aToFileName) override;
+  NS_IMETHOD SetToFileName(const nsAString& aToFileName) override;
 
   NS_IMETHOD GetOrientation(int32_t *aOrientation) override;
   NS_IMETHOD SetOrientation(int32_t aOrientation) override;
 
   NS_IMETHOD SetUnwriteableMarginTop(double aUnwriteableMarginTop) override;
   NS_IMETHOD SetUnwriteableMarginLeft(double aUnwriteableMarginLeft) override;
   NS_IMETHOD SetUnwriteableMarginBottom(double aUnwriteableMarginBottom) override;
   NS_IMETHOD SetUnwriteableMarginRight(double aUnwriteableMarginRight) override;
--- a/widget/cocoa/nsPrintSettingsX.mm
+++ b/widget/cocoa/nsPrintSettingsX.mm
@@ -323,33 +323,32 @@ nsPrintSettingsX::GetScaling(double *aSc
   *aScaling = round(*aScaling * 100.0) / 100.0;
 
   return NS_OK;
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
 }
 
 NS_IMETHODIMP
-nsPrintSettingsX::SetToFileName(const char16_t *aToFileName)
+nsPrintSettingsX::SetToFileName(const nsAString& aToFileName)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
 
   if (XRE_IsContentProcess() &&
       Preferences::GetBool("print.print_via_parent")) {
     // On content sandbox, NSPrintJobSavingURL will returns error since
     // sandbox disallows file access.
     return nsPrintSettings::SetToFileName(aToFileName);
   }
 
   NSMutableDictionary* printInfoDict = [mPrintInfo dictionary];
 
-  if (aToFileName && aToFileName[0]) {
+  if (!aToFileName.IsEmpty()) {
     NSURL* jobSavingURL =
-        [NSURL fileURLWithPath: nsCocoaUtils::ToNSString(
-                                  nsDependentString(aToFileName))];
+        [NSURL fileURLWithPath: nsCocoaUtils::ToNSString(aToFileName)];
     if (jobSavingURL) {
       [printInfoDict setObject: NSPrintSaveJob forKey: NSPrintJobDisposition];
       [printInfoDict setObject: jobSavingURL forKey: NSPrintJobSavingURL];
     }
     mToFileName = aToFileName;
   } else {
     mToFileName.Truncate();
   }
--- a/widget/gtk/nsDeviceContextSpecG.cpp
+++ b/widget/gtk/nsDeviceContextSpecG.cpp
@@ -58,17 +58,17 @@ public:
 
   void      FreeGlobalPrinters();
   nsresult  InitializeGlobalPrinters();
 
   bool      PrintersAreAllocated()       { return mGlobalPrinterList != nullptr; }
   uint32_t  GetNumPrinters()
     { return mGlobalPrinterList ? mGlobalPrinterList->Length() : 0; }
   nsString* GetStringAt(int32_t aInx)    { return &mGlobalPrinterList->ElementAt(aInx); }
-  void      GetDefaultPrinterName(char16_t **aDefaultPrinterName);
+  void      GetDefaultPrinterName(nsAString& aDefaultPrinterName);
 
 protected:
   GlobalPrinters() {}
 
   static GlobalPrinters mGlobalPrinters;
   static nsTArray<nsString>* mGlobalPrinterList;
 };
 
@@ -241,17 +241,17 @@ ns_release_macro(gpointer aData) {
 /* static */
 gboolean nsDeviceContextSpecGTK::PrinterEnumerator(GtkPrinter *aPrinter,
                                                    gpointer aData) {
   nsDeviceContextSpecGTK *spec = (nsDeviceContextSpecGTK*)aData;
 
   // Find the printer whose name matches the one inside the settings.
   nsString printerName;
   nsresult rv =
-    spec->mPrintSettings->GetPrinterName(getter_Copies(printerName));
+    spec->mPrintSettings->GetPrinterName(printerName);
   if (NS_SUCCEEDED(rv) && !printerName.IsVoid()) {
     NS_ConvertUTF16toUTF8 requestedName(printerName);
     const char* currentName = gtk_printer_get_name(aPrinter);
     if (requestedName.Equals(currentName)) {
       spec->mPrintSettings->SetGtkPrinter(aPrinter);
 
       // Bug 1145916 - attempting to kick off a print job for this printer
       // during this tick of the event loop will result in the printer backend
@@ -323,17 +323,17 @@ NS_IMETHODIMP nsDeviceContextSpecGTK::En
         NewRunnableMethod("nsDeviceContextSpecGTK::EnumeratePrinters",
                           this,
                           &nsDeviceContextSpecGTK::EnumeratePrinters));
     }
   } else {
     // Handle print-to-file ourselves for the benefit of embedders
     nsString targetPath;
     nsCOMPtr<nsIFile> destFile;
-    mPrintSettings->GetToFileName(getter_Copies(targetPath));
+    mPrintSettings->GetToFileName(targetPath);
 
     nsresult rv = NS_NewLocalFile(targetPath, false, getter_AddRefs(destFile));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoString destLeafName;
     rv = destFile->GetLeafName(destLeafName);
     NS_ENSURE_SUCCESS(rv, rv);
 
@@ -383,28 +383,29 @@ NS_IMETHODIMP nsPrinterEnumeratorGTK::Ge
   {
     printers->AppendElement(*GlobalPrinters::GetInstance()->GetStringAt(count++));
   }
   GlobalPrinters::GetInstance()->FreeGlobalPrinters();
 
   return NS_NewAdoptingStringEnumerator(aPrinterNameList, printers);
 }
 
-NS_IMETHODIMP nsPrinterEnumeratorGTK::GetDefaultPrinterName(char16_t **aDefaultPrinterName)
+NS_IMETHODIMP nsPrinterEnumeratorGTK::GetDefaultPrinterName(nsAString& aDefaultPrinterName)
 {
   DO_PR_DEBUG_LOG(("nsPrinterEnumeratorGTK::GetDefaultPrinterName()\n"));
-  NS_ENSURE_ARG_POINTER(aDefaultPrinterName);
 
   GlobalPrinters::GetInstance()->GetDefaultPrinterName(aDefaultPrinterName);
 
-  DO_PR_DEBUG_LOG(("GetDefaultPrinterName(): default printer='%s'.\n", NS_ConvertUTF16toUTF8(*aDefaultPrinterName).get()));
+  DO_PR_DEBUG_LOG(("GetDefaultPrinterName(): default printer='%s'.\n", NS_ConvertUTF16toUTF8(aDefaultPrinterName).get()));
   return NS_OK;
 }
 
-NS_IMETHODIMP nsPrinterEnumeratorGTK::InitPrintSettingsFromPrinter(const char16_t *aPrinterName, nsIPrintSettings *aPrintSettings)
+NS_IMETHODIMP
+nsPrinterEnumeratorGTK::InitPrintSettingsFromPrinter(const nsAString& aPrinterName,
+                                                     nsIPrintSettings *aPrintSettings)
 {
   DO_PR_DEBUG_LOG(("nsPrinterEnumeratorGTK::InitPrintSettingsFromPrinter()"));
 
   NS_ENSURE_ARG_POINTER(aPrintSettings);
 
   /* Set filename */
   nsAutoCString filename;
   const char *path;
@@ -413,17 +414,17 @@ NS_IMETHODIMP nsPrinterEnumeratorGTK::In
     path = PR_GetEnv("HOME");
   
   if (path)
     filename = nsPrintfCString("%s/mozilla.pdf", path);
   else
     filename.AssignLiteral("mozilla.pdf");
 
   DO_PR_DEBUG_LOG(("Setting default filename to '%s'\n", filename.get()));
-  aPrintSettings->SetToFileName(NS_ConvertUTF8toUTF16(filename).get());
+  aPrintSettings->SetToFileName(NS_ConvertUTF8toUTF16(filename));
 
   aPrintSettings->SetIsInitializedFromPrinter(true);
 
   return NS_OK;    
 }
 
 //----------------------------------------------------------------------
 nsresult GlobalPrinters::InitializeGlobalPrinters ()
@@ -465,32 +466,32 @@ void GlobalPrinters::FreeGlobalPrinters(
 {
   if (mGlobalPrinterList) {
     delete mGlobalPrinterList;
     mGlobalPrinterList = nullptr;
   }  
 }
 
 void 
-GlobalPrinters::GetDefaultPrinterName(char16_t **aDefaultPrinterName)
+GlobalPrinters::GetDefaultPrinterName(nsAString& aDefaultPrinterName)
 {
-  *aDefaultPrinterName = nullptr;
+  aDefaultPrinterName.Truncate();
   
   bool allocate = !GlobalPrinters::GetInstance()->PrintersAreAllocated();
   
   if (allocate) {
     nsresult rv = GlobalPrinters::GetInstance()->InitializeGlobalPrinters();
     if (NS_FAILED(rv)) {
       return;
     }
   }
   NS_ASSERTION(GlobalPrinters::GetInstance()->PrintersAreAllocated(), "no GlobalPrinters");
 
   if (GlobalPrinters::GetInstance()->GetNumPrinters() == 0)
     return;
   
-  *aDefaultPrinterName = ToNewUnicode(*GlobalPrinters::GetInstance()->GetStringAt(0));
+  aDefaultPrinterName = *GlobalPrinters::GetInstance()->GetStringAt(0);
 
   if (allocate) {  
     GlobalPrinters::GetInstance()->FreeGlobalPrinters();
   }  
 }
 
--- a/widget/gtk/nsPrintDialogGTK.cpp
+++ b/widget/gtk/nsPrintDialogGTK.cpp
@@ -272,38 +272,38 @@ nsPrintDialogWidgetGTK::nsPrintDialogWid
   GtkWidget* header_footer_container = gtk_alignment_new(0, 0, 0, 0);
   gtk_alignment_set_padding(GTK_ALIGNMENT(header_footer_container), 8, 0, 12, 0);
 
 
   // --- Table for making the header and footer options ---
   GtkWidget* header_footer_table = gtk_table_new(3, 3, FALSE); // 3x3 table
   nsString header_footer_str[3];
 
-  aSettings->GetHeaderStrLeft(getter_Copies(header_footer_str[0]));
-  aSettings->GetHeaderStrCenter(getter_Copies(header_footer_str[1]));
-  aSettings->GetHeaderStrRight(getter_Copies(header_footer_str[2]));
+  aSettings->GetHeaderStrLeft(header_footer_str[0]);
+  aSettings->GetHeaderStrCenter(header_footer_str[1]);
+  aSettings->GetHeaderStrRight(header_footer_str[2]);
 
   for (unsigned int i = 0; i < ArrayLength(header_dropdown); i++) {
     header_dropdown[i] = ConstructHeaderFooterDropdown(header_footer_str[i].get());
     // Those 4 magic numbers in the middle provide the position in the table.
     // The last two numbers mean 2 px padding on every side.
     gtk_table_attach(GTK_TABLE(header_footer_table), header_dropdown[i], i, (i + 1),
                      0, 1, (GtkAttachOptions) 0, (GtkAttachOptions) 0, 2, 2);
   }
 
   const char labelKeys[][7] = {"left", "center", "right"};
   for (unsigned int i = 0; i < ArrayLength(labelKeys); i++) {
     gtk_table_attach(GTK_TABLE(header_footer_table),
                      gtk_label_new(GetUTF8FromBundle(labelKeys[i]).get()),
                      i, (i + 1), 1, 2, (GtkAttachOptions) 0, (GtkAttachOptions) 0, 2, 2);
   }
 
-  aSettings->GetFooterStrLeft(getter_Copies(header_footer_str[0]));
-  aSettings->GetFooterStrCenter(getter_Copies(header_footer_str[1]));
-  aSettings->GetFooterStrRight(getter_Copies(header_footer_str[2]));
+  aSettings->GetFooterStrLeft(header_footer_str[0]);
+  aSettings->GetFooterStrCenter(header_footer_str[1]);
+  aSettings->GetFooterStrRight(header_footer_str[2]);
 
   for (unsigned int i = 0; i < ArrayLength(footer_dropdown); i++) {
     footer_dropdown[i] = ConstructHeaderFooterDropdown(header_footer_str[i].get());
     gtk_table_attach(GTK_TABLE(header_footer_table), footer_dropdown[i], i, (i + 1),
                      2, 3, (GtkAttachOptions) 0, (GtkAttachOptions) 0, 2, 2);
   }
   // ---
 
@@ -366,32 +366,32 @@ nsPrintDialogWidgetGTK::ExportFramePrint
     aNS->SetPrintFrameType(nsIPrintSettings::kNoFrames);
 }
 
 void
 nsPrintDialogWidgetGTK::ExportHeaderFooter(nsIPrintSettings *aNS)
 {
   const char* header_footer_str;
   header_footer_str = OptionWidgetToString(header_dropdown[0]);
-  aNS->SetHeaderStrLeft(NS_ConvertUTF8toUTF16(header_footer_str).get());
+  aNS->SetHeaderStrLeft(NS_ConvertUTF8toUTF16(header_footer_str));
 
   header_footer_str = OptionWidgetToString(header_dropdown[1]);
-  aNS->SetHeaderStrCenter(NS_ConvertUTF8toUTF16(header_footer_str).get());
+  aNS->SetHeaderStrCenter(NS_ConvertUTF8toUTF16(header_footer_str));
 
   header_footer_str = OptionWidgetToString(header_dropdown[2]);
-  aNS->SetHeaderStrRight(NS_ConvertUTF8toUTF16(header_footer_str).get());
+  aNS->SetHeaderStrRight(NS_ConvertUTF8toUTF16(header_footer_str));
 
   header_footer_str = OptionWidgetToString(footer_dropdown[0]);
-  aNS->SetFooterStrLeft(NS_ConvertUTF8toUTF16(header_footer_str).get());
+  aNS->SetFooterStrLeft(NS_ConvertUTF8toUTF16(header_footer_str));
 
   header_footer_str = OptionWidgetToString(footer_dropdown[1]);
-  aNS->SetFooterStrCenter(NS_ConvertUTF8toUTF16(header_footer_str).get());
+  aNS->SetFooterStrCenter(NS_ConvertUTF8toUTF16(header_footer_str));
 
   header_footer_str = OptionWidgetToString(footer_dropdown[2]);
-  aNS->SetFooterStrRight(NS_ConvertUTF8toUTF16(header_footer_str).get());
+  aNS->SetFooterStrRight(NS_ConvertUTF8toUTF16(header_footer_str));
 }
 
 nsresult
 nsPrintDialogWidgetGTK::ImportSettings(nsIPrintSettings *aNSSettings)
 {
   NS_PRECONDITION(aNSSettings, "aSettings must not be null");
   NS_ENSURE_TRUE(aNSSettings, NS_ERROR_FAILURE);
 
@@ -578,20 +578,20 @@ nsPrintDialogServiceGTK::ShowPageSetup(n
   nsCOMPtr<nsPrintSettingsGTK> aNSSettingsGTK(do_QueryInterface(aNSSettings));
   if (!aNSSettingsGTK)
     return NS_ERROR_FAILURE;
 
   // We need to init the prefs here because aNSSettings in its current form is a dummy in both uses of the word
   nsCOMPtr<nsIPrintSettingsService> psService = do_GetService("@mozilla.org/gfx/printsettings-service;1");
   if (psService) {
     nsString printName;
-    aNSSettings->GetPrinterName(getter_Copies(printName));
+    aNSSettings->GetPrinterName(printName);
     if (printName.IsVoid()) {
-      psService->GetDefaultPrinterName(getter_Copies(printName));
-      aNSSettings->SetPrinterName(printName.get());
+      psService->GetDefaultPrinterName(printName);
+      aNSSettings->SetPrinterName(printName);
     }
     psService->InitPrintSettingsFromPrefs(aNSSettings, true, nsIPrintSettings::kInitSaveAll);
   }
 
   GtkPrintSettings* gtkSettings = aNSSettingsGTK->GetGtkPrintSettings();
   GtkPageSetup* oldPageSetup = aNSSettingsGTK->GetGtkPageSetup();
 
   GtkPageSetup* newPageSetup = gtk_print_run_page_setup_dialog(gtkParent, oldPageSetup, gtkSettings);
--- a/widget/gtk/nsPrintSettingsGTK.cpp
+++ b/widget/gtk/nsPrintSettingsGTK.cpp
@@ -404,93 +404,86 @@ nsPrintSettingsGTK::SetOrientation(int32
     gtkOrient = GTK_PAGE_ORIENTATION_PORTRAIT;
 
   gtk_print_settings_set_orientation(mPrintSettings, gtkOrient);
   gtk_page_setup_set_orientation(mPageSetup, gtkOrient);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPrintSettingsGTK::GetToFileName(char16_t * *aToFileName)
+nsPrintSettingsGTK::GetToFileName(nsAString& aToFileName)
 {
   // Get the gtk output filename
   const char* gtk_output_uri = gtk_print_settings_get(mPrintSettings, GTK_PRINT_SETTINGS_OUTPUT_URI);
   if (!gtk_output_uri) {
-    *aToFileName = ToNewUnicode(mToFileName);
+    aToFileName = mToFileName;
     return NS_OK;
   }
 
   // Convert to an nsIFile
   nsCOMPtr<nsIFile> file;
   nsresult rv = NS_GetFileFromURLSpec(nsDependentCString(gtk_output_uri),
                                       getter_AddRefs(file));
   if (NS_FAILED(rv))
     return rv;
 
   // Extract the path
-  nsAutoString path;
-  rv = file->GetPath(path);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  *aToFileName = ToNewUnicode(path);
-  return NS_OK;
+  return file->GetPath(aToFileName);
 }
 
 NS_IMETHODIMP
-nsPrintSettingsGTK::SetToFileName(const char16_t * aToFileName)
+nsPrintSettingsGTK::SetToFileName(const nsAString& aToFileName)
 {
-  if (aToFileName[0] == 0) {
+  if (aToFileName.IsEmpty()) {
     mToFileName.SetLength(0);
     gtk_print_settings_set(mPrintSettings, GTK_PRINT_SETTINGS_OUTPUT_URI,
                            nullptr);
     return NS_OK;
   }
 
-  if (StringEndsWith(nsDependentString(aToFileName), NS_LITERAL_STRING(".ps"))) {
+  if (StringEndsWith(aToFileName, NS_LITERAL_STRING(".ps"))) {
     gtk_print_settings_set(mPrintSettings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT, "ps");
   } else {
     gtk_print_settings_set(mPrintSettings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT, "pdf");
   }
 
   nsCOMPtr<nsIFile> file;
-  nsresult rv = NS_NewLocalFile(nsDependentString(aToFileName), true,
-                                getter_AddRefs(file));
+  nsresult rv = NS_NewLocalFile(aToFileName, true, getter_AddRefs(file));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Convert the nsIFile to a URL
   nsAutoCString url;
   rv = NS_GetURLSpecFromFile(file, url);
   NS_ENSURE_SUCCESS(rv, rv);
 
   gtk_print_settings_set(mPrintSettings, GTK_PRINT_SETTINGS_OUTPUT_URI, url.get());
   mToFileName = aToFileName;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPrintSettingsGTK::GetPrinterName(char16_t * *aPrinter)
+nsPrintSettingsGTK::GetPrinterName(nsAString& aPrinter)
 {
   const char* gtkPrintName = gtk_print_settings_get_printer(mPrintSettings);
   if (!gtkPrintName) {
     if (GTK_IS_PRINTER(mGTKPrinter)) {
       gtkPrintName = gtk_printer_get_name(mGTKPrinter);
     } else {
       // This mimics what nsPrintSettingsImpl does when we try to Get before we Set
-      nsString nullPrintName;
-      *aPrinter = ToNewUnicode(nullPrintName);
+      aPrinter.Truncate();
       return NS_OK;
     }
   }
-  *aPrinter = UTF8ToNewUnicode(nsDependentCString(gtkPrintName));
+  aPrinter = NS_ConvertUTF8toUTF16(gtkPrintName);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPrintSettingsGTK::SetPrinterName(const char16_t * aPrinter)
+nsPrintSettingsGTK::SetPrinterName(const nsAString& aPrinter)
 {
   NS_ConvertUTF16toUTF8 gtkPrinter(aPrinter);
 
   if (StringBeginsWith(gtkPrinter, NS_LITERAL_CSTRING("CUPS/"))) {
     // Strip off "CUPS/"; GTK might recognize the rest
     gtkPrinter.Cut(0, strlen("CUPS/"));
   }
 
@@ -532,26 +525,25 @@ nsPrintSettingsGTK::GetScaling(double *a
 NS_IMETHODIMP
 nsPrintSettingsGTK::SetScaling(double aScaling)
 {
   gtk_print_settings_set_scale(mPrintSettings, aScaling * 100.0);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPrintSettingsGTK::GetPaperName(char16_t * *aPaperName)
+nsPrintSettingsGTK::GetPaperName(nsAString& aPaperName)
 {
-  NS_ENSURE_ARG_POINTER(aPaperName);
   const gchar* name =
     gtk_paper_size_get_name(gtk_page_setup_get_paper_size(mPageSetup));
-  *aPaperName = ToNewUnicode(NS_ConvertUTF8toUTF16(name));
+  aPaperName = NS_ConvertUTF8toUTF16(name);
   return NS_OK;
 }
 NS_IMETHODIMP
-nsPrintSettingsGTK::SetPaperName(const char16_t * aPaperName)
+nsPrintSettingsGTK::SetPaperName(const nsAString& aPaperName)
 {
   NS_ConvertUTF16toUTF8 gtkPaperName(aPaperName);
 
   // Convert these Gecko names to GTK names
   if (gtkPaperName.EqualsIgnoreCase("letter"))
     gtkPaperName.AssignLiteral(GTK_PAPER_NAME_LETTER);
   else if (gtkPaperName.EqualsIgnoreCase("legal"))
     gtkPaperName.AssignLiteral(GTK_PAPER_NAME_LEGAL);
--- a/widget/gtk/nsPrintSettingsGTK.h
+++ b/widget/gtk/nsPrintSettingsGTK.h
@@ -63,34 +63,34 @@ public:
   NS_IMETHOD SetPrintReversed(bool aPrintReversed) override;
 
   NS_IMETHOD GetPrintInColor(bool *aPrintInColor) override;
   NS_IMETHOD SetPrintInColor(bool aPrintInColor) override;
 
   NS_IMETHOD GetOrientation(int32_t *aOrientation) override;
   NS_IMETHOD SetOrientation(int32_t aOrientation) override;
 
-  NS_IMETHOD GetToFileName(char16_t * *aToFileName) override;
-  NS_IMETHOD SetToFileName(const char16_t * aToFileName) override;
+  NS_IMETHOD GetToFileName(nsAString& aToFileName) override;
+  NS_IMETHOD SetToFileName(const nsAString& aToFileName) override;
 
   // Gets/Sets the printer name in the GtkPrintSettings. If no printer name is specified there,
   // you will get back the name of the current internal GtkPrinter.
-  NS_IMETHOD GetPrinterName(char16_t * *aPrinter) override;
-  NS_IMETHOD SetPrinterName(const char16_t * aPrinter) override;
+  NS_IMETHOD GetPrinterName(nsAString& Printer) override;
+  NS_IMETHOD SetPrinterName(const nsAString& aPrinter) override;
 
   // Number of copies is stored/gotten from the GtkPrintSettings.
   NS_IMETHOD GetNumCopies(int32_t *aNumCopies) override;
   NS_IMETHOD SetNumCopies(int32_t aNumCopies) override;
 
   NS_IMETHOD GetScaling(double *aScaling) override;
   NS_IMETHOD SetScaling(double aScaling) override;
 
   // A name recognised by GTK is strongly advised here, as this is used to create a GtkPaperSize.
-  NS_IMETHOD GetPaperName(char16_t * *aPaperName) override;
-  NS_IMETHOD SetPaperName(const char16_t * aPaperName) override;
+  NS_IMETHOD GetPaperName(nsAString& aPaperName) override;
+  NS_IMETHOD SetPaperName(const nsAString& aPaperName) override;
 
   NS_IMETHOD SetUnwriteableMarginInTwips(nsIntMargin& aUnwriteableMargin) override;
   NS_IMETHOD SetUnwriteableMarginTop(double aUnwriteableMarginTop) override;
   NS_IMETHOD SetUnwriteableMarginLeft(double aUnwriteableMarginLeft) override;
   NS_IMETHOD SetUnwriteableMarginBottom(double aUnwriteableMarginBottom) override;
   NS_IMETHOD SetUnwriteableMarginRight(double aUnwriteableMarginRight) override;
 
   NS_IMETHOD GetPaperWidth(double *aPaperWidth) override;
--- a/widget/nsIPrintSettings.idl
+++ b/widget/nsIPrintSettings.idl
@@ -197,51 +197,51 @@ interface nsIPrintSettings : nsISupports
   attribute double  unwriteableMarginRight;
 
   attribute double  scaling;      /* values 0.0 - 1.0 */
   attribute boolean printBGColors; /* Print Background Colors */
   attribute boolean printBGImages; /* Print Background Images */
 
   attribute short   printRange; 
 
-  attribute wstring title;
-  attribute wstring docURL;
+  attribute AString title;
+  attribute AString docURL;
 
-  attribute wstring headerStrLeft;
-  attribute wstring headerStrCenter;
-  attribute wstring headerStrRight;
+  attribute AString headerStrLeft;
+  attribute AString headerStrCenter;
+  attribute AString headerStrRight;
 
-  attribute wstring footerStrLeft;
-  attribute wstring footerStrCenter;
-  attribute wstring footerStrRight;
+  attribute AString footerStrLeft;
+  attribute AString footerStrCenter;
+  attribute AString footerStrRight;
 
   attribute short   howToEnableFrameUI;  /* indicates how to enable the frameset UI            */
   attribute boolean isCancelled;         /* indicates whether the print job has been cancelled */
   attribute short   printFrameTypeUsage; /* indicates whether to use the interal value or not  */
   attribute short   printFrameType;
   attribute boolean printSilent;	     /* print without putting up the dialog */
   attribute boolean shrinkToFit;	     /* shrinks content to fit on page      */
   attribute boolean showPrintProgress;   /* indicates whether the progress dialog should be shown */
 
   /* Additional XP Related */
-  attribute wstring paperName;     /* name of paper */
+  attribute AString paperName;     /* name of paper */
   attribute short   paperData;     /* native data value */
   attribute double  paperWidth;    /* width of the paper in inches or mm */
   attribute double  paperHeight;   /* height of the paper in inches or mm */
   attribute short   paperSizeUnit; /* paper is in inches or mm */
 
   attribute boolean printReversed;
   attribute boolean printInColor;  /* a false means grayscale */
   attribute long    orientation;   /*  see orientation consts */
   attribute long    numCopies;
 
-  attribute wstring printerName;   /* name of destination printer */
+  attribute AString printerName;   /* name of destination printer */
 
   attribute boolean printToFile;
-  attribute wstring toFileName;
+  attribute AString toFileName;
   attribute short   outputFormat;
 
   attribute long    printPageDelay; /* in milliseconds */
 
   attribute long    resolution;     /* print resolution (dpi) */
 
   attribute long    duplex;         /* duplex mode */
 
--- a/widget/nsIPrintSettingsService.idl
+++ b/widget/nsIPrintSettingsService.idl
@@ -53,27 +53,28 @@ interface nsIPrintSettingsService : nsIS
    * (Note: this may not happen if there is an OS specific implementation.)
    *
    */
   readonly attribute nsIPrintSettings newPrintSettings;
 
   /**
    * The name of the last printer used, or else the system default printer.
    */
-  readonly attribute wstring defaultPrinterName;
+  readonly attribute AString defaultPrinterName;
 
   /**
    * Initializes certain settings from the native printer into the PrintSettings
    * if aPrinterName is null then it uses the default printer name if it can
    * These settings include, but are not limited to:
    *   Page Orientation
    *   Page Size
    *   Number of Copies
    */
-  void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings);
+  void initPrintSettingsFromPrinter(in AString aPrinterName,
+                                    in nsIPrintSettings aPrintSettings);
 
   /**
    * Reads PrintSettings values from Prefs,
    * the values to be read are indicated by the "flags" arg.
    *
    * aPrintSettings should be initialized with the name of a printer. First
    * it reads in the PrintSettings from the last print job. Then it uses the
    * PrinterName in the PrinterSettings to read any settings that were saved
--- a/widget/nsIPrintSettingsWin.idl
+++ b/widget/nsIPrintSettingsWin.idl
@@ -30,18 +30,18 @@ interface nsIPrintSettingsWin : nsISuppo
    * you own the memory.
    *
    * The following three pieces of data are needed
    * to create a DC for printing. These are typcially 
    * gotten via the PrintDLG call ro can be obtained
    * via the "m_pd" data member of the CPrintDialog
    * in MFC.
    */
-  [noscript] attribute wstring deviceName;
-  [noscript] attribute wstring driverName;
+  [noscript] attribute AString deviceName;
+  [noscript] attribute AString driverName;
 
   [noscript] attribute nsDevMode devMode;
 
   /**
    * On Windows we use the printable width and height for the printing surface.
    * We don't want to have to create native print device contexts in the content
    * process, so we need to store these in the settings.
    * Storing in Inches is most convenient as they are retrieved from the device
--- a/widget/nsIPrinterEnumerator.idl
+++ b/widget/nsIPrinterEnumerator.idl
@@ -13,25 +13,26 @@ interface nsIStringEnumerator;
 interface nsIPrinterEnumerator : nsISupports
 {
   /**
    * The name of the system default printer. This name should also be
    * present in printerNameList below. This is not necessarily gecko's
    * default printer; see nsIPrintSettingsService.defaultPrinterName
    * for that.
    */
-  readonly attribute wstring defaultPrinterName;
+  readonly attribute AString defaultPrinterName;
 
   /**
    * Initializes certain settings from the native printer into the PrintSettings
    * These settings include, but are not limited to:
    *   Page Orientation
    *   Page Size
    *   Number of Copies
    */
-  void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings);
+  void initPrintSettingsFromPrinter(in AString aPrinterName,
+                                    in nsIPrintSettings aPrintSettings);
 
   /**
    * The list of printer names
    */
   readonly attribute nsIStringEnumerator printerNameList;
 };
 
--- a/widget/nsPrintOptionsImpl.cpp
+++ b/widget/nsPrintOptionsImpl.cpp
@@ -133,83 +133,52 @@ nsPrintOptions::SerializeToPrintData(nsI
   aSettings->GetUnwriteableMarginRight(&data->unwriteableMarginRight());
 
   aSettings->GetScaling(&data->scaling());
 
   aSettings->GetPrintBGColors(&data->printBGColors());
   aSettings->GetPrintBGImages(&data->printBGImages());
   aSettings->GetPrintRange(&data->printRange());
 
-  // I have no idea if I'm doing this string copying correctly...
-  nsString title;
-  aSettings->GetTitle(getter_Copies(title));
-  data->title() = title;
-
-  nsString docURL;
-  aSettings->GetDocURL(getter_Copies(docURL));
-  data->docURL() = docURL;
-
-  // Header strings...
-  nsString headerStrLeft;
-  aSettings->GetHeaderStrLeft(getter_Copies(headerStrLeft));
-  data->headerStrLeft() = headerStrLeft;
+  aSettings->GetTitle(data->title());
+  aSettings->GetDocURL(data->docURL());
 
-  nsString headerStrCenter;
-  aSettings->GetHeaderStrCenter(getter_Copies(headerStrCenter));
-  data->headerStrCenter() = headerStrCenter;
-
-  nsString headerStrRight;
-  aSettings->GetHeaderStrRight(getter_Copies(headerStrRight));
-  data->headerStrRight() = headerStrRight;
+  aSettings->GetHeaderStrLeft(data->headerStrLeft());
+  aSettings->GetHeaderStrCenter(data->headerStrCenter());
+  aSettings->GetHeaderStrRight(data->headerStrRight());
 
-  // Footer strings...
-  nsString footerStrLeft;
-  aSettings->GetFooterStrLeft(getter_Copies(footerStrLeft));
-  data->footerStrLeft() = footerStrLeft;
-
-  nsString footerStrCenter;
-  aSettings->GetFooterStrCenter(getter_Copies(footerStrCenter));
-  data->footerStrCenter() = footerStrCenter;
-
-  nsString footerStrRight;
-  aSettings->GetFooterStrRight(getter_Copies(footerStrRight));
-  data->footerStrRight() = footerStrRight;
+  aSettings->GetFooterStrLeft(data->footerStrLeft());
+  aSettings->GetFooterStrCenter(data->footerStrCenter());
+  aSettings->GetFooterStrRight(data->footerStrRight());
 
   aSettings->GetHowToEnableFrameUI(&data->howToEnableFrameUI());
   aSettings->GetIsCancelled(&data->isCancelled());
   aSettings->GetPrintFrameTypeUsage(&data->printFrameTypeUsage());
   aSettings->GetPrintFrameType(&data->printFrameType());
   aSettings->GetPrintSilent(&data->printSilent());
   aSettings->GetShrinkToFit(&data->shrinkToFit());
   aSettings->GetShowPrintProgress(&data->showPrintProgress());
 
-  nsString paperName;
-  aSettings->GetPaperName(getter_Copies(paperName));
-  data->paperName() = paperName;
-
+  aSettings->GetPaperName(data->paperName());
   aSettings->GetPaperData(&data->paperData());
   aSettings->GetPaperWidth(&data->paperWidth());
   aSettings->GetPaperHeight(&data->paperHeight());
   aSettings->GetPaperSizeUnit(&data->paperSizeUnit());
 
   aSettings->GetPrintReversed(&data->printReversed());
   aSettings->GetPrintInColor(&data->printInColor());
   aSettings->GetOrientation(&data->orientation());
 
   aSettings->GetNumCopies(&data->numCopies());
 
-  nsString printerName;
-  aSettings->GetPrinterName(getter_Copies(printerName));
-  data->printerName() = printerName;
+  aSettings->GetPrinterName(data->printerName());
 
   aSettings->GetPrintToFile(&data->printToFile());
 
-  nsString toFileName;
-  aSettings->GetToFileName(getter_Copies(toFileName));
-  data->toFileName() = toFileName;
+  aSettings->GetToFileName(data->toFileName());
 
   aSettings->GetOutputFormat(&data->outputFormat());
   aSettings->GetPrintPageDelay(&data->printPageDelay());
   aSettings->GetResolution(&data->resolution());
   aSettings->GetDuplex(&data->duplex());
   aSettings->GetIsInitializedFromPrinter(&data->isInitializedFromPrinter());
   aSettings->GetIsInitializedFromPrefs(&data->isInitializedFromPrefs());
 
@@ -271,56 +240,55 @@ nsPrintOptions::DeserializeToPrintSettin
   settings->SetUnwriteableMarginRight(data.unwriteableMarginRight());
 
   settings->SetScaling(data.scaling());
 
   settings->SetPrintBGColors(data.printBGColors());
   settings->SetPrintBGImages(data.printBGImages());
   settings->SetPrintRange(data.printRange());
 
-  // I have no idea if I'm doing this string copying correctly...
-  settings->SetTitle(data.title().get());
-  settings->SetDocURL(data.docURL().get());
+  settings->SetTitle(data.title());
+  settings->SetDocURL(data.docURL());
 
   // Header strings...
-  settings->SetHeaderStrLeft(data.headerStrLeft().get());
-  settings->SetHeaderStrCenter(data.headerStrCenter().get());
-  settings->SetHeaderStrRight(data.headerStrRight().get());
+  settings->SetHeaderStrLeft(data.headerStrLeft());
+  settings->SetHeaderStrCenter(data.headerStrCenter());
+  settings->SetHeaderStrRight(data.headerStrRight());
 
   // Footer strings...
-  settings->SetFooterStrLeft(data.footerStrLeft().get());
-  settings->SetFooterStrCenter(data.footerStrCenter().get());
-  settings->SetFooterStrRight(data.footerStrRight().get());
+  settings->SetFooterStrLeft(data.footerStrLeft());
+  settings->SetFooterStrCenter(data.footerStrCenter());
+  settings->SetFooterStrRight(data.footerStrRight());
 
   settings->SetHowToEnableFrameUI(data.howToEnableFrameUI());
   settings->SetIsCancelled(data.isCancelled());
   settings->SetPrintFrameTypeUsage(data.printFrameTypeUsage());
   settings->SetPrintFrameType(data.printFrameType());
   settings->SetPrintSilent(data.printSilent());
   settings->SetShrinkToFit(data.shrinkToFit());
   settings->SetShowPrintProgress(data.showPrintProgress());
 
-  settings->SetPaperName(data.paperName().get());
+  settings->SetPaperName(data.paperName());
 
   settings->SetPaperData(data.paperData());
   settings->SetPaperWidth(data.paperWidth());
   settings->SetPaperHeight(data.paperHeight());
   settings->SetPaperSizeUnit(data.paperSizeUnit());
 
   settings->SetPrintReversed(data.printReversed());
   settings->SetPrintInColor(data.printInColor());
   settings->SetOrientation(data.orientation());
 
   settings->SetNumCopies(data.numCopies());
 
-  settings->SetPrinterName(data.printerName().get());
+  settings->SetPrinterName(data.printerName());
 
   settings->SetPrintToFile(data.printToFile());
 
-  settings->SetToFileName(data.toFileName().get());
+  settings->SetToFileName(data.toFileName());
 
   settings->SetOutputFormat(data.outputFormat());
   settings->SetPrintPageDelay(data.printPageDelay());
   settings->SetResolution(data.resolution());
   settings->SetDuplex(data.duplex());
   settings->SetIsInitializedFromPrinter(data.isInitializedFromPrinter());
   settings->SetIsInitializedFromPrefs(data.isInitializedFromPrefs());
 
@@ -528,17 +496,17 @@ nsPrintOptions::ReadPrefs(nsIPrintSettin
 
     if (success) {
       aPS->SetPaperSizeUnit(sizeUnit);
       DUMP_INT(kReadStr, kPrintPaperSizeUnit, sizeUnit);
       aPS->SetPaperWidth(width);
       DUMP_DBL(kReadStr, kPrintPaperWidth, width);
       aPS->SetPaperHeight(height);
       DUMP_DBL(kReadStr, kPrintPaperHeight, height);
-      aPS->SetPaperName(str.get());
+      aPS->SetPaperName(str);
       DUMP_STR(kReadStr, kPrintPaperName, str.get());
 #if defined(XP_WIN)
       if (saveSanitizedSizePrefs) {
         SavePrintSettingsToPrefs(aPS, !aPrinterName.IsEmpty(),
                                  nsIPrintSettings::kInitSavePaperSize);
       }
 #endif
     }
@@ -555,52 +523,52 @@ nsPrintOptions::ReadPrefs(nsIPrintSettin
     if (GETBOOLPREF(kPrintOddPages, &b)) {
       aPS->SetPrintOptions(nsIPrintSettings::kPrintOddPages, b);
       DUMP_BOOL(kReadStr, kPrintOddPages, b);
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveHeaderLeft) {
     if (GETSTRPREF(kPrintHeaderStrLeft, str)) {
-      aPS->SetHeaderStrLeft(str.get());
+      aPS->SetHeaderStrLeft(str);
       DUMP_STR(kReadStr, kPrintHeaderStrLeft, str.get());
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveHeaderCenter) {
     if (GETSTRPREF(kPrintHeaderStrCenter, str)) {
-      aPS->SetHeaderStrCenter(str.get());
+      aPS->SetHeaderStrCenter(str);
       DUMP_STR(kReadStr, kPrintHeaderStrCenter, str.get());
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveHeaderRight) {
     if (GETSTRPREF(kPrintHeaderStrRight, str)) {
-      aPS->SetHeaderStrRight(str.get());
+      aPS->SetHeaderStrRight(str);
       DUMP_STR(kReadStr, kPrintHeaderStrRight, str.get());
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveFooterLeft) {
     if (GETSTRPREF(kPrintFooterStrLeft, str)) {
-      aPS->SetFooterStrLeft(str.get());
+      aPS->SetFooterStrLeft(str);
       DUMP_STR(kReadStr, kPrintFooterStrLeft, str.get());
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveFooterCenter) {
     if (GETSTRPREF(kPrintFooterStrCenter, str)) {
-      aPS->SetFooterStrCenter(str.get());
+      aPS->SetFooterStrCenter(str);
       DUMP_STR(kReadStr, kPrintFooterStrCenter, str.get());
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveFooterRight) {
     if (GETSTRPREF(kPrintFooterStrRight, str)) {
-      aPS->SetFooterStrRight(str.get());
+      aPS->SetFooterStrRight(str);
       DUMP_STR(kReadStr, kPrintFooterStrRight, str.get());
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveBGColors) {
     if (GETBOOLPREF(kPrintBGColors, &b)) {
       aPS->SetPrintBGColors(b);
       DUMP_BOOL(kReadStr, kPrintBGColors, b);
@@ -646,17 +614,17 @@ nsPrintOptions::ReadPrefs(nsIPrintSettin
     if (GETBOOLPREF(kPrintToFile, &b)) {
       aPS->SetPrintToFile(b);
       DUMP_BOOL(kReadStr, kPrintToFile, b);
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveToFileName) {
     if (GETSTRPREF(kPrintToFileName, str)) {
-      aPS->SetToFileName(str.get());
+      aPS->SetToFileName(str);
       DUMP_STR(kReadStr, kPrintToFileName, str.get());
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSavePageDelay) {
     if (GETINTPREF(kPrintPageDelay, &iVal)) {
       aPS->SetPrintPageDelay(iVal);
       DUMP_INT(kReadStr, kPrintPageDelay, iVal);
@@ -766,17 +734,17 @@ nsPrintOptions::WritePrefs(nsIPrintSetti
     int16_t sizeUnit;
     double width, height;
     nsString name;
 
     if (
       NS_SUCCEEDED(aPS->GetPaperSizeUnit(&sizeUnit)) &&
       NS_SUCCEEDED(aPS->GetPaperWidth(&width)) &&
       NS_SUCCEEDED(aPS->GetPaperHeight(&height)) &&
-      NS_SUCCEEDED(aPS->GetPaperName(getter_Copies(name)))
+      NS_SUCCEEDED(aPS->GetPaperName(name))
     ) {
       DUMP_INT(kWriteStr, kPrintPaperSizeUnit, sizeUnit);
       Preferences::SetInt(GetPrefName(kPrintPaperSizeUnit, aPrinterName),
                           int32_t(sizeUnit));
       DUMP_DBL(kWriteStr, kPrintPaperWidth, width);
       WritePrefDouble(GetPrefName(kPrintPaperWidth, aPrinterName), width);
       DUMP_DBL(kWriteStr, kPrintPaperHeight, height);
       WritePrefDouble(GetPrefName(kPrintPaperHeight, aPrinterName), height);
@@ -817,57 +785,57 @@ nsPrintOptions::WritePrefs(nsIPrintSetti
     if (NS_SUCCEEDED(aPS->GetPrintOptions(nsIPrintSettings::kPrintOddPages,
                                           &b))) {
           DUMP_BOOL(kWriteStr, kPrintOddPages, b);
           Preferences::SetBool(GetPrefName(kPrintOddPages, aPrinterName), b);
         }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveHeaderLeft) {
-    if (NS_SUCCEEDED(aPS->GetHeaderStrLeft(getter_Copies(uStr)))) {
+    if (NS_SUCCEEDED(aPS->GetHeaderStrLeft(uStr))) {
       DUMP_STR(kWriteStr, kPrintHeaderStrLeft, uStr.get());
       Preferences::SetString(GetPrefName(kPrintHeaderStrLeft, aPrinterName),
                              uStr);
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveHeaderCenter) {
-    if (NS_SUCCEEDED(aPS->GetHeaderStrCenter(getter_Copies(uStr)))) {
+    if (NS_SUCCEEDED(aPS->GetHeaderStrCenter(uStr))) {
       DUMP_STR(kWriteStr, kPrintHeaderStrCenter, uStr.get());
       Preferences::SetString(GetPrefName(kPrintHeaderStrCenter, aPrinterName),
                              uStr);
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveHeaderRight) {
-    if (NS_SUCCEEDED(aPS->GetHeaderStrRight(getter_Copies(uStr)))) {
+    if (NS_SUCCEEDED(aPS->GetHeaderStrRight(uStr))) {
       DUMP_STR(kWriteStr, kPrintHeaderStrRight, uStr.get());
       Preferences::SetString(GetPrefName(kPrintHeaderStrRight, aPrinterName),
                              uStr);
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveFooterLeft) {
-    if (NS_SUCCEEDED(aPS->GetFooterStrLeft(getter_Copies(uStr)))) {
+    if (NS_SUCCEEDED(aPS->GetFooterStrLeft(uStr))) {
       DUMP_STR(kWriteStr, kPrintFooterStrLeft, uStr.get());
       Preferences::SetString(GetPrefName(kPrintFooterStrLeft, aPrinterName),
                              uStr);
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveFooterCenter) {
-    if (NS_SUCCEEDED(aPS->GetFooterStrCenter(getter_Copies(uStr)))) {
+    if (NS_SUCCEEDED(aPS->GetFooterStrCenter(uStr))) {
       DUMP_STR(kWriteStr, kPrintFooterStrCenter, uStr.get());
       Preferences::SetString(GetPrefName(kPrintFooterStrCenter, aPrinterName),
                              uStr);
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveFooterRight) {
-    if (NS_SUCCEEDED(aPS->GetFooterStrRight(getter_Copies(uStr)))) {
+    if (NS_SUCCEEDED(aPS->GetFooterStrRight(uStr))) {
       DUMP_STR(kWriteStr, kPrintFooterStrRight, uStr.get());
       Preferences::SetString(GetPrefName(kPrintFooterStrRight, aPrinterName),
                              uStr);
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveBGColors) {
     if (NS_SUCCEEDED(aPS->GetPrintBGColors(&b))) {
@@ -910,31 +878,31 @@ nsPrintOptions::WritePrefs(nsIPrintSetti
       DUMP_INT(kWriteStr, kPrintOrientation, iVal);
       Preferences::SetInt(GetPrefName(kPrintOrientation, aPrinterName), iVal);
     }
   }
 
   // Only the general version of this pref is saved
   if ((aFlags & nsIPrintSettings::kInitSavePrinterName)
       && aPrinterName.IsEmpty()) {
-    if (NS_SUCCEEDED(aPS->GetPrinterName(getter_Copies(uStr)))) {
+    if (NS_SUCCEEDED(aPS->GetPrinterName(uStr))) {
       DUMP_STR(kWriteStr, kPrinterName, uStr.get());
       Preferences::SetString(kPrinterName, uStr);
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSavePrintToFile) {
     if (NS_SUCCEEDED(aPS->GetPrintToFile(&b))) {
       DUMP_BOOL(kWriteStr, kPrintToFile, b);
       Preferences::SetBool(GetPrefName(kPrintToFile, aPrinterName), b);
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSaveToFileName) {
-    if (NS_SUCCEEDED(aPS->GetToFileName(getter_Copies(uStr)))) {
+    if (NS_SUCCEEDED(aPS->GetToFileName(uStr))) {
       DUMP_STR(kWriteStr, kPrintToFileName, uStr.get());
       Preferences::SetString(GetPrefName(kPrintToFileName, aPrinterName), uStr);
     }
   }
 
   if (aFlags & nsIPrintSettings::kInitSavePageDelay) {
     if (NS_SUCCEEDED(aPS->GetPrintPageDelay(&iVal))) {
       DUMP_INT(kWriteStr, kPrintPageDelay, iVal);
@@ -980,19 +948,19 @@ nsresult nsPrintOptions::_CreatePrintSet
 {
   // does not initially ref count
   nsPrintSettings * printSettings = new nsPrintSettings();
   NS_ENSURE_TRUE(printSettings, NS_ERROR_OUT_OF_MEMORY);
 
   NS_ADDREF(*_retval = printSettings); // ref count
 
   nsString printerName;
-  nsresult rv = GetDefaultPrinterName(getter_Copies(printerName));
+  nsresult rv = GetDefaultPrinterName(printerName);
   NS_ENSURE_SUCCESS(rv, rv);
-  (*_retval)->SetPrinterName(printerName.get());
+  (*_retval)->SetPrinterName(printerName);
 
   (void)InitPrintSettingsFromPrefs(*_retval, false,
                                    nsIPrintSettings::kInitSaveAll);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -1010,17 +978,17 @@ nsPrintOptions::GetGlobalPrintSettings(n
 
 NS_IMETHODIMP
 nsPrintOptions::GetNewPrintSettings(nsIPrintSettings * *aNewPrintSettings)
 {
   return _CreatePrintSettings(aNewPrintSettings);
 }
 
 NS_IMETHODIMP
-nsPrintOptions::GetDefaultPrinterName(char16_t * *aDefaultPrinterName)
+nsPrintOptions::GetDefaultPrinterName(nsAString& aDefaultPrinterName)
 {
   nsresult rv;
   nsCOMPtr<nsIPrinterEnumerator> prtEnum =
            do_GetService(NS_PRINTER_ENUMERATOR_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Look up the printer from the last print job
   nsAutoString lastPrinterName;
@@ -1035,43 +1003,42 @@ nsPrintOptions::GetDefaultPrinterName(ch
       while (NS_SUCCEEDED(printers->HasMore(&hasMore)) && hasMore) {
         nsAutoString printer;
         if (NS_SUCCEEDED(printers->GetNext(printer)) && lastPrinterName.Equals(printer)) {
           isValid = true;
           break;
         }
       }
       if (isValid) {
-        *aDefaultPrinterName = ToNewUnicode(lastPrinterName);
+        aDefaultPrinterName = lastPrinterName;
         return NS_OK;
       }
     }
   }
 
   // There is no last printer preference, or it doesn't name a valid printer.
   // Return the default from the printer enumeration.
   return prtEnum->GetDefaultPrinterName(aDefaultPrinterName);
 }
 
 NS_IMETHODIMP
-nsPrintOptions::InitPrintSettingsFromPrinter(const char16_t *aPrinterName,
+nsPrintOptions::InitPrintSettingsFromPrinter(const nsAString& aPrinterName,
                                              nsIPrintSettings *aPrintSettings)
 {
   // Don't get print settings from the printer in the child when printing via
   // parent, these will be retrieved in the parent later in the print process.
   if (XRE_IsContentProcess() && Preferences::GetBool("print.print_via_parent")) {
     return NS_OK;
   }
 
   NS_ENSURE_ARG_POINTER(aPrintSettings);
-  NS_ENSURE_ARG_POINTER(aPrinterName);
 
 #ifdef DEBUG
   nsString printerName;
-  aPrintSettings->GetPrinterName(getter_Copies(printerName));
+  aPrintSettings->GetPrinterName(printerName);
   if (!printerName.Equals(aPrinterName)) {
     NS_WARNING("Printer names should match!");
   }
 #endif
 
   bool isInitialized;
   aPrintSettings->GetIsInitializedFromPrinter(&isInitialized);
   if (isInitialized)
@@ -1100,17 +1067,17 @@ GetAdjustedPrinterName(nsIPrintSettings*
   NS_ENSURE_ARG_POINTER(aPS);
 
   aPrinterName.Truncate();
   if (!aUsePNP)
     return NS_OK;
 
   // Get the Printer Name from the PrintSettings
   // to use as a prefix for Pref Names
-  nsresult rv = aPS->GetPrinterName(getter_Copies(aPrinterName));
+  nsresult rv = aPS->GetPrinterName(aPrinterName);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Convert any whitespaces, carriage returns or newlines to _
   // The below algorithm is supposedly faster than using iterators
   NS_NAMED_LITERAL_STRING(replSubstr, "_");
   const char* replaceStr = " \n\r";
 
   int32_t x;
--- a/widget/nsPrintSettingsImpl.cpp
+++ b/widget/nsPrintSettingsImpl.cpp
@@ -187,29 +187,25 @@ NS_IMETHODIMP nsPrintSettings::GetDuplex
   return NS_OK;
 }
 NS_IMETHODIMP nsPrintSettings::SetDuplex(const int32_t aDuplex)
 {
   mDuplex = aDuplex;
   return NS_OK;
 }
 
-NS_IMETHODIMP nsPrintSettings::GetPrinterName(char16_t * *aPrinter)
+NS_IMETHODIMP nsPrintSettings::GetPrinterName(nsAString& aPrinter)
 {
-   NS_ENSURE_ARG_POINTER(aPrinter);
-
-   *aPrinter = ToNewUnicode(mPrinter);
-   NS_ENSURE_TRUE(*aPrinter, NS_ERROR_OUT_OF_MEMORY);
-
+   aPrinter = mPrinter;
    return NS_OK;
 }
 
-NS_IMETHODIMP nsPrintSettings::SetPrinterName(const char16_t * aPrinter)
+NS_IMETHODIMP nsPrintSettings::SetPrinterName(const nsAString& aPrinter)
 {
-  if (!aPrinter || !mPrinter.Equals(aPrinter)) {
+  if (!mPrinter.Equals(aPrinter)) {
     mIsInitedFromPrinter = false;
     mIsInitedFromPrefs   = false;
   }
 
   mPrinter.Assign(aPrinter);
   return NS_OK;
 }
 
@@ -232,29 +228,24 @@ NS_IMETHODIMP nsPrintSettings::GetPrintT
   return NS_OK;
 }
 NS_IMETHODIMP nsPrintSettings::SetPrintToFile(bool aPrintToFile)
 {
   mPrintToFile = aPrintToFile;
   return NS_OK;
 }
 
-NS_IMETHODIMP nsPrintSettings::GetToFileName(char16_t * *aToFileName)
+NS_IMETHODIMP nsPrintSettings::GetToFileName(nsAString& aToFileName)
 {
-  //NS_ENSURE_ARG_POINTER(aToFileName);
-  *aToFileName = ToNewUnicode(mToFileName);
+  aToFileName = mToFileName;
   return NS_OK;
 }
-NS_IMETHODIMP nsPrintSettings::SetToFileName(const char16_t * aToFileName)
+NS_IMETHODIMP nsPrintSettings::SetToFileName(const nsAString& aToFileName)
 {
-  if (aToFileName) {
-    mToFileName = aToFileName;
-  } else {
-    mToFileName.SetLength(0);
-  }
+  mToFileName = aToFileName;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsPrintSettings::GetOutputFormat(int16_t *aOutputFormat)
 {
   NS_ENSURE_ARG_POINTER(aOutputFormat);
   *aOutputFormat = mOutputFormat;
   return NS_OK;
@@ -496,53 +487,35 @@ NS_IMETHODIMP nsPrintSettings::GetPrintR
   return NS_OK;
 }
 NS_IMETHODIMP nsPrintSettings::SetPrintRange(int16_t aPrintRange)
 {
   mPrintRange = aPrintRange;
   return NS_OK;
 }
 
-NS_IMETHODIMP nsPrintSettings::GetTitle(char16_t * *aTitle)
+NS_IMETHODIMP nsPrintSettings::GetTitle(nsAString& aTitle)
 {
-  NS_ENSURE_ARG_POINTER(aTitle);
-  if (!mTitle.IsEmpty()) {
-    *aTitle = ToNewUnicode(mTitle);
-  } else {
-    *aTitle = nullptr;
-  }
+  aTitle = mTitle;
   return NS_OK;
 }
-NS_IMETHODIMP nsPrintSettings::SetTitle(const char16_t * aTitle)
+NS_IMETHODIMP nsPrintSettings::SetTitle(const nsAString& aTitle)
 {
-  if (aTitle) {
-    mTitle = aTitle;
-  } else {
-    mTitle.SetLength(0);
-  }
+  mTitle = aTitle;
   return NS_OK;
 }
 
-NS_IMETHODIMP nsPrintSettings::GetDocURL(char16_t * *aDocURL)
+NS_IMETHODIMP nsPrintSettings::GetDocURL(nsAString& aDocURL)
 {
-  NS_ENSURE_ARG_POINTER(aDocURL);
-  if (!mURL.IsEmpty()) {
-    *aDocURL = ToNewUnicode(mURL);
-  } else {
-    *aDocURL = nullptr;
-  }
+  aDocURL = mURL;
   return NS_OK;
 }
-NS_IMETHODIMP nsPrintSettings::SetDocURL(const char16_t * aDocURL)
+NS_IMETHODIMP nsPrintSettings::SetDocURL(const nsAString& aDocURL)
 {
-  if (aDocURL) {
-    mURL = aDocURL;
-  } else {
-    mURL.SetLength(0);
-  }
+  mURL = aDocURL;
   return NS_OK;
 }
 
 /** ---------------------------------------------------
  *  See documentation in nsPrintSettingsImpl.h
  *	@update 1/12/01 rods
  */
 NS_IMETHODIMP 
@@ -581,113 +554,80 @@ nsPrintSettings::GetPrintOptionsBits(int
 
 NS_IMETHODIMP
 nsPrintSettings::SetPrintOptionsBits(int32_t aBits)
 {
   mPrintOptions = aBits;
   return NS_OK;
 }
 
-nsresult 
-nsPrintSettings::GetMarginStrs(char16_t * *aTitle, 
-                              nsHeaderFooterEnum aType, 
-                              int16_t aJust)
+NS_IMETHODIMP nsPrintSettings::GetHeaderStrLeft(nsAString& aTitle)
 {
-  NS_ENSURE_ARG_POINTER(aTitle);
-  *aTitle = nullptr;
-  if (aType == eHeader) {
-    switch (aJust) {
-      case kJustLeft:   *aTitle = ToNewUnicode(mHeaderStrs[0]);break;
-      case kJustCenter: *aTitle = ToNewUnicode(mHeaderStrs[1]);break;
-      case kJustRight:  *aTitle = ToNewUnicode(mHeaderStrs[2]);break;
-    } //switch
-  } else {
-    switch (aJust) {
-      case kJustLeft:   *aTitle = ToNewUnicode(mFooterStrs[0]);break;
-      case kJustCenter: *aTitle = ToNewUnicode(mFooterStrs[1]);break;
-      case kJustRight:  *aTitle = ToNewUnicode(mFooterStrs[2]);break;
-    } //switch
-  }
+  aTitle = mHeaderStrs[0];
+  return NS_OK;
+}
+NS_IMETHODIMP nsPrintSettings::SetHeaderStrLeft(const nsAString& aTitle)
+{
+  mHeaderStrs[0] = aTitle;
   return NS_OK;
 }
 
-nsresult
-nsPrintSettings::SetMarginStrs(const char16_t * aTitle, 
-                              nsHeaderFooterEnum aType, 
-                              int16_t aJust)
+NS_IMETHODIMP nsPrintSettings::GetHeaderStrCenter(nsAString& aTitle)
 {
-  NS_ENSURE_ARG_POINTER(aTitle);
-  if (aType == eHeader) {
-    switch (aJust) {
-      case kJustLeft:   mHeaderStrs[0] = aTitle;break;
-      case kJustCenter: mHeaderStrs[1] = aTitle;break;
-      case kJustRight:  mHeaderStrs[2] = aTitle;break;
-    } //switch
-  } else {
-    switch (aJust) {
-      case kJustLeft:   mFooterStrs[0] = aTitle;break;
-      case kJustCenter: mFooterStrs[1] = aTitle;break;
-      case kJustRight:  mFooterStrs[2] = aTitle;break;
-    } //switch
-  }
+  aTitle = mHeaderStrs[1];
+  return NS_OK;
+}
+NS_IMETHODIMP nsPrintSettings::SetHeaderStrCenter(const nsAString& aTitle)
+{
+  mHeaderStrs[1] = aTitle;
   return NS_OK;
 }
 
-NS_IMETHODIMP nsPrintSettings::GetHeaderStrLeft(char16_t * *aTitle)
+NS_IMETHODIMP nsPrintSettings::GetHeaderStrRight(nsAString& aTitle)
 {
-  return GetMarginStrs(aTitle, eHeader, kJustLeft);
-}
-NS_IMETHODIMP nsPrintSettings::SetHeaderStrLeft(const char16_t * aTitle)
-{
-  return SetMarginStrs(aTitle, eHeader, kJustLeft);
+  aTitle = mHeaderStrs[2];
+  return NS_OK;
 }
-
-NS_IMETHODIMP nsPrintSettings::GetHeaderStrCenter(char16_t * *aTitle)
+NS_IMETHODIMP nsPrintSettings::SetHeaderStrRight(const nsAString& aTitle)
 {
-  return GetMarginStrs(aTitle, eHeader, kJustCenter);
-}
-NS_IMETHODIMP nsPrintSettings::SetHeaderStrCenter(const char16_t * aTitle)
-{
-  return SetMarginStrs(aTitle, eHeader, kJustCenter);
+  mHeaderStrs[2] = aTitle;
+  return NS_OK;
 }
 
-NS_IMETHODIMP nsPrintSettings::GetHeaderStrRight(char16_t * *aTitle)
+NS_IMETHODIMP nsPrintSettings::GetFooterStrLeft(nsAString& aTitle)
 {
-  return GetMarginStrs(aTitle, eHeader, kJustRight);
+  aTitle = mFooterStrs[0];
+  return NS_OK;
 }
-NS_IMETHODIMP nsPrintSettings::SetHeaderStrRight(const char16_t * aTitle)
+NS_IMETHODIMP nsPrintSettings::SetFooterStrLeft(const nsAString& aTitle)
 {
-  return SetMarginStrs(aTitle, eHeader, kJustRight);
+  mFooterStrs[0] = aTitle;
+  return NS_OK;
 }
 
-NS_IMETHODIMP nsPrintSettings::GetFooterStrLeft(char16_t * *aTitle)
+NS_IMETHODIMP nsPrintSettings::GetFooterStrCenter(nsAString& aTitle)
 {
-  return GetMarginStrs(aTitle, eFooter, kJustLeft);
+  aTitle = mFooterStrs[1];
+  return NS_OK;
 }
-NS_IMETHODIMP nsPrintSettings::SetFooterStrLeft(const char16_t * aTitle)
+NS_IMETHODIMP nsPrintSettings::SetFooterStrCenter(const nsAString& aTitle)
 {
-  return SetMarginStrs(aTitle, eFooter, kJustLeft);
+  mFooterStrs[1] = aTitle;
+  return NS_OK;
 }
 
-NS_IMETHODIMP nsPrintSettings::GetFooterStrCenter(char16_t * *aTitle)
+NS_IMETHODIMP nsPrintSettings::GetFooterStrRight(nsAString& aTitle)
 {
-  return GetMarginStrs(aTitle, eFooter, kJustCenter);
-}
-NS_IMETHODIMP nsPrintSettings::SetFooterStrCenter(const char16_t * aTitle)
-{
-  return SetMarginStrs(aTitle, eFooter, kJustCenter);
+  aTitle = mFooterStrs[2];
+  return NS_OK;
 }
-
-NS_IMETHODIMP nsPrintSettings::GetFooterStrRight(char16_t * *aTitle)
+NS_IMETHODIMP nsPrintSettings::SetFooterStrRight(const nsAString& aTitle)
 {
-  return GetMarginStrs(aTitle, eFooter, kJustRight);
-}
-NS_IMETHODIMP nsPrintSettings::SetFooterStrRight(const char16_t * aTitle)
-{
-  return SetMarginStrs(aTitle, eFooter, kJustRight);
+  mFooterStrs[2] = aTitle;
+  return NS_OK;
 }
 
 NS_IMETHODIMP nsPrintSettings::GetPrintFrameTypeUsage(int16_t *aPrintFrameTypeUsage)
 {
   NS_ENSURE_ARG_POINTER(aPrintFrameTypeUsage);
   *aPrintFrameTypeUsage = mPrintFrameTypeUsage;
   return NS_OK;
 }
@@ -740,33 +680,24 @@ NS_IMETHODIMP nsPrintSettings::GetShowPr
   return NS_OK;
 }
 NS_IMETHODIMP nsPrintSettings::SetShowPrintProgress(bool aShowPrintProgress)
 {
   mShowPrintProgress = aShowPrintProgress;
   return NS_OK;
 }
 
-NS_IMETHODIMP nsPrintSettings::GetPaperName(char16_t * *aPaperName)
+NS_IMETHODIMP nsPrintSettings::GetPaperName(nsAString& aPaperName)
 {
-  NS_ENSURE_ARG_POINTER(aPaperName);
-  if (!mPaperName.IsEmpty()) {
-    *aPaperName = ToNewUnicode(mPaperName);
-  } else {
-    *aPaperName = nullptr;
-  }
+  aPaperName = mPaperName;
   return NS_OK;
 }
-NS_IMETHODIMP nsPrintSettings::SetPaperName(const char16_t * aPaperName)
+NS_IMETHODIMP nsPrintSettings::SetPaperName(const nsAString& aPaperName)
 {
-  if (aPaperName) {
-    mPaperName = aPaperName;
-  } else {
-    mPaperName.SetLength(0);
-  }
+  mPaperName = aPaperName;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsPrintSettings::GetHowToEnableFrameUI(int16_t *aHowToEnableFrameUI)
 {
   NS_ENSURE_ARG_POINTER(aHowToEnableFrameUI);
   *aHowToEnableFrameUI = mHowToEnableFrameUI;
   return NS_OK;
--- a/widget/nsPrintSettingsImpl.h
+++ b/widget/nsPrintSettingsImpl.h
@@ -37,19 +37,16 @@ protected:
   virtual nsresult _Assign(nsIPrintSettings *aPS);
   
   typedef enum {
     eHeader,
     eFooter
   } nsHeaderFooterEnum;
 
 
-  nsresult GetMarginStrs(char16_t * *aTitle, nsHeaderFooterEnum aType, int16_t aJust);
-  nsresult SetMarginStrs(const char16_t * aTitle, nsHeaderFooterEnum aType, int16_t aJust);
-
   // Members
   nsWeakPtr     mSession; // Should never be touched by Clone or Assign
  
   // mMargin, mEdge, and mUnwriteableMargin are stored in twips
   nsIntMargin   mMargin;
   nsIntMargin   mEdge;
   nsIntMargin   mUnwriteableMargin;
 
--- a/widget/windows/nsDeviceContextSpecWin.cpp
+++ b/widget/windows/nsDeviceContextSpecWin.cpp
@@ -63,17 +63,17 @@ public:
   static GlobalPrinters* GetInstance() { return &mGlobalPrinters; }
   ~GlobalPrinters() { FreeGlobalPrinters(); }
 
   void FreeGlobalPrinters();
 
   bool         PrintersAreAllocated() { return mPrinters != nullptr; }
   LPWSTR       GetItemFromList(int32_t aInx) { return mPrinters?mPrinters->ElementAt(aInx):nullptr; }
   nsresult     EnumeratePrinterList();
-  void         GetDefaultPrinterName(nsString& aDefaultPrinterName);
+  void         GetDefaultPrinterName(nsAString& aDefaultPrinterName);
   uint32_t     GetNumPrinters() { return mPrinters?mPrinters->Length():0; }
 
 protected:
   GlobalPrinters() {}
   nsresult EnumerateNativePrinters();
   void     ReallocatePrinters();
 
   static GlobalPrinters    mGlobalPrinters;
@@ -89,18 +89,16 @@ struct AutoFreeGlobalPrinters
   ~AutoFreeGlobalPrinters() {
     GlobalPrinters::GetInstance()->FreeGlobalPrinters();
   }
 };
 
 //----------------------------------------------------------------------------------
 nsDeviceContextSpecWin::nsDeviceContextSpecWin()
 {
-  mDriverName    = nullptr;
-  mDeviceName    = nullptr;
   mDevMode       = nullptr;
 #ifdef MOZ_ENABLE_SKIA_PDF
   mPrintViaSkPDF          = false;
   mDC                     = NULL;
   mPDFPageCount           = 0;
   mPDFCurrentPageNum      = 0;
   mPrintViaPDFInProgress  = false;
 #endif
@@ -108,46 +106,34 @@ nsDeviceContextSpecWin::nsDeviceContextS
 
 
 //----------------------------------------------------------------------------------
 
 NS_IMPL_ISUPPORTS(nsDeviceContextSpecWin, nsIDeviceContextSpec)
 
 nsDeviceContextSpecWin::~nsDeviceContextSpecWin()
 {
-  SetDeviceName(nullptr);
-  SetDriverName(nullptr);
   SetDevMode(nullptr);
 
   nsCOMPtr<nsIPrintSettingsWin> psWin(do_QueryInterface(mPrintSettings));
   if (psWin) {
-    psWin->SetDeviceName(nullptr);
-    psWin->SetDriverName(nullptr);
+    psWin->SetDeviceName(EmptyString());
+    psWin->SetDriverName(EmptyString());
     psWin->SetDevMode(nullptr);
   }
 
 #ifdef MOZ_ENABLE_SKIA_PDF
   if (mPrintViaSkPDF ) {
     CleanupPrintViaPDF();
   }
 #endif
   // Free them, we won't need them for a while
   GlobalPrinters::GetInstance()->FreeGlobalPrinters();
 }
 
-
-//------------------------------------------------------------------
-// helper
-static char16_t * GetDefaultPrinterNameFromGlobalPrinters()
-{
-  nsAutoString printerName;
-  GlobalPrinters::GetInstance()->GetDefaultPrinterName(printerName);
-  return ToNewUnicode(printerName);
-}
-
 //----------------------------------------------------------------------------------
 NS_IMETHODIMP nsDeviceContextSpecWin::Init(nsIWidget* aWidget,
                                            nsIPrintSettings* aPrintSettings,
                                            bool aIsPrintPreview)
 {
   mPrintSettings = aPrintSettings;
 
   nsresult rv = NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE;
@@ -166,91 +152,68 @@ NS_IMETHODIMP nsDeviceContextSpecWin::In
     if ((XRE_IsContentProcess() &&
          Preferences::GetBool("print.print_via_parent")) ||
         mOutputFormat == nsIPrintSettings::kOutputFormatPDF) {
       return NS_OK;
     }
 
     nsCOMPtr<nsIPrintSettingsWin> psWin(do_QueryInterface(aPrintSettings));
     if (psWin) {
-      char16_t* deviceName;
-      char16_t* driverName;
-      psWin->GetDeviceName(&deviceName); // creates new memory (makes a copy)
-      psWin->GetDriverName(&driverName); // creates new memory (makes a copy)
+      nsAutoString deviceName;
+      nsAutoString driverName;
+      psWin->GetDeviceName(deviceName);
+      psWin->GetDriverName(driverName);
 
       LPDEVMODEW devMode;
       psWin->GetDevMode(&devMode);       // creates new memory (makes a copy)
 
-      if (deviceName && driverName && devMode) {
+      if (!deviceName.IsEmpty() && !driverName.IsEmpty() && devMode) {
         // Scaling is special, it is one of the few
         // devMode items that we control in layout
         if (devMode->dmFields & DM_SCALE) {
           double scale = double(devMode->dmScale) / 100.0f;
           if (scale != 1.0) {
             aPrintSettings->SetScaling(scale);
             devMode->dmScale = 100;
           }
         }
 
         SetDeviceName(deviceName);
         SetDriverName(driverName);
         SetDevMode(devMode);
 
-        // clean up
-        free(deviceName);
-        free(driverName);
-
         return NS_OK;
       } else {
         PR_PL(("***** nsDeviceContextSpecWin::Init - deviceName/driverName/devMode was NULL!\n"));
-        if (deviceName) free(deviceName);
-        if (driverName) free(driverName);
         if (devMode) ::HeapFree(::GetProcessHeap(), 0, devMode);
       }
     }
   } else {
     PR_PL(("***** nsDeviceContextSpecWin::Init - aPrintSettingswas NULL!\n"));
   }
 
   // Get the Printer Name to be used and output format.
-  char16_t * printerName = nullptr;
+  nsAutoString printerName;
   if (mPrintSettings) {
-    mPrintSettings->GetPrinterName(&printerName);
+    mPrintSettings->GetPrinterName(printerName);
   }
 
   // If there is no name then use the default printer
-  if (!printerName || (printerName && !*printerName)) {
-    printerName = GetDefaultPrinterNameFromGlobalPrinters();
+  if (printerName.IsEmpty()) {
+    GlobalPrinters::GetInstance()->GetDefaultPrinterName(printerName);
   }
 
-  NS_ASSERTION(printerName, "We have to have a printer name");
-  if (!printerName || !*printerName) return rv;
+  if (printerName.IsEmpty()) {
+    return rv;
+  }
 
   return GetDataFromPrinter(printerName, mPrintSettings);
 }
 
 //----------------------------------------------------------
-// Helper Function - Free and reallocate the string
-static void CleanAndCopyString(wchar_t*& aStr, const wchar_t* aNewStr)
-{
-  if (aStr != nullptr) {
-    if (aNewStr != nullptr && wcslen(aStr) > wcslen(aNewStr)) { // reuse it if we can
-      wcscpy(aStr, aNewStr);
-      return;
-    } else {
-      free(aStr);
-      aStr = nullptr;
-    }
-  }
-
-  if (nullptr != aNewStr) {
-    aStr = (wchar_t*) malloc(sizeof(wchar_t) * (wcslen(aNewStr) + 1));
-    wcscpy(aStr, aNewStr);
-  }
-}
 
 already_AddRefed<PrintTarget> nsDeviceContextSpecWin::MakePrintTarget()
 {
   NS_ASSERTION(mDevMode, "DevMode can't be NULL here");
 
 #ifdef MOZ_ENABLE_SKIA_PDF
   if (mPrintViaSkPDF) {
     double width, height;
@@ -261,17 +224,17 @@ already_AddRefed<PrintTarget> nsDeviceCo
 
     // convert twips to points
     width  /= TWIPS_PER_POINT_FLOAT;
     height /= TWIPS_PER_POINT_FLOAT;
     IntSize size = IntSize::Truncate(width, height);
 
     if (mOutputFormat == nsIPrintSettings::kOutputFormatPDF) {
       nsString filename;
-      mPrintSettings->GetToFileName(getter_Copies(filename));
+      mPrintSettings->GetToFileName(filename);
 
       nsAutoCString printFile(NS_ConvertUTF16toUTF8(filename).get());
       auto skStream = MakeUnique<SkFILEWStream>(printFile.get());
       return PrintTargetSkPDF::CreateOrNull(Move(skStream), size);
     }
 
     if (mDevMode) {
       // When printing to a printer via Skia PDF we open a temporary file that
@@ -306,17 +269,17 @@ already_AddRefed<PrintTarget> nsDeviceCo
       auto skStream = MakeUnique<SkFILEWStream>(filePath.get());
       return PrintTargetSkPDF::CreateOrNull(Move(skStream), size);
     }
   }
 #endif
 
   if (mOutputFormat == nsIPrintSettings::kOutputFormatPDF) {
     nsString filename;
-    mPrintSettings->GetToFileName(getter_Copies(filename));
+    mPrintSettings->GetToFileName(filename);
 
     double width, height;
     mPrintSettings->GetEffectivePageSize(&width, &height);
     if (width <= 0 || height <= 0) {
       return nullptr;
     }
 
     // convert twips to points
@@ -334,18 +297,18 @@ already_AddRefed<PrintTarget> nsDeviceCo
     if (NS_FAILED(rv)) {
       return nullptr;
     }
 
     return PrintTargetPDF::CreateOrNull(stream, IntSize::Truncate(width, height));
   }
 
   if (mDevMode) {
-    NS_WARNING_ASSERTION(mDriverName, "No driver!");
-    HDC dc = ::CreateDCW(mDriverName, mDeviceName, nullptr, mDevMode);
+    NS_WARNING_ASSERTION(!mDriverName.IsEmpty(), "No driver!");
+    HDC dc = ::CreateDCW(mDriverName.get(), mDeviceName.get(), nullptr, mDevMode);
     if (!dc) {
       gfxCriticalError(gfxCriticalError::DefaultOptions(false))
         << "Failed to create device context in GetSurfaceForPrinter";
       return nullptr;
     }
 
     // The PrintTargetWindows takes over ownership of this DC
     return PrintTargetWindows::CreateOrNull(dc);
@@ -452,18 +415,18 @@ nsDeviceContextSpecWin::BeginDocument(co
                                       int32_t          aEndPage)
 {
 #ifdef MOZ_ENABLE_SKIA_PDF
   if (mPrintViaSkPDF && (mOutputFormat != nsIPrintSettings::kOutputFormatPDF)) {
     // Here we create mDC which we'll draw each page from our temporary PDF file
     // to once we reach EndDocument. The only reason we create it here rather
     // than in EndDocument is so that we don't need to store aTitle and
     // aPrintToFileName as member data.
-    NS_WARNING_ASSERTION(mDriverName, "No driver!");
-    mDC = ::CreateDCW(mDriverName, mDeviceName, nullptr, mDevMode);
+    NS_WARNING_ASSERTION(!mDriverName.IsEmpty(), "No driver!");
+    mDC = ::CreateDCW(mDriverName.get(), mDeviceName.get(), nullptr, mDevMode);
     if (mDC == NULL) {
       gfxCriticalError(gfxCriticalError::DefaultOptions(false))
         << "Failed to create device context in GetSurfaceForPrinter";
       return NS_ERROR_FAILURE;
     }
 
     const uint32_t DOC_TITLE_LENGTH = MAX_PATH - 1;
     nsString title(aTitle);
@@ -522,25 +485,25 @@ nsDeviceContextSpecWin::EndDocument()
       NS_WARNING("Failed to dispatch to the current thread!");
     }
   }
 #endif
   return rv;
 }
 
 //----------------------------------------------------------------------------------
-void nsDeviceContextSpecWin::SetDeviceName(char16ptr_t aDeviceName)
+void nsDeviceContextSpecWin::SetDeviceName(const nsAString& aDeviceName)
 {
-  CleanAndCopyString(mDeviceName, aDeviceName);
+  mDeviceName = aDeviceName;
 }
 
 //----------------------------------------------------------------------------------
-void nsDeviceContextSpecWin::SetDriverName(char16ptr_t aDriverName)
+void nsDeviceContextSpecWin::SetDriverName(const nsAString& aDriverName)
 {
-  CleanAndCopyString(mDriverName, aDriverName);
+  mDriverName = aDriverName;
 }
 
 //----------------------------------------------------------------------------------
 void nsDeviceContextSpecWin::SetDevMode(LPDEVMODEW aDevMode)
 {
   if (mDevMode) {
     ::HeapFree(::GetProcessHeap(), 0, mDevMode);
   }
@@ -555,46 +518,48 @@ nsDeviceContextSpecWin::GetDevMode(LPDEV
   aDevMode = mDevMode;
 }
 
 #define DISPLAY_LAST_ERROR
 
 //----------------------------------------------------------------------------------
 // Setup the object's data member with the selected printer's data
 nsresult
-nsDeviceContextSpecWin::GetDataFromPrinter(char16ptr_t aName, nsIPrintSettings* aPS)
+nsDeviceContextSpecWin::GetDataFromPrinter(const nsAString& aName,
+                                           nsIPrintSettings* aPS)
 {
   nsresult rv = NS_ERROR_FAILURE;
 
   if (!GlobalPrinters::GetInstance()->PrintersAreAllocated()) {
     rv = GlobalPrinters::GetInstance()->EnumeratePrinterList();
     if (NS_FAILED(rv)) {
       PR_PL(("***** nsDeviceContextSpecWin::GetDataFromPrinter - Couldn't enumerate printers!\n"));
       DISPLAY_LAST_ERROR
     }
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   nsHPRINTER hPrinter = nullptr;
-  wchar_t *name = (wchar_t*)aName; // Windows APIs use non-const name argument
+  const nsString& flat = PromiseFlatString(aName);
+  wchar_t* name = (wchar_t*)flat.get(); // Windows APIs use non-const name argument
 
   BOOL status = ::OpenPrinterW(name, &hPrinter, nullptr);
   if (status) {
     nsAutoPrinter autoPrinter(hPrinter);
 
     LPDEVMODEW   pDevMode;
 
     // Allocate a buffer of the correct size.
     LONG needed = ::DocumentPropertiesW(nullptr, hPrinter, name, nullptr,
                                         nullptr, 0);
     if (needed < 0) {
       PR_PL(("**** nsDeviceContextSpecWin::GetDataFromPrinter - Couldn't get "
              "size of DEVMODE using DocumentPropertiesW(pDeviceName = \"%s\"). "
              "GetLastEror() = %08x\n",
-             aName ? NS_ConvertUTF16toUTF8(aName).get() : "", GetLastError()));
+             NS_ConvertUTF16toUTF8(aName).get(), GetLastError()));
       return NS_ERROR_FAILURE;
     }
 
     pDevMode = (LPDEVMODEW)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY,
                                        needed);
     if (!pDevMode) return NS_ERROR_FAILURE;
 
     // Get the default DevMode for the printer and modify it for our needs.
@@ -609,17 +574,17 @@ nsDeviceContextSpecWin::GetDataFromPrint
       ret = ::DocumentPropertiesW(nullptr, hPrinter, name,
                                   pDevMode, pDevMode,
                                   DM_IN_BUFFER | DM_OUT_BUFFER);
 
       // We need to copy the final DEVMODE settings back to our print settings,
       // because they may have been set from invalid prefs.
       if (ret == IDOK) {
         // We need to get information from the device as well.
-        nsAutoHDC printerDC(::CreateICW(kDriverName, aName, nullptr, pDevMode));
+        nsAutoHDC printerDC(::CreateICW(kDriverName, name, nullptr, pDevMode));
         if (NS_WARN_IF(!printerDC)) {
           ::HeapFree(::GetProcessHeap(), 0, pDevMode);
           return NS_ERROR_FAILURE;
         }
 
         psWin->CopyFromNative(printerDC, pDevMode);
       }
     }
@@ -630,17 +595,17 @@ nsDeviceContextSpecWin::GetDataFromPrint
       DISPLAY_LAST_ERROR
       return NS_ERROR_FAILURE;
     }
 
     SetDevMode(pDevMode); // cache the pointer and takes responsibility for the memory
 
     SetDeviceName(aName);
 
-    SetDriverName(kDriverName);
+    SetDriverName(nsDependentString(kDriverName));
 
     rv = NS_OK;
   } else {
     rv = NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND;
     PR_PL(("***** nsDeviceContextSpecWin::GetDataFromPrinter - Couldn't open printer: [%s]\n", NS_ConvertUTF16toUTF8(aName).get()));
     DISPLAY_LAST_ERROR
   }
   return rv;
@@ -659,32 +624,29 @@ nsPrinterEnumeratorWin::~nsPrinterEnumer
   // GlobalPrinters::GetInstance()->FreeGlobalPrinters();
 }
 
 NS_IMPL_ISUPPORTS(nsPrinterEnumeratorWin, nsIPrinterEnumerator)
 
 //----------------------------------------------------------------------------------
 // Return the Default Printer name
 NS_IMETHODIMP
-nsPrinterEnumeratorWin::GetDefaultPrinterName(char16_t * *aDefaultPrinterName)
+nsPrinterEnumeratorWin::GetDefaultPrinterName(nsAString& aDefaultPrinterName)
 {
-  NS_ENSURE_ARG_POINTER(aDefaultPrinterName);
-
-  *aDefaultPrinterName = GetDefaultPrinterNameFromGlobalPrinters(); // helper
-
+  GlobalPrinters::GetInstance()->GetDefaultPrinterName(aDefaultPrinterName);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPrinterEnumeratorWin::InitPrintSettingsFromPrinter(const char16_t *aPrinterName, nsIPrintSettings *aPrintSettings)
+nsPrinterEnumeratorWin::InitPrintSettingsFromPrinter(const nsAString& aPrinterName,
+                                                     nsIPrintSettings *aPrintSettings)
 {
-  NS_ENSURE_ARG_POINTER(aPrinterName);
   NS_ENSURE_ARG_POINTER(aPrintSettings);
 
-  if (!*aPrinterName) {
+  if (aPrinterName.IsEmpty()) {
     return NS_OK;
   }
 
   // When printing to PDF on Windows there is no associated printer driver.
   int16_t outputFormat;
   aPrintSettings->GetOutputFormat(&outputFormat);
   if (outputFormat == nsIPrintSettings::kOutputFormatPDF) {
     return NS_OK;
@@ -719,17 +681,18 @@ nsPrinterEnumeratorWin::InitPrintSetting
   devSpecWin->GetDevMode(devmode);
   if (NS_WARN_IF(!devmode)) {
     return NS_ERROR_FAILURE;
   }
 
   aPrintSettings->SetPrinterName(aPrinterName);
 
   // We need to get information from the device as well.
-  char16ptr_t printerName = aPrinterName;
+  const nsString& flat = PromiseFlatString(aPrinterName);
+  char16ptr_t printerName = flat.get();
   HDC dc = ::CreateICW(kDriverName, printerName, nullptr, devmode);
   if (NS_WARN_IF(!dc)) {
     return NS_ERROR_FAILURE;
   }
 
   nsCOMPtr<nsIPrintSettingsWin> psWin = do_QueryInterface(aPrintSettings);
   MOZ_ASSERT(psWin);
   psWin->CopyFromNative(dc, devmode);
@@ -828,17 +791,17 @@ GlobalPrinters::EnumerateNativePrinters(
   }
   PR_PL(("-----------------------\n"));
   return rv;
 }
 
 //------------------------------------------------------------------
 // Uses the GetProfileString to get the default printer from the registry
 void
-GlobalPrinters::GetDefaultPrinterName(nsString& aDefaultPrinterName)
+GlobalPrinters::GetDefaultPrinterName(nsAString& aDefaultPrinterName)
 {
   aDefaultPrinterName.Truncate();
   WCHAR szDefaultPrinterName[1024];
   DWORD status = GetProfileStringW(L"windows", L"device", 0,
                                    szDefaultPrinterName,
                                    ArrayLength(szDefaultPrinterName));
   if (status > 0) {
     WCHAR comma = ',';
@@ -848,17 +811,18 @@ GlobalPrinters::GetDefaultPrinterName(ns
     if (*sPtr == comma) {
       *sPtr = 0;
     }
     aDefaultPrinterName = szDefaultPrinterName;
   } else {
     aDefaultPrinterName = EmptyString();
   }
 
-  PR_PL(("DEFAULT PRINTER [%s]\n", aDefaultPrinterName.get()));
+  PR_PL(("DEFAULT PRINTER [%s]\n",
+         PromiseFlatString(aDefaultPrinterName).get()));
 }
 
 //----------------------------------------------------------------------------------
 // This goes and gets the list of available printers and puts
 // the default printer at the beginning of the list
 nsresult
 GlobalPrinters::EnumeratePrinterList()
 {
--- a/widget/windows/nsDeviceContextSpecWin.h
+++ b/widget/windows/nsDeviceContextSpecWin.h
@@ -46,38 +46,39 @@ public:
   NS_IMETHOD EndPage() override { return NS_OK; }
 
   NS_IMETHOD Init(nsIWidget* aWidget, nsIPrintSettings* aPS, bool aIsPrintPreview) override;
 
   float GetDPI() final;
 
   float GetPrintingScale() final;
 
-  void GetDriverName(wchar_t *&aDriverName) const   { aDriverName = mDriverName;     }
-  void GetDeviceName(wchar_t *&aDeviceName) const   { aDeviceName = mDeviceName;     }
+  void GetDriverName(nsAString& aDriverName) const { aDriverName = mDriverName; }
+  void GetDeviceName(nsAString& aDeviceName) const { aDeviceName = mDeviceName; }
 
   // The GetDevMode will return a pointer to a DevMode
   // whether it is from the Global memory handle or just the DevMode
   // To get the DevMode from the Global memory Handle it must lock it 
   // So this call must be paired with a call to UnlockGlobalHandle
   void GetDevMode(LPDEVMODEW &aDevMode);
 
   // helper functions
-  nsresult GetDataFromPrinter(char16ptr_t aName, nsIPrintSettings* aPS = nullptr);
+  nsresult GetDataFromPrinter(const nsAString& aName,
+                              nsIPrintSettings* aPS = nullptr);
 
 protected:
 
-  void SetDeviceName(char16ptr_t aDeviceName);
-  void SetDriverName(char16ptr_t aDriverName);
+  void SetDeviceName(const nsAString& aDeviceName);
+  void SetDriverName(const nsAString& aDriverName);
   void SetDevMode(LPDEVMODEW aDevMode);
 
   virtual ~nsDeviceContextSpecWin();
 
-  wchar_t*      mDriverName;
-  wchar_t*      mDeviceName;
+  nsString mDriverName;
+  nsString mDeviceName;
   LPDEVMODEW mDevMode;
 
   nsCOMPtr<nsIPrintSettings> mPrintSettings;
   int16_t mOutputFormat = nsIPrintSettings::kOutputFormatNative;
 
 #ifdef MOZ_ENABLE_SKIA_PDF
   void  FinishPrintViaPDF();
   void  CleanupPrintViaPDF();
--- a/widget/windows/nsPrintOptionsWin.cpp
+++ b/widget/windows/nsPrintOptionsWin.cpp
@@ -50,28 +50,25 @@ nsPrintOptionsWin::SerializeToPrintData(
     aWBP->GetIsRangeSelection(&data->isRangeSelection());
   }
 
   nsCOMPtr<nsIPrintSettingsWin> psWin = do_QueryInterface(aSettings);
   if (!psWin) {
     return NS_ERROR_FAILURE;
   }
 
-  char16_t* deviceName;
-  char16_t* driverName;
+  nsAutoString deviceName;
+  nsAutoString driverName;
 
-  psWin->GetDeviceName(&deviceName);
-  psWin->GetDriverName(&driverName);
+  psWin->GetDeviceName(deviceName);
+  psWin->GetDriverName(driverName);
 
   data->deviceName().Assign(deviceName);
   data->driverName().Assign(driverName);
 
-  free(deviceName);
-  free(driverName);
-
   // When creating the print dialog on Windows, we only need to send certain
   // print settings information from the parent to the child not vice versa.
   if (XRE_IsParentProcess()) {
     psWin->GetPrintableWidthInInches(&data->printableWidthInInches());
     psWin->GetPrintableHeightInInches(&data->printableHeightInInches());
 
     // A DEVMODE can actually be of arbitrary size. If it turns out that it'll
     // make our IPC message larger than the limit, then we'll error out.
@@ -112,18 +109,18 @@ nsPrintOptionsWin::DeserializeToPrintSet
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIPrintSettingsWin> psWin = do_QueryInterface(settings);
   if (!settings) {
     return NS_ERROR_FAILURE;
   }
 
   if (XRE_IsContentProcess()) {
-    psWin->SetDeviceName(data.deviceName().get());
-    psWin->SetDriverName(data.driverName().get());
+    psWin->SetDeviceName(data.deviceName());
+    psWin->SetDriverName(data.driverName());
 
     psWin->SetPrintableWidthInInches(data.printableWidthInInches());
     psWin->SetPrintableHeightInInches(data.printableHeightInInches());
 
     if (data.devModeData().IsEmpty()) {
       psWin->SetDevMode(nullptr);
     } else {
       // Check minimum length of DEVMODE data.
--- a/widget/windows/nsPrintSettingsWin.cpp
+++ b/widget/windows/nsPrintSettingsWin.cpp
@@ -149,62 +149,50 @@ nsPrintSettingsWin::nsPrintSettingsWin()
 {
 
 }
 
 /** ---------------------------------------------------
  *  See documentation in nsPrintSettingsWin.h
  *	@update 
  */
-nsPrintSettingsWin::nsPrintSettingsWin(const nsPrintSettingsWin& aPS) :
-  mDeviceName(nullptr),
-  mDriverName(nullptr),
-  mDevMode(nullptr)
+nsPrintSettingsWin::nsPrintSettingsWin(const nsPrintSettingsWin& aPS)
+  : mDevMode(nullptr)
 {
   *this = aPS;
 }
 
 /** ---------------------------------------------------
  *  See documentation in nsPrintSettingsWin.h
  *	@update 
  */
 nsPrintSettingsWin::~nsPrintSettingsWin()
 {
-  if (mDeviceName) free(mDeviceName);
-  if (mDriverName) free(mDriverName);
   if (mDevMode) ::HeapFree(::GetProcessHeap(), 0, mDevMode);
 }
 
-NS_IMETHODIMP nsPrintSettingsWin::SetDeviceName(const char16_t * aDeviceName)
+NS_IMETHODIMP nsPrintSettingsWin::SetDeviceName(const nsAString& aDeviceName)
 {
-  if (mDeviceName) {
-    free(mDeviceName);
-  }
-  mDeviceName = aDeviceName?wcsdup(char16ptr_t(aDeviceName)):nullptr;
+  mDeviceName = aDeviceName;
   return NS_OK;
 }
-NS_IMETHODIMP nsPrintSettingsWin::GetDeviceName(char16_t **aDeviceName)
+NS_IMETHODIMP nsPrintSettingsWin::GetDeviceName(nsAString& aDeviceName)
 {
-  NS_ENSURE_ARG_POINTER(aDeviceName);
-  *aDeviceName = mDeviceName?reinterpret_cast<char16_t*>(wcsdup(mDeviceName)):nullptr;
+  aDeviceName = mDeviceName;
   return NS_OK;
 }
 
-NS_IMETHODIMP nsPrintSettingsWin::SetDriverName(const char16_t * aDriverName)
+NS_IMETHODIMP nsPrintSettingsWin::SetDriverName(const nsAString& aDriverName)
 {
-  if (mDriverName) {
-    free(mDriverName);
-  }
-  mDriverName = aDriverName?wcsdup(char16ptr_t(aDriverName)):nullptr;
+  mDriverName = aDriverName;
   return NS_OK;
 }
-NS_IMETHODIMP nsPrintSettingsWin::GetDriverName(char16_t **aDriverName)
+NS_IMETHODIMP nsPrintSettingsWin::GetDriverName(nsAString& aDriverName)
 {
-  NS_ENSURE_ARG_POINTER(aDriverName);
-  *aDriverName = mDriverName?reinterpret_cast<char16_t*>(wcsdup(mDriverName)):nullptr;
+  aDriverName = mDriverName;
   return NS_OK;
 }
 
 void nsPrintSettingsWin::CopyDevMode(DEVMODEW* aInDevMode, DEVMODEW *& aOutDevMode)
 {
   aOutDevMode = nullptr;
   size_t size = aInDevMode->dmSize + aInDevMode->dmDriverExtra;
   aOutDevMode = (LPDEVMODEW)::HeapAlloc (::GetProcessHeap(), HEAP_ZERO_MEMORY, size);
@@ -420,31 +408,23 @@ nsPrintSettingsWin::_Clone(nsIPrintSetti
 nsPrintSettingsWin& nsPrintSettingsWin::operator=(const nsPrintSettingsWin& rhs)
 {
   if (this == &rhs) {
     return *this;
   }
 
   ((nsPrintSettings&) *this) = rhs;
 
-  if (mDeviceName) {
-    free(mDeviceName);
-  }
-
-  if (mDriverName) {
-    free(mDriverName);
-  }
-
   // Use free because we used the native malloc to create the memory
   if (mDevMode) {
     ::HeapFree(::GetProcessHeap(), 0, mDevMode);
   }
 
-  mDeviceName = rhs.mDeviceName?wcsdup(rhs.mDeviceName):nullptr;
-  mDriverName = rhs.mDriverName?wcsdup(rhs.mDriverName):nullptr;
+  mDeviceName = rhs.mDeviceName;
+  mDriverName = rhs.mDriverName;
 
   if (rhs.mDevMode) {
     CopyDevMode(rhs.mDevMode, mDevMode);
   } else {
     mDevMode = nullptr;
   }
 
   return *this;
--- a/widget/windows/nsPrintSettingsWin.h
+++ b/widget/windows/nsPrintSettingsWin.h
@@ -42,18 +42,18 @@ public:
    */
   nsPrintSettingsWin& operator=(const nsPrintSettingsWin& rhs);
 
   NS_IMETHOD GetEffectivePageSize(double *aWidth, double *aHeight) override;
 
 protected:
   void CopyDevMode(DEVMODEW* aInDevMode, DEVMODEW *& aOutDevMode);
 
-  wchar_t*      mDeviceName;
-  wchar_t*      mDriverName;
+  nsString      mDeviceName;
+  nsString      mDriverName;
   LPDEVMODEW mDevMode;
   double mPrintableWidthInInches = 0l;
   double mPrintableHeightInInches = 0l;
 };
 
 
 
 #endif /* nsPrintSettingsWin_h__ */
--- a/xpcom/ds/nsAtom.h
+++ b/xpcom/ds/nsAtom.h
@@ -62,17 +62,20 @@ public:
 
   nsStringBuffer* GetStringBuffer() const
   {
     // See the comment on |mString|'s declaration.
     return nsStringBuffer::FromData(mString);
   }
 
   // A hashcode that is better distributed than the actual atom pointer, for
-  // use in situations that need a well-distributed hashcode.
+  // use in situations that need a well-distributed hashcode. It's called hash()
+  // rather than Hash() so we can use mozilla::BloomFilter<N, nsAtom>, because
+  // BloomFilter requires elements to implement a function called hash().
+  //
   uint32_t hash() const
   {
     MOZ_ASSERT(!IsHTML5Atom());
     return mHash;
   }
 
   // We can't use NS_INLINE_DECL_THREADSAFE_REFCOUNTING because the refcounting
   // of this type is special.
--- a/xpcom/ds/nsAtomTable.cpp
+++ b/xpcom/ds/nsAtomTable.cpp
@@ -133,68 +133,67 @@ private:
 };
 
 UniquePtr<nsTArray<FakeBufferRefcountHelper>> gFakeBuffers;
 #endif
 
 // This constructor is for dynamic atoms and HTML5 atoms.
 nsAtom::nsAtom(AtomKind aKind, const nsAString& aString, uint32_t aHash)
   : mRefCnt(1)
+  , mLength(aString.Length())
+  , mKind(static_cast<uint32_t>(aKind))
+  , mHash(aHash)
 {
-  mLength = aString.Length();
-  SetKind(aKind);
-  MOZ_ASSERT(IsDynamicAtom() || IsHTML5Atom());
+  MOZ_ASSERT(aKind == AtomKind::DynamicAtom || aKind == AtomKind::HTML5Atom);
   RefPtr<nsStringBuffer> buf = nsStringBuffer::FromString(aString);
   if (buf) {
     mString = static_cast<char16_t*>(buf->Data());
   } else {
     const size_t size = (mLength + 1) * sizeof(char16_t);
     buf = nsStringBuffer::Alloc(size);
     if (MOZ_UNLIKELY(!buf)) {
       // We OOM because atom allocations should be small and it's hard to
       // handle them more gracefully in a constructor.
       NS_ABORT_OOM(size);
     }
     mString = static_cast<char16_t*>(buf->Data());
     CopyUnicodeTo(aString, 0, mString, mLength);
     mString[mLength] = char16_t(0);
   }
 
-  mHash = aHash;
   MOZ_ASSERT_IF(IsDynamicAtom(), mHash == HashString(mString, mLength));
 
-  NS_ASSERTION(mString[mLength] == char16_t(0), "null terminated");
-  NS_ASSERTION(buf && buf->StorageSize() >= (mLength + 1) * sizeof(char16_t),
-               "enough storage");
-  NS_ASSERTION(Equals(aString), "correct data");
+  MOZ_ASSERT(mString[mLength] == char16_t(0), "null terminated");
+  MOZ_ASSERT(buf && buf->StorageSize() >= (mLength + 1) * sizeof(char16_t),
+             "enough storage");
+  MOZ_ASSERT(Equals(aString), "correct data");
 
   // Take ownership of buffer
   mozilla::Unused << buf.forget();
 }
 
 // This constructor is for static atoms.
 nsAtom::nsAtom(nsStringBuffer* aStringBuffer, uint32_t aLength, uint32_t aHash)
+  : mLength(aLength)
+  , mKind(static_cast<uint32_t>(AtomKind::StaticAtom))
+  , mHash(aHash)
+  , mString(static_cast<char16_t*>(aStringBuffer->Data()))
 {
-  mLength = aLength;
-  SetKind(AtomKind::StaticAtom);
-  mString = static_cast<char16_t*>(aStringBuffer->Data());
-
 #if defined(NS_BUILD_REFCNT_LOGGING)
   MOZ_ASSERT(NS_IsMainThread());
   if (!gFakeBuffers) {
     gFakeBuffers = MakeUnique<nsTArray<FakeBufferRefcountHelper>>();
   }
   gFakeBuffers->AppendElement(aStringBuffer);
 #endif
 
   // Technically we could currently avoid doing this addref by instead making
   // the static atom buffers have an initial refcount of 2.
   aStringBuffer->AddRef();
 
-  mHash = aHash;
   MOZ_ASSERT(mHash == HashString(mString, mLength));
 
   MOZ_ASSERT(mString[mLength] == char16_t(0), "null terminated");
   MOZ_ASSERT(aStringBuffer &&
              aStringBuffer->StorageSize() == (mLength + 1) * sizeof(char16_t),
              "correct storage");
 }