Bug 1561435 - Format browser/modules/, a=automatic-formatting
authorVictor Porof <vporof@mozilla.com>
Fri, 05 Jul 2019 09:55:19 +0200
changeset 481369 e8225f3e114bf1fc01f9e574cc41eb2df4e314c6
parent 481368 39b4804c504ce6b71e92aad9d8e934e1a5577b8d
child 481370 c577840a8063252f29870121b2ce8e01240db032
push id36243
push uservporof@mozilla.com
push dateFri, 05 Jul 2019 14:04:25 +0000
treeherdermozilla-central@041abaa4aa85 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatic-formatting
bugs1561435
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1561435 - Format browser/modules/, a=automatic-formatting # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D36046
browser/modules/AboutNewTab.jsm
browser/modules/AsanReporter.jsm
browser/modules/AsyncTabSwitcher.jsm
browser/modules/BrowserUsageTelemetry.jsm
browser/modules/BrowserWindowTracker.jsm
browser/modules/ContentClick.jsm
browser/modules/ContentCrashHandlers.jsm
browser/modules/ContentMetaHandler.jsm
browser/modules/ContentObservers.js
browser/modules/ContentSearch.jsm
browser/modules/Discovery.jsm
browser/modules/EveryWindow.jsm
browser/modules/ExtensionsUI.jsm
browser/modules/FaviconLoader.jsm
browser/modules/FormValidationHandler.jsm
browser/modules/HomePage.jsm
browser/modules/LaterRun.jsm
browser/modules/LiveBookmarkMigrator.jsm
browser/modules/NewTabPagePreloading.jsm
browser/modules/OpenInTabsUtils.jsm
browser/modules/PageActions.jsm
browser/modules/PermissionUI.jsm
browser/modules/PermissionUITelemetry.jsm
browser/modules/PingCentre.jsm
browser/modules/ProcessHangMonitor.jsm
browser/modules/ReaderParent.jsm
browser/modules/RemotePrompt.jsm
browser/modules/Sanitizer.jsm
browser/modules/SiteDataManager.jsm
browser/modules/SitePermissions.jsm
browser/modules/TabUnloader.jsm
browser/modules/TabsList.jsm
browser/modules/ThemeVariableMap.jsm
browser/modules/TransientPrefs.jsm
browser/modules/Windows8WindowFrameColor.jsm
browser/modules/WindowsJumpLists.jsm
browser/modules/WindowsPreviewPerTab.jsm
browser/modules/ZoomUI.jsm
browser/modules/test/browser/browser_BrowserWindowTracker.js
browser/modules/test/browser/browser_ContentSearch.js
browser/modules/test/browser/browser_EveryWindow.js
browser/modules/test/browser/browser_LiveBookmarkMigrator.js
browser/modules/test/browser/browser_PageActions.js
browser/modules/test/browser/browser_PermissionUI.js
browser/modules/test/browser/browser_PermissionUI_prompts.js
browser/modules/test/browser/browser_ProcessHangNotifications.js
browser/modules/test/browser/browser_SitePermissions.js
browser/modules/test/browser/browser_SitePermissions_combinations.js
browser/modules/test/browser/browser_SitePermissions_expiry.js
browser/modules/test/browser/browser_SitePermissions_tab_urls.js
browser/modules/test/browser/browser_TabUnloader.js
browser/modules/test/browser/browser_UnsubmittedCrashHandler.js
browser/modules/test/browser/browser_UsageTelemetry.js
browser/modules/test/browser/browser_UsageTelemetry_content.js
browser/modules/test/browser/browser_UsageTelemetry_content_aboutHome.js
browser/modules/test/browser/browser_UsageTelemetry_content_aboutRestartRequired.js
browser/modules/test/browser/browser_UsageTelemetry_domains.js
browser/modules/test/browser/browser_UsageTelemetry_private_and_restore.js
browser/modules/test/browser/browser_UsageTelemetry_searchbar.js
browser/modules/test/browser/browser_UsageTelemetry_uniqueOriginsVisitedInPast24Hours.js
browser/modules/test/browser/browser_UsageTelemetry_urlbar.js
browser/modules/test/browser/browser_UsageTelemetry_urlbar_extension.js
browser/modules/test/browser/browser_UsageTelemetry_urlbar_places.js
browser/modules/test/browser/browser_UsageTelemetry_urlbar_remotetab.js
browser/modules/test/browser/browser_preloading_tab_moving.js
browser/modules/test/browser/browser_taskbar_preview.js
browser/modules/test/browser/browser_urlBar_zoom.js
browser/modules/test/browser/formValidation/browser_form_validation.js
browser/modules/test/browser/formValidation/browser_validation_iframe.js
browser/modules/test/browser/formValidation/browser_validation_invisible.js
browser/modules/test/browser/head.js
browser/modules/test/unit/test_E10SUtils_nested_URIs.js
browser/modules/test/unit/test_HomePage.js
browser/modules/test/unit/test_LaterRun.js
browser/modules/test/unit/test_LiveBookmarkMigrator.js
browser/modules/test/unit/test_Sanitizer_interrupted.js
browser/modules/test/unit/test_SiteDataManager.js
browser/modules/test/unit/test_SitePermissions.js
browser/modules/test/unit/test_discovery.js
browser/modules/webrtcUI.jsm
--- a/browser/modules/AboutNewTab.jsm
+++ b/browser/modules/AboutNewTab.jsm
@@ -1,28 +1,34 @@
 /* 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/. */
 
 "use strict";
 
-var EXPORTED_SYMBOLS = [ "AboutNewTab" ];
+var EXPORTED_SYMBOLS = ["AboutNewTab"];
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   ActivityStream: "resource://activity-stream/lib/ActivityStream.jsm",
-  RemotePages: "resource://gre/modules/remotepagemanager/RemotePageManagerParent.jsm",
+  RemotePages:
+    "resource://gre/modules/remotepagemanager/RemotePageManagerParent.jsm",
 });
 
 const BROWSER_READY_NOTIFICATION = "sessionstore-windows-restored";
 
 var AboutNewTab = {
-  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([
+    Ci.nsIObserver,
+    Ci.nsISupportsWeakReference,
+  ]),
 
   // AboutNewTab
 
   pageListener: null,
 
   isOverridden: false,
 
   activityStream: null,
@@ -43,25 +49,27 @@ var AboutNewTab = {
 
     // Since `init` can be called via `reset` at a later time with an existing
     // pageListener, we want to only add the observer if we are initializing
     // without this pageListener argument. This means it was the first call to `init`
     if (!pageListener) {
       Services.obs.addObserver(this, BROWSER_READY_NOTIFICATION);
     }
 
-    this.pageListener = pageListener || new RemotePages(["about:home", "about:newtab", "about:welcome"]);
+    this.pageListener =
+      pageListener ||
+      new RemotePages(["about:home", "about:newtab", "about:welcome"]);
   },
 
   /**
    * onBrowserReady - Continues the initialization of Activity Stream after browser is ready.
    */
   onBrowserReady() {
     if (this.activityStream && this.activityStream.initialized) {
-       return;
+      return;
     }
 
     this.activityStream = new ActivityStream();
     try {
       this.activityStream.init();
     } catch (e) {
       Cu.reportError(e);
     }
@@ -81,18 +89,19 @@ var AboutNewTab = {
       this.pageListener.destroy();
       this.pageListener = null;
     }
   },
 
   override(shouldPassPageListener) {
     this.isOverridden = true;
     const pageListener = this.pageListener;
-    if (!pageListener)
+    if (!pageListener) {
       return null;
+    }
     if (shouldPassPageListener) {
       this.pageListener = null;
       return pageListener;
     }
     this.uninit();
     return null;
   },
 
--- a/browser/modules/AsanReporter.jsm
+++ b/browser/modules/AsanReporter.jsm
@@ -1,16 +1,18 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 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/. */
 
 this.EXPORTED_SYMBOLS = ["AsanReporter"];
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   AppConstants: "resource://gre/modules/AppConstants.jsm",
   Log: "resource://gre/modules/Log.jsm",
   OS: "resource://gre/modules/osfile.jsm",
   Services: "resource://gre/modules/Services.jsm",
 });
 
@@ -28,18 +30,19 @@ let logger;
 
 XPCOMUtils.defineLazyGetter(this, "asanDumpDir", () => {
   let profileDir = Services.dirsvc.get("ProfD", Ci.nsIFile);
   return OS.Path.join(profileDir.path, "asan");
 });
 
 this.AsanReporter = {
   init() {
-    if (this.initialized)
+    if (this.initialized) {
       return;
+    }
     this.initialized = true;
 
     // Setup logging
     logger = Log.repository.getLogger(LOGGER_NAME);
     logger.addAppender(new Log.ConsoleAppender(new Log.BasicFormatter()));
     logger.addAppender(new Log.DumpAppender(new Log.BasicFormatter()));
     logger.level = Services.prefs.getIntPref(PREF_LOG_LEVEL, Log.Level.Info);
 
@@ -49,137 +52,146 @@ this.AsanReporter = {
     // after they happen instead of relying on the user to restart the browser.
     Services.obs.addObserver(this, "ipc:content-shutdown");
 
     processDirectory();
   },
 
   observe(aSubject, aTopic, aData) {
     if (aTopic == "ipc:content-shutdown") {
-        aSubject.QueryInterface(Ci.nsIPropertyBag2);
-        if (!aSubject.get("abnormal")) {
-          return;
-        }
-        processDirectory();
+      aSubject.QueryInterface(Ci.nsIPropertyBag2);
+      if (!aSubject.get("abnormal")) {
+        return;
+      }
+      processDirectory();
     }
   },
 };
 
 function processDirectory() {
   let iterator = new OS.File.DirectoryIterator(asanDumpDir);
   let results = [];
 
   // Scan the directory for any ASan logs that we haven't
   // submitted yet. Store the filenames in an array so we
   // can close the iterator early.
-  iterator.forEach(
-    (entry) => {
-      if (entry.name.indexOf("ff_asan_log.") == 0
-        && !entry.name.includes("submitted")) {
+  iterator
+    .forEach(entry => {
+      if (
+        entry.name.indexOf("ff_asan_log.") == 0 &&
+        !entry.name.includes("submitted")
+      ) {
         results.push(entry);
       }
-    }
-  ).then(
-    () => {
-      iterator.close();
-      logger.info("Processing " + results.length + " reports...");
+    })
+    .then(
+      () => {
+        iterator.close();
+        logger.info("Processing " + results.length + " reports...");
 
-      // Sequentially submit all reports that we found. Note that doing this
-      // with Promise.all would not result in a sequential ordering and would
-      // cause multiple requests to be sent to the server at once.
-      let requests = Promise.resolve();
-      results.forEach(
-        (result) => {
+        // Sequentially submit all reports that we found. Note that doing this
+        // with Promise.all would not result in a sequential ordering and would
+        // cause multiple requests to be sent to the server at once.
+        let requests = Promise.resolve();
+        results.forEach(result => {
           requests = requests.then(
             // We return a promise here that already handles any submit failures
             // so our chain is not interrupted if one of the reports couldn't
             // be submitted for some reason.
-            () => submitReport(result.path).then(
-              () => { logger.info("Successfully submitted " + result.path); },
-              (e) => { logger.error("Failed to submit " + result.path + ". Reason: " + e); },
-            )
+            () =>
+              submitReport(result.path).then(
+                () => {
+                  logger.info("Successfully submitted " + result.path);
+                },
+                e => {
+                  logger.error(
+                    "Failed to submit " + result.path + ". Reason: " + e
+                  );
+                }
+              )
           );
-        }
-      );
+        });
 
-      requests.then(() => logger.info("Done processing reports."));
-    },
-    (e) => {
-      iterator.close();
-      logger.error("Error while iterating over report files: " + e);
-    }
-  );
+        requests.then(() => logger.info("Done processing reports."));
+      },
+      e => {
+        iterator.close();
+        logger.error("Error while iterating over report files: " + e);
+      }
+    );
 }
 
 function submitReport(reportFile) {
   logger.info("Processing " + reportFile);
-  return OS.File.read(reportFile).then(submitToServer).then(
-    () => {
+  return OS.File.read(reportFile)
+    .then(submitToServer)
+    .then(() => {
       // Mark as submitted only if we successfully submitted it to the server.
       return OS.File.move(reportFile, reportFile + ".submitted");
-    }
-  );
+    });
 }
 
 function submitToServer(data) {
   return new Promise(function(resolve, reject) {
-      logger.debug("Setting up XHR request");
-      let client = Services.prefs.getStringPref(PREF_CLIENT_ID);
-      let api_url = Services.prefs.getStringPref(PREF_API_URL);
-      let auth_token = Services.prefs.getStringPref(PREF_AUTH_TOKEN, null);
+    logger.debug("Setting up XHR request");
+    let client = Services.prefs.getStringPref(PREF_CLIENT_ID);
+    let api_url = Services.prefs.getStringPref(PREF_API_URL);
+    let auth_token = Services.prefs.getStringPref(PREF_AUTH_TOKEN, null);
 
-      let decoder = new TextDecoder();
+    let decoder = new TextDecoder();
 
-      if (!client) {
-        client = "unknown";
-      }
+    if (!client) {
+      client = "unknown";
+    }
 
-      let versionArr = [
-        Services.appinfo.version,
-        Services.appinfo.appBuildID,
-        (AppConstants.SOURCE_REVISION_URL || "unknown"),
-      ];
+    let versionArr = [
+      Services.appinfo.version,
+      Services.appinfo.appBuildID,
+      AppConstants.SOURCE_REVISION_URL || "unknown",
+    ];
 
-      // Concatenate all relevant information as our server only
-      // has one field available for version information.
-      let product_version = versionArr.join("-");
-      let os = AppConstants.platform;
+    // Concatenate all relevant information as our server only
+    // has one field available for version information.
+    let product_version = versionArr.join("-");
+    let os = AppConstants.platform;
 
-      let reportObj = {
-        rawStdout: "",
-        rawStderr: "",
-        rawCrashData: decoder.decode(data),
-        // Hardcode platform as there is no other reasonable platform for ASan
-        platform: "x86-64",
-        product: "mozilla-central-asan-nightly",
-        product_version,
-        os,
-        client,
-        tool: "asan-nightly-program",
-      };
+    let reportObj = {
+      rawStdout: "",
+      rawStderr: "",
+      rawCrashData: decoder.decode(data),
+      // Hardcode platform as there is no other reasonable platform for ASan
+      platform: "x86-64",
+      product: "mozilla-central-asan-nightly",
+      product_version,
+      os,
+      client,
+      tool: "asan-nightly-program",
+    };
 
-      var xhr = new XMLHttpRequest();
-      xhr.open("POST", api_url, true);
-      xhr.setRequestHeader("Content-Type", "application/json");
+    var xhr = new XMLHttpRequest();
+    xhr.open("POST", api_url, true);
+    xhr.setRequestHeader("Content-Type", "application/json");
 
-      // For internal testing purposes, an auth_token can be specified
-      if (auth_token) {
-        xhr.setRequestHeader("Authorization", "Token " + auth_token);
-      } else {
-        // Prevent privacy leaks
-        xhr.channel.loadFlags |= Ci.nsIRequest.LOAD_ANONYMOUS;
-      }
+    // For internal testing purposes, an auth_token can be specified
+    if (auth_token) {
+      xhr.setRequestHeader("Authorization", "Token " + auth_token);
+    } else {
+      // Prevent privacy leaks
+      xhr.channel.loadFlags |= Ci.nsIRequest.LOAD_ANONYMOUS;
+    }
 
-      xhr.onreadystatechange = function() {
-        if (xhr.readyState == 4) {
-          if (xhr.status == "201") {
-            logger.debug("XHR: OK");
-            resolve(xhr);
-          } else {
-            logger.debug("XHR: Status: " + xhr.status + " Response: " + xhr.responseText);
-            reject(xhr);
-          }
+    xhr.onreadystatechange = function() {
+      if (xhr.readyState == 4) {
+        if (xhr.status == "201") {
+          logger.debug("XHR: OK");
+          resolve(xhr);
+        } else {
+          logger.debug(
+            "XHR: Status: " + xhr.status + " Response: " + xhr.responseText
+          );
+          reject(xhr);
         }
-      };
+      }
+    };
 
-      xhr.send(JSON.stringify(reportObj));
+    xhr.send(JSON.stringify(reportObj));
   });
 }
--- a/browser/modules/AsyncTabSwitcher.jsm
+++ b/browser/modules/AsyncTabSwitcher.jsm
@@ -2,30 +2,44 @@
  * 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/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["AsyncTabSwitcher"];
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 XPCOMUtils.defineLazyModuleGetters(this, {
   AppConstants: "resource://gre/modules/AppConstants.jsm",
   Services: "resource://gre/modules/Services.jsm",
 });
 
-XPCOMUtils.defineLazyPreferenceGetter(this, "gTabWarmingEnabled",
-  "browser.tabs.remote.warmup.enabled");
-XPCOMUtils.defineLazyPreferenceGetter(this, "gTabWarmingMax",
-  "browser.tabs.remote.warmup.maxTabs");
-XPCOMUtils.defineLazyPreferenceGetter(this, "gTabWarmingUnloadDelayMs",
-  "browser.tabs.remote.warmup.unloadDelayMs");
-XPCOMUtils.defineLazyPreferenceGetter(this, "gTabCacheSize",
-  "browser.tabs.remote.tabCacheSize");
+XPCOMUtils.defineLazyPreferenceGetter(
+  this,
+  "gTabWarmingEnabled",
+  "browser.tabs.remote.warmup.enabled"
+);
+XPCOMUtils.defineLazyPreferenceGetter(
+  this,
+  "gTabWarmingMax",
+  "browser.tabs.remote.warmup.maxTabs"
+);
+XPCOMUtils.defineLazyPreferenceGetter(
+  this,
+  "gTabWarmingUnloadDelayMs",
+  "browser.tabs.remote.warmup.unloadDelayMs"
+);
+XPCOMUtils.defineLazyPreferenceGetter(
+  this,
+  "gTabCacheSize",
+  "browser.tabs.remote.tabCacheSize"
+);
 
 /**
  * The tab switcher is responsible for asynchronously switching
  * tabs in e10s. It waits until the new tab is ready (i.e., the
  * layer tree is available) before switching to it. Then it
  * unloads the layer tree for the old tab.
  *
  * The tab switcher is a state machine. For each tab, it
@@ -143,34 +157,36 @@ class AsyncTabSwitcher {
     this.window.addEventListener("sizemodechange", this);
     this.window.addEventListener("occlusionstatechange", this);
     this.window.addEventListener("SwapDocShells", this, true);
     this.window.addEventListener("EndSwapDocShells", this, true);
 
     let initialTab = this.requestedTab;
     let initialBrowser = initialTab.linkedBrowser;
 
-    let tabIsLoaded = !initialBrowser.isRemoteBrowser ||
+    let tabIsLoaded =
+      !initialBrowser.isRemoteBrowser ||
       initialBrowser.frameLoader.remoteTab.hasLayers;
 
     // If we minimized the window before the switcher was activated,
     // we might have set  the preserveLayers flag for the current
     // browser. Let's clear it.
     initialBrowser.preserveLayers(false);
 
     if (!this.minimizedOrFullyOccluded) {
       this.log("Initial tab is loaded?: " + tabIsLoaded);
-      this.setTabState(initialTab, tabIsLoaded ? this.STATE_LOADED
-                                               : this.STATE_LOADING);
+      this.setTabState(
+        initialTab,
+        tabIsLoaded ? this.STATE_LOADED : this.STATE_LOADING
+      );
     }
 
     for (let ppBrowser of this.tabbrowser._printPreviewBrowsers) {
       let ppTab = this.tabbrowser.getTabForBrowser(ppBrowser);
-      let state = ppBrowser.hasLayers ? this.STATE_LOADED
-                                      : this.STATE_LOADING;
+      let state = ppBrowser.hasLayers ? this.STATE_LOADED : this.STATE_LOADING;
       this.setTabState(ppTab, state);
     }
   }
 
   destroy() {
     if (this.unloadTimer) {
       this.clearTimer(this.unloadTimer);
       this.unloadTimer = null;
@@ -195,18 +211,17 @@ class AsyncTabSwitcher {
   // Wraps nsITimer. Must not use the vanilla setTimeout and
   // clearTimeout, because they will be blocked by nsIPromptService
   // dialogs.
   setTimer(callback, timeout) {
     let event = {
       notify: callback,
     };
 
-    var timer = Cc["@mozilla.org/timer;1"]
-      .createInstance(Ci.nsITimer);
+    var timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     timer.initWithCallback(event, timeout, Ci.nsITimer.TYPE_ONE_SHOT);
     return timer;
   }
 
   clearTimer(timer) {
     timer.cancel();
   }
 
@@ -283,42 +298,48 @@ class AsyncTabSwitcher {
       // setTabState is potentially re-entrant in the non-remote case,
       // so we must re-get the state for this assertion.
       let nonRemoteState = this.getTabState(tab);
       // Non-remote tabs can never stay in the STATE_LOADING
       // or STATE_UNLOADING states. By the time this function
       // exits, a non-remote tab must be in STATE_LOADED or
       // STATE_UNLOADED, since the painting and the layer
       // upload happen synchronously.
-      this.assert(nonRemoteState == this.STATE_UNLOADED ||
-        nonRemoteState == this.STATE_LOADED);
+      this.assert(
+        nonRemoteState == this.STATE_UNLOADED ||
+          nonRemoteState == this.STATE_LOADED
+      );
     }
   }
 
   get minimizedOrFullyOccluded() {
-    return this.window.windowState == this.window.STATE_MINIMIZED ||
-           this.window.isFullyOccluded;
+    return (
+      this.window.windowState == this.window.STATE_MINIMIZED ||
+      this.window.isFullyOccluded
+    );
   }
 
   get tabLayerCache() {
     return this.tabbrowser._tabLayerCache;
   }
 
   finish() {
     this.log("FINISH");
 
     this.assert(this.tabbrowser._switcher);
     this.assert(this.tabbrowser._switcher === this);
     this.assert(!this.spinnerTab);
     this.assert(!this.blankTab);
     this.assert(!this.loadTimer);
     this.assert(!this.loadingTab);
     this.assert(this.lastVisibleTab === this.requestedTab);
-    this.assert(this.minimizedOrFullyOccluded ||
-      this.getTabState(this.requestedTab) == this.STATE_LOADED);
+    this.assert(
+      this.minimizedOrFullyOccluded ||
+        this.getTabState(this.requestedTab) == this.STATE_LOADED
+    );
 
     this.destroy();
 
     this.window.document.commandDispatcher.unlock();
 
     let event = new this.window.CustomEvent("TabSwitchDone", {
       bubbles: true,
       cancelable: true,
@@ -346,32 +367,38 @@ class AsyncTabSwitcher {
       // 1. The tab has just crashed, and we haven't started showing the
       //    tab crashed page yet (in this case, the RemoteTab is null)
       // 2. The tab has never presented, and has not finished loading
       //    a non-local-about: page.
       //
       // For (2), "finished loading a non-local-about: page" is
       // determined by the busy state on the tab element and checking
       // if the loaded URI is local.
-      let hasSufficientlyLoaded = !this.requestedTab.hasAttribute("busy") &&
+      let hasSufficientlyLoaded =
+        !this.requestedTab.hasAttribute("busy") &&
         !this.tabbrowser.isLocalAboutURI(requestedBrowser.currentURI);
 
       let fl = requestedBrowser.frameLoader;
-      shouldBeBlank = !this.minimizedOrFullyOccluded &&
+      shouldBeBlank =
+        !this.minimizedOrFullyOccluded &&
         (!fl.remoteTab ||
           (!hasSufficientlyLoaded && !fl.remoteTab.hasPresented));
     }
 
     this.log("Tab should be blank: " + shouldBeBlank);
     this.log("Requested tab is remote?: " + requestedBrowser.isRemoteBrowser);
 
     // Figure out which tab we actually want visible right now.
     let showTab = null;
-    if (requestedTabState != this.STATE_LOADED &&
-        this.lastVisibleTab && this.loadTimer && !shouldBeBlank) {
+    if (
+      requestedTabState != this.STATE_LOADED &&
+      this.lastVisibleTab &&
+      this.loadTimer &&
+      !shouldBeBlank
+    ) {
       // If we can't show the requestedTab, and lastVisibleTab is
       // available, show it.
       showTab = this.lastVisibleTab;
     } else {
       // Show the requested tab. If it's not available, we'll show the spinner or a blank tab.
       showTab = this.requestedTab;
     }
 
@@ -385,19 +412,20 @@ class AsyncTabSwitcher {
       if (this.blankTab) {
         this.blankTab.linkedBrowser.removeAttribute("blank");
       }
       this.blankTab = showTab;
       this.blankTab.linkedBrowser.setAttribute("blank", "true");
     }
 
     // Show or hide the spinner as needed.
-    let needSpinner = this.getTabState(showTab) != this.STATE_LOADED &&
-                      !this.minimizedOrFullyOccluded &&
-                      !shouldBeBlank;
+    let needSpinner =
+      this.getTabState(showTab) != this.STATE_LOADED &&
+      !this.minimizedOrFullyOccluded &&
+      !shouldBeBlank;
 
     if (!needSpinner && this.spinnerTab) {
       this.spinnerHidden();
       this.tabbrowser.tabpanels.removeAttribute("pendingpaint");
       this.spinnerTab.linkedBrowser.removeAttribute("pendingpaint");
       this.spinnerTab = null;
     } else if (needSpinner && this.spinnerTab !== showTab) {
       if (this.spinnerTab) {
@@ -429,27 +457,31 @@ class AsyncTabSwitcher {
             // transaction id for that, and we'll mark when we get notified of its
             // completion.
             this.switchPaintId = this.window.windowUtils.lastTransactionId + 1;
           } else {
             // We're making the tab visible even though we haven't yet got layers for it.
             // It's hard to know which composite the layers will first be available in (and
             // the parent process might not even get MozAfterPaint delivered for it), so just
             // give up measuring this for now. :(
-            TelemetryStopwatch.cancel("FX_TAB_SWITCH_COMPOSITE_E10S_MS", this.window);
+            TelemetryStopwatch.cancel(
+              "FX_TAB_SWITCH_COMPOSITE_E10S_MS",
+              this.window
+            );
           }
 
           this.tabbrowser._adjustFocusAfterTabSwitch(showTab);
           this.maybeActivateDocShell(this.requestedTab);
         }
       }
 
       // This doesn't necessarily exist if we're a new window and haven't switched tabs yet
-      if (this.lastVisibleTab)
+      if (this.lastVisibleTab) {
         this.lastVisibleTab._visuallySelected = false;
+      }
 
       this.visibleTab._visuallySelected = true;
       this.tabbrowser.tabContainer._setPositionalAttributes();
     }
 
     this.lastVisibleTab = this.visibleTab;
   }
 
@@ -470,46 +502,53 @@ class AsyncTabSwitcher {
       this.loadingTab = null;
       if (this.loadTimer) {
         this.clearTimer(this.loadTimer);
         this.loadTimer = null;
       }
     }
   }
 
-
   // We've decided to try to load requestedTab.
   loadRequestedTab() {
     this.assert(!this.loadTimer);
     this.assert(!this.minimizedOrFullyOccluded);
 
     // loadingTab can be non-null here if we timed out loading the current tab.
     // In that case we just overwrite it with a different tab; it's had its chance.
     this.loadingTab = this.requestedTab;
     this.log("Loading tab " + this.tinfo(this.loadingTab));
 
-    this.loadTimer = this.setTimer(() => this.onLoadTimeout(), this.TAB_SWITCH_TIMEOUT);
+    this.loadTimer = this.setTimer(
+      () => this.onLoadTimeout(),
+      this.TAB_SWITCH_TIMEOUT
+    );
     this.setTabState(this.requestedTab, this.STATE_LOADING);
   }
 
   maybeActivateDocShell(tab) {
     // If we've reached the point where the requested tab has entered
     // the loaded state, but the DocShell is still not yet active, we
     // should activate it.
     let browser = tab.linkedBrowser;
     let state = this.getTabState(tab);
-    let canCheckDocShellState = !browser.mDestroyed &&
+    let canCheckDocShellState =
+      !browser.mDestroyed &&
       (browser.docShell || browser.frameLoader.remoteTab);
-    if (tab == this.requestedTab &&
-        canCheckDocShellState &&
-        state == this.STATE_LOADED &&
-        !browser.docShellIsActive &&
-        !this.minimizedOrFullyOccluded) {
+    if (
+      tab == this.requestedTab &&
+      canCheckDocShellState &&
+      state == this.STATE_LOADED &&
+      !browser.docShellIsActive &&
+      !this.minimizedOrFullyOccluded
+    ) {
       browser.docShellIsActive = true;
-      this.logState("Set requested tab docshell to active and preserveLayers to false");
+      this.logState(
+        "Set requested tab docshell to active and preserveLayers to false"
+      );
       // If we minimized the window before the switcher was activated,
       // we might have set the preserveLayers flag for the current
       // browser. Let's clear it.
       browser.preserveLayers(false);
     }
   }
 
   // This function runs before every event. It fixes up the state
@@ -522,17 +561,17 @@ class AsyncTabSwitcher {
       let tab = this.tabLayerCache[i];
       if (!tab.linkedBrowser) {
         this.tabState.delete(tab);
         this.tabLayerCache.splice(i, 1);
         i--;
       }
     }
 
-    for (let [tab ] of this.tabState) {
+    for (let [tab] of this.tabState) {
       if (!tab.linkedBrowser) {
         this.tabState.delete(tab);
         this.unwarmTab(tab);
       }
     }
 
     if (this.lastVisibleTab && !this.lastVisibleTab.linkedBrowser) {
       this.lastVisibleTab = null;
@@ -554,38 +593,43 @@ class AsyncTabSwitcher {
 
   // This code runs after we've responded to an event or requested a new
   // tab. It's expected that we've already updated all the principal
   // state variables. This function takes care of updating any auxilliary
   // state.
   postActions() {
     // Once we finish loading loadingTab, we null it out. So the state should
     // always be LOADING.
-    this.assert(!this.loadingTab ||
-      this.getTabState(this.loadingTab) == this.STATE_LOADING);
+    this.assert(
+      !this.loadingTab ||
+        this.getTabState(this.loadingTab) == this.STATE_LOADING
+    );
 
     // We guarantee that loadingTab is non-null iff loadTimer is non-null. So
     // the timer is set only when we're loading something.
     this.assert(!this.loadTimer || this.loadingTab);
     this.assert(!this.loadingTab || this.loadTimer);
 
     // If we're switching to a non-remote tab, there's no need to wait
     // for it to send layers to the compositor, as this will happen
     // synchronously. Clearing this here means that in the next step,
     // we can load the non-remote browser immediately.
     if (!this.requestedTab.linkedBrowser.isRemoteBrowser) {
       this.maybeClearLoadTimer("postActions");
     }
 
     // If we're not loading anything, try loading the requested tab.
     let stateOfRequestedTab = this.getTabState(this.requestedTab);
-    if (!this.loadTimer && !this.minimizedOrFullyOccluded &&
-        (stateOfRequestedTab == this.STATE_UNLOADED ||
+    if (
+      !this.loadTimer &&
+      !this.minimizedOrFullyOccluded &&
+      (stateOfRequestedTab == this.STATE_UNLOADED ||
         stateOfRequestedTab == this.STATE_UNLOADING ||
-        this.warmingTabs.has(this.requestedTab))) {
+        this.warmingTabs.has(this.requestedTab))
+    ) {
       this.assert(stateOfRequestedTab != this.STATE_LOADED);
       this.loadRequestedTab();
     }
 
     let numBackgroundCached = 0;
     for (let tab of this.tabLayerCache) {
       if (tab !== this.requestedTab) {
         numBackgroundCached++;
@@ -596,19 +640,21 @@ class AsyncTabSwitcher {
     let numPending = 0;
     let numWarming = 0;
     for (let [tab, state] of this.tabState) {
       // Skip print preview browsers since they shouldn't affect tab switching.
       if (this.tabbrowser._printPreviewBrowsers.has(tab.linkedBrowser)) {
         continue;
       }
 
-      if (state == this.STATE_LOADED &&
-          tab !== this.requestedTab &&
-          !this.tabLayerCache.includes(tab)) {
+      if (
+        state == this.STATE_LOADED &&
+        tab !== this.requestedTab &&
+        !this.tabLayerCache.includes(tab)
+      ) {
         numPending++;
 
         if (tab !== this.visibleTab) {
           numWarming++;
         }
       }
       if (state == this.STATE_LOADING || state == this.STATE_UNLOADING) {
         numPending++;
@@ -677,35 +723,42 @@ class AsyncTabSwitcher {
     // Unload any tabs that can be unloaded.
     for (let [tab, state] of this.tabState) {
       if (this.tabbrowser._printPreviewBrowsers.has(tab.linkedBrowser)) {
         continue;
       }
 
       let isInLayerCache = this.tabLayerCache.includes(tab);
 
-      if (state == this.STATE_LOADED &&
-          !this.maybeVisibleTabs.has(tab) &&
-          tab !== this.lastVisibleTab &&
-          tab !== this.loadingTab &&
-          tab !== this.requestedTab &&
-          !isInLayerCache) {
+      if (
+        state == this.STATE_LOADED &&
+        !this.maybeVisibleTabs.has(tab) &&
+        tab !== this.lastVisibleTab &&
+        tab !== this.loadingTab &&
+        tab !== this.requestedTab &&
+        !isInLayerCache
+      ) {
         this.setTabState(tab, this.STATE_UNLOADING);
       }
 
-      if (state != this.STATE_UNLOADED &&
-          tab !== this.requestedTab &&
-          !isInLayerCache) {
+      if (
+        state != this.STATE_UNLOADED &&
+        tab !== this.requestedTab &&
+        !isInLayerCache
+      ) {
         numPending++;
       }
     }
 
     if (numPending) {
       // Keep the timer going since there may be more tabs to unload.
-      this.unloadTimer = this.setTimer(() => this.onUnloadTimeout(), this.UNLOAD_DELAY);
+      this.unloadTimer = this.setTimer(
+        () => this.onUnloadTimeout(),
+        this.UNLOAD_DELAY
+      );
     }
   }
 
   // Fires when an ongoing load has taken too long.
   onLoadTimeout() {
     this.logState("onLoadTimeout");
     this.preActions();
     this.maybeClearLoadTimer("onLoadTimeout");
@@ -719,62 +772,78 @@ class AsyncTabSwitcher {
       // We probably got a layer update from a tab that got before
       // the switcher was created, or for browser that's not being
       // tracked by the async tab switcher (like the preloaded about:newtab).
       return;
     }
 
     this.logState(`onLayersReady(${tab._tPos}, ${browser.isRemoteBrowser})`);
 
-    this.assert(this.getTabState(tab) == this.STATE_LOADING ||
-      this.getTabState(tab) == this.STATE_LOADED);
+    this.assert(
+      this.getTabState(tab) == this.STATE_LOADING ||
+        this.getTabState(tab) == this.STATE_LOADED
+    );
     this.setTabState(tab, this.STATE_LOADED);
     this.unwarmTab(tab);
 
     if (this.loadingTab === tab) {
       this.maybeClearLoadTimer("onLayersReady");
     }
   }
 
   // Fires when we paint the screen. Any tab switches we initiated
   // previously are done, so there's no need to keep the old layers
   // around.
   onPaint(event) {
-    if (this.switchPaintId != -1 &&
-        event.transactionId >= this.switchPaintId) {
-      if (TelemetryStopwatch.running("FX_TAB_SWITCH_COMPOSITE_E10S_MS", this.window)) {
-        let time = TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_COMPOSITE_E10S_MS", this.window);
+    if (this.switchPaintId != -1 && event.transactionId >= this.switchPaintId) {
+      if (
+        TelemetryStopwatch.running(
+          "FX_TAB_SWITCH_COMPOSITE_E10S_MS",
+          this.window
+        )
+      ) {
+        let time = TelemetryStopwatch.timeElapsed(
+          "FX_TAB_SWITCH_COMPOSITE_E10S_MS",
+          this.window
+        );
         if (time != -1) {
-          TelemetryStopwatch.finish("FX_TAB_SWITCH_COMPOSITE_E10S_MS", this.window);
+          TelemetryStopwatch.finish(
+            "FX_TAB_SWITCH_COMPOSITE_E10S_MS",
+            this.window
+          );
           this.log("DEBUG: tab switch time including compositing = " + time);
         }
       }
       this.addMarker("AsyncTabSwitch:Composited");
       this.switchPaintId = -1;
     }
 
     this.maybeVisibleTabs.clear();
   }
 
   // Called when we're done clearing the layers for a tab.
   onLayersCleared(browser) {
     let tab = this.tabbrowser.getTabForBrowser(browser);
     if (tab) {
       this.logState(`onLayersCleared(${tab._tPos})`);
-      this.assert(this.getTabState(tab) == this.STATE_UNLOADING ||
-        this.getTabState(tab) == this.STATE_UNLOADED);
+      this.assert(
+        this.getTabState(tab) == this.STATE_UNLOADING ||
+          this.getTabState(tab) == this.STATE_UNLOADED
+      );
       this.setTabState(tab, this.STATE_UNLOADED);
     }
   }
 
   // Called when a tab switches from remote to non-remote. In this case
   // a MozLayerTreeReady notification that we requested may never fire,
   // so we need to simulate it.
   onRemotenessChange(tab) {
-    this.logState(`onRemotenessChange(${tab._tPos}, ${tab.linkedBrowser.isRemoteBrowser})`);
+    this.logState(
+      `onRemotenessChange(${tab._tPos}, ${tab.linkedBrowser.isRemoteBrowser})`
+    );
     if (!tab.linkedBrowser.isRemoteBrowser) {
       if (this.getTabState(tab) == this.STATE_LOADING) {
         this.onLayersReady(tab.linkedBrowser);
       } else if (this.getTabState(tab) == this.STATE_UNLOADING) {
         this.onLayersCleared(tab.linkedBrowser);
       }
     } else if (this.getTabState(tab) == this.STATE_LOADED) {
       // A tab just changed from non-remote to remote, which means
@@ -824,17 +893,19 @@ class AsyncTabSwitcher {
 
     let otherTabbrowser = otherBrowser.ownerGlobal.gBrowser;
     let otherState;
     if (otherTabbrowser && otherTabbrowser._switcher) {
       let otherTab = otherTabbrowser.getTabForBrowser(otherBrowser);
       let otherSwitcher = otherTabbrowser._switcher;
       otherState = otherSwitcher.getTabState(otherTab);
     } else {
-      otherState = otherBrowser.docShellIsActive ? this.STATE_LOADED : this.STATE_UNLOADED;
+      otherState = otherBrowser.docShellIsActive
+        ? this.STATE_LOADED
+        : this.STATE_UNLOADED;
     }
     if (!this.swapMap) {
       this.swapMap = new WeakMap();
     }
     this.swapMap.set(otherBrowser, {
       state: otherState,
     });
   }
@@ -865,53 +936,55 @@ class AsyncTabSwitcher {
     let tab = this.tabbrowser.getTabForBrowser(browser);
     let state = this.getTabState(tab);
     return state == this.STATE_LOADING || state == this.STATE_LOADED;
   }
 
   activateBrowserForPrintPreview(browser) {
     let tab = this.tabbrowser.getTabForBrowser(browser);
     let state = this.getTabState(tab);
-    if (state != this.STATE_LOADING &&
-        state != this.STATE_LOADED) {
+    if (state != this.STATE_LOADING && state != this.STATE_LOADED) {
       this.setTabState(tab, this.STATE_LOADING);
-      this.logState("Activated browser " + this.tinfo(tab) + " for print preview");
+      this.logState(
+        "Activated browser " + this.tinfo(tab) + " for print preview"
+      );
     }
   }
 
   canWarmTab(tab) {
     if (!gTabWarmingEnabled) {
       return false;
     }
 
     if (!tab) {
       return false;
     }
 
     // If the tab is not yet inserted, closing, not remote,
     // crashed, already visible, or already requested, warming
     // up the tab makes no sense.
-    if (this.minimizedOrFullyOccluded ||
-        !tab.linkedPanel ||
-        tab.closing ||
-        !tab.linkedBrowser.isRemoteBrowser ||
-        !tab.linkedBrowser.frameLoader.remoteTab) {
+    if (
+      this.minimizedOrFullyOccluded ||
+      !tab.linkedPanel ||
+      tab.closing ||
+      !tab.linkedBrowser.isRemoteBrowser ||
+      !tab.linkedBrowser.frameLoader.remoteTab
+    ) {
       return false;
     }
 
     return true;
   }
 
   shouldWarmTab(tab) {
     if (this.canWarmTab(tab)) {
       // Tabs that are already in STATE_LOADING or STATE_LOADED
       // have no need to be warmed up.
       let state = this.getTabState(tab);
-      if (state === this.STATE_UNLOADING ||
-          state === this.STATE_UNLOADED) {
+      if (state === this.STATE_UNLOADING || state === this.STATE_UNLOADED) {
         return true;
       }
     }
 
     return false;
   }
 
   unwarmTab(tab) {
@@ -940,19 +1013,21 @@ class AsyncTabSwitcher {
   }
 
   evictOldestTabFromCache() {
     let tab = this.tabLayerCache.shift();
     this.cleanUpTabAfterEviction(tab);
   }
 
   maybePromoteTabInLayerCache(tab) {
-    if (gTabCacheSize > 1 &&
-        tab.linkedBrowser.isRemoteBrowser &&
-        tab.linkedBrowser.currentURI.spec != "about:blank") {
+    if (
+      gTabCacheSize > 1 &&
+      tab.linkedBrowser.isRemoteBrowser &&
+      tab.linkedBrowser.currentURI.spec != "about:blank"
+    ) {
       let tabIndex = this.tabLayerCache.indexOf(tab);
 
       if (tabIndex != -1) {
         this.tabLayerCache.splice(tabIndex, 1);
       }
 
       this.tabLayerCache.push(tab);
 
@@ -972,18 +1047,20 @@ class AsyncTabSwitcher {
     if (gTabWarmingEnabled) {
       let warmingState = "disqualified";
 
       if (this.canWarmTab(tab)) {
         if (tabState == this.STATE_LOADING) {
           warmingState = "stillLoading";
         } else if (tabState == this.STATE_LOADED) {
           warmingState = "loaded";
-        } else if (tabState == this.STATE_UNLOADING ||
-                   tabState == this.STATE_UNLOADED) {
+        } else if (
+          tabState == this.STATE_UNLOADING ||
+          tabState == this.STATE_UNLOADED
+        ) {
           // At this point, if the tab's browser was being inserted
           // lazily, we never had a chance to warm it up, and unfortunately
           // there's no great way to detect that case. Those cases will
           // end up in the "notWarmed" bucket, along with legitimate cases
           // where tabs could have been warmed but weren't.
           warmingState = "notWarmed";
         }
       }
@@ -1016,17 +1093,20 @@ class AsyncTabSwitcher {
   }
 
   queueUnload(unloadTimeout) {
     this.preActions();
 
     if (this.unloadTimer) {
       this.clearTimer(this.unloadTimer);
     }
-    this.unloadTimer = this.setTimer(() => this.onUnloadTimeout(), unloadTimeout);
+    this.unloadTimer = this.setTimer(
+      () => this.onUnloadTimeout(),
+      unloadTimeout
+    );
 
     this.postActions();
   }
 
   handleEvent(event, delayed = false) {
     if (this._processing) {
       this.setTimer(() => this.handleEvent(event, true), 0);
       return;
@@ -1072,155 +1152,206 @@ class AsyncTabSwitcher {
    * Telemetry and Profiler related helpers for recording tab switch
    * timing.
    */
 
   startTabSwitch() {
     TelemetryStopwatch.cancel("FX_TAB_SWITCH_TOTAL_E10S_MS", this.window);
     TelemetryStopwatch.start("FX_TAB_SWITCH_TOTAL_E10S_MS", this.window);
 
-    if (TelemetryStopwatch.running("FX_TAB_SWITCH_COMPOSITE_E10S_MS", this.window)) {
+    if (
+      TelemetryStopwatch.running("FX_TAB_SWITCH_COMPOSITE_E10S_MS", this.window)
+    ) {
       TelemetryStopwatch.cancel("FX_TAB_SWITCH_COMPOSITE_E10S_MS", this.window);
     }
     TelemetryStopwatch.start("FX_TAB_SWITCH_COMPOSITE_E10S_MS", this.window);
     this.addMarker("AsyncTabSwitch:Start");
     this.switchInProgress = true;
   }
 
   /**
    * Something has occurred that might mean that we've completed
    * the tab switch (layers are ready, paints are done, spinners
    * are hidden). This checks to make sure all conditions are
    * satisfied, and then records the tab switch as finished.
    */
   maybeFinishTabSwitch() {
-    if (this.switchInProgress && this.requestedTab &&
-        (this.getTabState(this.requestedTab) == this.STATE_LOADED ||
-          this.requestedTab === this.blankTab)) {
+    if (
+      this.switchInProgress &&
+      this.requestedTab &&
+      (this.getTabState(this.requestedTab) == this.STATE_LOADED ||
+        this.requestedTab === this.blankTab)
+    ) {
       if (this.requestedTab !== this.blankTab) {
         this.maybePromoteTabInLayerCache(this.requestedTab);
       }
 
       // After this point the tab has switched from the content thread's point of view.
       // The changes will be visible after the next refresh driver tick + composite.
-      let time = TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_TOTAL_E10S_MS", this.window);
+      let time = TelemetryStopwatch.timeElapsed(
+        "FX_TAB_SWITCH_TOTAL_E10S_MS",
+        this.window
+      );
       if (time != -1) {
         TelemetryStopwatch.finish("FX_TAB_SWITCH_TOTAL_E10S_MS", this.window);
         this.log("DEBUG: tab switch time = " + time);
         this.addMarker("AsyncTabSwitch:Finish");
       }
       this.switchInProgress = false;
     }
   }
 
   spinnerDisplayed() {
     this.assert(!this.spinnerTab);
     let browser = this.requestedTab.linkedBrowser;
     this.assert(browser.isRemoteBrowser);
     TelemetryStopwatch.start("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", this.window);
     // We have a second, similar probe for capturing recordings of
     // when the spinner is displayed for very long periods.
-    TelemetryStopwatch.start("FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS", this.window);
+    TelemetryStopwatch.start(
+      "FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS",
+      this.window
+    );
     this.addMarker("AsyncTabSwitch:SpinnerShown");
     Services.telemetry
       .getHistogramById("FX_TAB_SWITCH_SPINNER_VISIBLE_TRIGGER")
       .add(this._loadTimerClearedBy);
     if (AppConstants.NIGHTLY_BUILD) {
       Services.obs.notifyObservers(null, "tabswitch-spinner");
     }
   }
 
   spinnerHidden() {
     this.assert(this.spinnerTab);
-    this.log("DEBUG: spinner time = " +
-      TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", this.window));
+    this.log(
+      "DEBUG: spinner time = " +
+        TelemetryStopwatch.timeElapsed(
+          "FX_TAB_SWITCH_SPINNER_VISIBLE_MS",
+          this.window
+        )
+    );
     TelemetryStopwatch.finish("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", this.window);
-    TelemetryStopwatch.finish("FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS", this.window);
+    TelemetryStopwatch.finish(
+      "FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS",
+      this.window
+    );
     this.addMarker("AsyncTabSwitch:SpinnerHidden");
     // we do not get a onPaint after displaying the spinner
     this._loadTimerClearedBy = "none";
   }
 
   addMarker(marker) {
     if (Services.profiler) {
       Services.profiler.AddMarker(marker);
     }
   }
 
   /*
    * Debug related logging for switcher.
    */
   logging() {
-    if (this._useDumpForLogging)
+    if (this._useDumpForLogging) {
       return true;
-    if (this._logInit)
+    }
+    if (this._logInit) {
       return this._shouldLog;
-    let result = Services.prefs.getBoolPref("browser.tabs.remote.logSwitchTiming", false);
+    }
+    let result = Services.prefs.getBoolPref(
+      "browser.tabs.remote.logSwitchTiming",
+      false
+    );
     this._shouldLog = result;
     this._logInit = true;
     return this._shouldLog;
   }
 
   tinfo(tab) {
     if (tab) {
       return tab._tPos + "(" + tab.linkedBrowser.currentURI.spec + ")";
     }
     return "null";
   }
 
   log(s) {
-    if (!this.logging())
+    if (!this.logging()) {
       return;
+    }
     if (this._useDumpForLogging) {
       dump(s + "\n");
     } else {
       Services.console.logStringMessage(s);
     }
   }
 
   logState(prefix) {
-    if (!this.logging())
+    if (!this.logging()) {
       return;
+    }
 
     let accum = prefix + " ";
     for (let i = 0; i < this.tabbrowser.tabs.length; i++) {
       let tab = this.tabbrowser.tabs[i];
       let state = this.getTabState(tab);
       let isWarming = this.warmingTabs.has(tab);
       let isCached = this.tabLayerCache.includes(tab);
       let isClosing = tab.closing;
       let linkedBrowser = tab.linkedBrowser;
       let isActive = linkedBrowser && linkedBrowser.docShellIsActive;
       let isRendered = linkedBrowser && linkedBrowser.renderLayers;
 
       accum += i + ":";
-      if (tab === this.lastVisibleTab) accum += "V";
-      if (tab === this.loadingTab) accum += "L";
-      if (tab === this.requestedTab) accum += "R";
-      if (tab === this.blankTab) accum += "B";
+      if (tab === this.lastVisibleTab) {
+        accum += "V";
+      }
+      if (tab === this.loadingTab) {
+        accum += "L";
+      }
+      if (tab === this.requestedTab) {
+        accum += "R";
+      }
+      if (tab === this.blankTab) {
+        accum += "B";
+      }
 
       let extraStates = "";
-      if (isWarming) extraStates += "W";
-      if (isCached) extraStates += "C";
-      if (isClosing) extraStates += "X";
-      if (isActive) extraStates += "A";
-      if (isRendered) extraStates += "R";
+      if (isWarming) {
+        extraStates += "W";
+      }
+      if (isCached) {
+        extraStates += "C";
+      }
+      if (isClosing) {
+        extraStates += "X";
+      }
+      if (isActive) {
+        extraStates += "A";
+      }
+      if (isRendered) {
+        extraStates += "R";
+      }
       if (extraStates != "") {
         accum += `(${extraStates})`;
       }
 
-      if (state == this.STATE_LOADED) accum += "(+)";
-      if (state == this.STATE_LOADING) accum += "(+?)";
-      if (state == this.STATE_UNLOADED) accum += "(-)";
-      if (state == this.STATE_UNLOADING) accum += "(-?)";
+      if (state == this.STATE_LOADED) {
+        accum += "(+)";
+      }
+      if (state == this.STATE_LOADING) {
+        accum += "(+?)";
+      }
+      if (state == this.STATE_UNLOADED) {
+        accum += "(-)";
+      }
+      if (state == this.STATE_UNLOADING) {
+        accum += "(-?)";
+      }
       accum += " ";
     }
 
     accum += "cached: " + this.tabLayerCache.length;
 
     if (this._useDumpForLogging) {
       dump(accum + "\n");
     } else {
       Services.console.logStringMessage(accum);
     }
   }
 }
-
--- a/browser/modules/BrowserUsageTelemetry.jsm
+++ b/browser/modules/BrowserUsageTelemetry.jsm
@@ -6,51 +6,63 @@
 "use strict";
 
 var EXPORTED_SYMBOLS = [
   "BrowserUsageTelemetry",
   "URICountListener",
   "URLBAR_SELECTED_RESULT_TYPES",
   "URLBAR_SELECTED_RESULT_METHODS",
   "MINIMUM_TAB_COUNT_INTERVAL_MS",
- ];
+];
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
   SearchTelemetry: "resource:///modules/SearchTelemetry.jsm",
   Services: "resource://gre/modules/Services.jsm",
   setTimeout: "resource://gre/modules/Timer.jsm",
 });
 
 // This pref is in seconds!
-XPCOMUtils.defineLazyPreferenceGetter(this,
+XPCOMUtils.defineLazyPreferenceGetter(
+  this,
   "gRecentVisitedOriginsExpiry",
-  "browser.engagement.recent_visited_origins.expiry");
+  "browser.engagement.recent_visited_origins.expiry"
+);
 
 // The upper bound for the count of the visited unique domain names.
 const MAX_UNIQUE_VISITED_DOMAINS = 100;
 
 // Observed topic names.
 const TAB_RESTORING_TOPIC = "SSTabRestoring";
-const TELEMETRY_SUBSESSIONSPLIT_TOPIC = "internal-telemetry-after-subsession-split";
+const TELEMETRY_SUBSESSIONSPLIT_TOPIC =
+  "internal-telemetry-after-subsession-split";
 const DOMWINDOW_OPENED_TOPIC = "domwindowopened";
 const AUTOCOMPLETE_ENTER_TEXT_TOPIC = "autocomplete-did-enter-text";
 
 // Probe names.
 const MAX_TAB_COUNT_SCALAR_NAME = "browser.engagement.max_concurrent_tab_count";
-const MAX_WINDOW_COUNT_SCALAR_NAME = "browser.engagement.max_concurrent_window_count";
-const TAB_OPEN_EVENT_COUNT_SCALAR_NAME = "browser.engagement.tab_open_event_count";
-const MAX_TAB_PINNED_COUNT_SCALAR_NAME = "browser.engagement.max_concurrent_tab_pinned_count";
-const TAB_PINNED_EVENT_COUNT_SCALAR_NAME = "browser.engagement.tab_pinned_event_count";
-const WINDOW_OPEN_EVENT_COUNT_SCALAR_NAME = "browser.engagement.window_open_event_count";
-const UNIQUE_DOMAINS_COUNT_SCALAR_NAME = "browser.engagement.unique_domains_count";
+const MAX_WINDOW_COUNT_SCALAR_NAME =
+  "browser.engagement.max_concurrent_window_count";
+const TAB_OPEN_EVENT_COUNT_SCALAR_NAME =
+  "browser.engagement.tab_open_event_count";
+const MAX_TAB_PINNED_COUNT_SCALAR_NAME =
+  "browser.engagement.max_concurrent_tab_pinned_count";
+const TAB_PINNED_EVENT_COUNT_SCALAR_NAME =
+  "browser.engagement.tab_pinned_event_count";
+const WINDOW_OPEN_EVENT_COUNT_SCALAR_NAME =
+  "browser.engagement.window_open_event_count";
+const UNIQUE_DOMAINS_COUNT_SCALAR_NAME =
+  "browser.engagement.unique_domains_count";
 const TOTAL_URI_COUNT_SCALAR_NAME = "browser.engagement.total_uri_count";
-const UNFILTERED_URI_COUNT_SCALAR_NAME = "browser.engagement.unfiltered_uri_count";
+const UNFILTERED_URI_COUNT_SCALAR_NAME =
+  "browser.engagement.unfiltered_uri_count";
 
 // A list of known search origins.
 const KNOWN_SEARCH_SOURCES = [
   "abouthome",
   "contextmenu",
   "newtab",
   "searchbar",
   "urlbar",
@@ -115,17 +127,18 @@ function getOpenTabsAndWinsCounts() {
 function getTabCount() {
   return getOpenTabsAndWinsCounts().tabCount;
 }
 
 function getPinnedTabsCount() {
   let pinnedTabs = 0;
 
   for (let win of Services.wm.getEnumerator("navigator:browser")) {
-    pinnedTabs += [...win.ownerGlobal.gBrowser.tabs].filter(t => t.pinned).length;
+    pinnedTabs += [...win.ownerGlobal.gBrowser.tabs].filter(t => t.pinned)
+      .length;
   }
 
   return pinnedTabs;
 }
 
 function getSearchEngineId(engine) {
   if (engine) {
     if (engine.identifier) {
@@ -134,18 +147,20 @@ function getSearchEngineId(engine) {
     if (engine.name) {
       return "other-" + engine.name;
     }
   }
   return "other";
 }
 
 function shouldRecordSearchCount(tabbrowser) {
-  return !PrivateBrowsingUtils.isWindowPrivate(tabbrowser.ownerGlobal) ||
-         !Services.prefs.getBoolPref("browser.engagement.search_counts.pbm", false);
+  return (
+    !PrivateBrowsingUtils.isWindowPrivate(tabbrowser.ownerGlobal) ||
+    !Services.prefs.getBoolPref("browser.engagement.search_counts.pbm", false)
+  );
 }
 
 let URICountListener = {
   // A set containing the visited domains, see bug 1271310.
   _domainSet: new Set(),
   // A set containing the visited origins during the last 24 hours (similar to domains, but not quite the same)
   _domain24hrSet: new Set(),
   // A map to keep track of the URIs loaded from the restored tabs.
@@ -178,39 +193,44 @@ let URICountListener = {
       return;
     }
 
     // The SessionStore sets the URI of a tab first, firing onLocationChange the
     // first time, then manages content loading using its scheduler. Once content
     // loads, we will hit onLocationChange again.
     // We can catch the first case by checking for null requests: be advised that
     // this can also happen when navigating page fragments, so account for it.
-    if (!request &&
-        !(flags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT)) {
+    if (
+      !request &&
+      !(flags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT)
+    ) {
       return;
     }
 
     // Don't include URI and domain counts when in private mode.
-    let shouldCountURI = !PrivateBrowsingUtils.isWindowPrivate(browser.ownerGlobal) ||
-                         Services.prefs.getBoolPref("browser.engagement.total_uri_count.pbm", false);
+    let shouldCountURI =
+      !PrivateBrowsingUtils.isWindowPrivate(browser.ownerGlobal) ||
+      Services.prefs.getBoolPref(
+        "browser.engagement.total_uri_count.pbm",
+        false
+      );
 
     // Track URI loads, even if they're not http(s).
     let uriSpec = null;
     try {
       uriSpec = uri.spec;
     } catch (e) {
       // If we have troubles parsing the spec, still count this as
       // an unfiltered URI.
       if (shouldCountURI) {
         Services.telemetry.scalarAdd(UNFILTERED_URI_COUNT_SCALAR_NAME, 1);
       }
       return;
     }
 
-
     // Don't count about:blank and similar pages, as they would artificially
     // inflate the counts.
     if (browser.ownerGlobal.gInitialPages.includes(uriSpec)) {
       return;
     }
 
     // If the URI we're loading is in the _restoredURIsMap, then it comes from a
     // restored tab. If so, let's skip it and remove it from the map as we want to
@@ -226,18 +246,20 @@ let URICountListener = {
     if (shouldCountURI) {
       Services.telemetry.scalarAdd(UNFILTERED_URI_COUNT_SCALAR_NAME, 1);
     }
 
     if (!this.isHttpURI(uri)) {
       return;
     }
 
-    if (shouldRecordSearchCount(browser.getTabBrowser()) &&
-        !(flags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT)) {
+    if (
+      shouldRecordSearchCount(browser.getTabBrowser()) &&
+      !(flags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT)
+    ) {
       SearchTelemetry.updateTrackingStatus(browser, uriSpec);
     }
 
     if (!shouldCountURI) {
       return;
     }
 
     // Update the URI counts.
@@ -256,17 +278,20 @@ let URICountListener = {
       baseDomain = Services.eTLD.getBaseDomain(uri);
     } catch (e) {
       return;
     }
 
     // We only want to count the unique domains up to MAX_UNIQUE_VISITED_DOMAINS.
     if (this._domainSet.size < MAX_UNIQUE_VISITED_DOMAINS) {
       this._domainSet.add(baseDomain);
-      Services.telemetry.scalarSet(UNIQUE_DOMAINS_COUNT_SCALAR_NAME, this._domainSet.size);
+      Services.telemetry.scalarSet(
+        UNIQUE_DOMAINS_COUNT_SCALAR_NAME,
+        this._domainSet.size
+      );
     }
 
     this._domain24hrSet.add(baseDomain);
     if (gRecentVisitedOriginsExpiry) {
       setTimeout(() => {
         this._domain24hrSet.delete(baseDomain);
       }, gRecentVisitedOriginsExpiry * 1000);
     }
@@ -289,37 +314,40 @@ let URICountListener = {
 
   /**
    * Resets the number of unique domains visited in this session.
    */
   resetUniqueDomainsVisitedInPast24Hours() {
     this._domain24hrSet.clear();
   },
 
-  QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
-                                          Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([
+    Ci.nsIWebProgressListener,
+    Ci.nsISupportsWeakReference,
+  ]),
 };
 
 let urlbarListener = {
-
   // This is needed for recordUrlbarSelectedResultMethod().
   selectedIndex: -1,
 
   init() {
     Services.obs.addObserver(this, AUTOCOMPLETE_ENTER_TEXT_TOPIC, true);
   },
 
   uninit() {
     Services.obs.removeObserver(this, AUTOCOMPLETE_ENTER_TEXT_TOPIC);
   },
 
   observe(subject, topic, data) {
     switch (topic) {
       case AUTOCOMPLETE_ENTER_TEXT_TOPIC:
-        this._handleURLBarTelemetry(subject.QueryInterface(Ci.nsIAutoCompleteInput));
+        this._handleURLBarTelemetry(
+          subject.QueryInterface(Ci.nsIAutoCompleteInput)
+        );
         break;
     }
   },
 
   /**
    * Used to log telemetry when the user enters text in the urlbar.
    *
    * @param {nsIAutoCompleteInput} input  The autocomplete element where the
@@ -333,59 +361,65 @@ let urlbarListener = {
       this.selectedIndex = -1;
       return;
     }
 
     // Except for the history popup, the urlbar always has a selection.  The
     // first result at index 0 is the "heuristic" result that indicates what
     // will happen when you press the Enter key.  Treat it as no selection.
     this.selectedIndex =
-      input.popup.selectedIndex > 0 || !input.popup._isFirstResultHeuristic ?
-      input.popup.selectedIndex :
-      -1;
+      input.popup.selectedIndex > 0 || !input.popup._isFirstResultHeuristic
+        ? input.popup.selectedIndex
+        : -1;
 
-    let controller =
-      input.popup.view.QueryInterface(Ci.nsIAutoCompleteController);
+    let controller = input.popup.view.QueryInterface(
+      Ci.nsIAutoCompleteController
+    );
     let idx = input.popup.selectedIndex;
     let value = controller.getValueAt(idx);
     let action = input._parseActionUrl(value);
     let actionType;
     if (action) {
       actionType =
-        action.type == "searchengine" && action.params.searchSuggestion ?
-          "searchsuggestion" :
-        action.type;
+        action.type == "searchengine" && action.params.searchSuggestion
+          ? "searchsuggestion"
+          : action.type;
     }
     if (!actionType) {
       let styles = new Set(controller.getStyleAt(idx).split(/\s+/));
-      let style = ["preloaded-top-site", "autofill", "tag", "bookmark"].find(s => styles.has(s));
+      let style = ["preloaded-top-site", "autofill", "tag", "bookmark"].find(
+        s => styles.has(s)
+      );
       actionType = style || "history";
     }
 
     Services.telemetry
-            .getHistogramById("FX_URLBAR_SELECTED_RESULT_INDEX")
-            .add(idx);
+      .getHistogramById("FX_URLBAR_SELECTED_RESULT_INDEX")
+      .add(idx);
 
     // You can add values but don't change any of the existing values.
     // Otherwise you'll break our data.
     if (actionType in URLBAR_SELECTED_RESULT_TYPES) {
       Services.telemetry
-              .getHistogramById("FX_URLBAR_SELECTED_RESULT_TYPE")
-              .add(URLBAR_SELECTED_RESULT_TYPES[actionType]);
+        .getHistogramById("FX_URLBAR_SELECTED_RESULT_TYPE")
+        .add(URLBAR_SELECTED_RESULT_TYPES[actionType]);
       Services.telemetry
-              .getKeyedHistogramById("FX_URLBAR_SELECTED_RESULT_INDEX_BY_TYPE")
-              .add(actionType, idx);
+        .getKeyedHistogramById("FX_URLBAR_SELECTED_RESULT_INDEX_BY_TYPE")
+        .add(actionType, idx);
     } else {
-      Cu.reportError("Unknown FX_URLBAR_SELECTED_RESULT_TYPE type: " +
-                     actionType);
+      Cu.reportError(
+        "Unknown FX_URLBAR_SELECTED_RESULT_TYPE type: " + actionType
+      );
     }
   },
 
-  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
-                                          Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([
+    Ci.nsIObserver,
+    Ci.nsISupportsWeakReference,
+  ]),
 };
 
 let BrowserUsageTelemetry = {
   _inited: false,
 
   init() {
     this._lastRecordTabCount = 0;
     urlbarListener.init();
@@ -396,25 +430,33 @@ let BrowserUsageTelemetry = {
   /**
    * Handle subsession splits in the parent process.
    */
   afterSubsessionSplit() {
     // Scalars just got cleared due to a subsession split. We need to set the maximum
     // concurrent tab and window counts so that they reflect the correct value for the
     // new subsession.
     const counts = getOpenTabsAndWinsCounts();
-    Services.telemetry.scalarSetMaximum(MAX_TAB_COUNT_SCALAR_NAME, counts.tabCount);
-    Services.telemetry.scalarSetMaximum(MAX_WINDOW_COUNT_SCALAR_NAME, counts.winCount);
+    Services.telemetry.scalarSetMaximum(
+      MAX_TAB_COUNT_SCALAR_NAME,
+      counts.tabCount
+    );
+    Services.telemetry.scalarSetMaximum(
+      MAX_WINDOW_COUNT_SCALAR_NAME,
+      counts.winCount
+    );
 
     // Reset the URI counter.
     URICountListener.reset();
   },
 
-  QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver,
-                                          Ci.nsISupportsWeakReference]),
+  QueryInterface: ChromeUtils.generateQI([
+    Ci.nsIObserver,
+    Ci.nsISupportsWeakReference,
+  ]),
 
   uninit() {
     if (!this._inited) {
       return;
     }
     Services.obs.removeObserver(this, DOMWINDOW_OPENED_TOPIC);
     Services.obs.removeObserver(this, TELEMETRY_SUBSESSIONSPLIT_TOPIC);
     urlbarListener.uninit();
@@ -488,45 +530,53 @@ let BrowserUsageTelemetry = {
     if (isOneOff) {
       if (!KNOWN_ONEOFF_SOURCES.includes(source)) {
         // Silently drop the error if this bogus call
         // came from 'urlbar' or 'searchbar'. They're
         // calling |recordSearch| twice from two different
         // code paths because they want to record the search
         // in SEARCH_COUNTS.
         if (["urlbar", "searchbar"].includes(source)) {
-          Services.telemetry.getKeyedHistogramById("SEARCH_COUNTS").add(countId);
+          Services.telemetry
+            .getKeyedHistogramById("SEARCH_COUNTS")
+            .add(countId);
           return;
         }
         throw new Error("Unknown source for one-off search: " + source);
       }
     } else {
       if (!KNOWN_SEARCH_SOURCES.includes(source)) {
         throw new Error("Unknown source for search: " + source);
       }
       let histogram = Services.telemetry.getKeyedHistogramById("SEARCH_COUNTS");
       histogram.add(countId);
 
-      if (details.alias &&
-          engine.wrappedJSObject._internalAliases.includes(details.alias)) {
+      if (
+        details.alias &&
+        engine.wrappedJSObject._internalAliases.includes(details.alias)
+      ) {
         let aliasCountId = getSearchEngineId(engine) + ".alias";
         histogram.add(aliasCountId);
       }
     }
 
     // Dispatch the search signal to other handlers.
     this._handleSearchAction(engine, source, details);
   },
 
   _recordSearch(engine, source, action = null) {
     let scalarKey = action ? "search_" + action : "search";
-    Services.telemetry.keyedScalarAdd("browser.engagement.navigation." + source,
-                                      scalarKey, 1);
-    Services.telemetry.recordEvent("navigation", "search", source, action,
-                                   { engine: getSearchEngineId(engine) });
+    Services.telemetry.keyedScalarAdd(
+      "browser.engagement.navigation." + source,
+      scalarKey,
+      1
+    );
+    Services.telemetry.recordEvent("navigation", "search", source, action, {
+      engine: getSearchEngineId(engine),
+    });
   },
 
   _handleSearchAction(engine, source, details) {
     switch (source) {
       case "urlbar":
       case "oneoff-urlbar":
       case "searchbar":
       case "oneoff-searchbar":
@@ -552,17 +602,17 @@ let BrowserUsageTelemetry = {
    */
   _handleSearchAndUrlbar(engine, source, details) {
     // We want "urlbar" and "urlbar-oneoff" (and similar cases) to go in the same
     // scalar, but in a different key.
 
     // When using one-offs in the searchbar we get an "unknown" source. See bug
     // 1195733 comment 7 for the context. Fix-up the label here.
     const sourceName =
-      (source === "unknown") ? "searchbar" : source.replace("oneoff-", "");
+      source === "unknown" ? "searchbar" : source.replace("oneoff-", "");
 
     const isOneOff = !!details.isOneOff;
     if (isOneOff) {
       // We will receive a signal from the "urlbar"/"searchbar" even when the
       // search came from "oneoff-urlbar". That's because both signals
       // are propagated from search.xml. Skip it if that's the case.
       // Moreover, we skip the "unknown" source that comes from the searchbar
       // when performing searches from the default search engine. See bug 1195733
@@ -596,26 +646,30 @@ let BrowserUsageTelemetry = {
    * legacy urlbar.
    *
    * @param {Event} event
    *        The event that triggered the selection.
    * @param {string} userSelectionBehavior
    *        How the user cycled through results before picking the current match.
    *        Could be one of "tab", "arrow" or "none".
    */
-  recordLegacyUrlbarSelectedResultMethod(event, userSelectionBehavior = "none") {
+  recordLegacyUrlbarSelectedResultMethod(
+    event,
+    userSelectionBehavior = "none"
+  ) {
     // The reason this method relies on urlbarListener instead of having the
     // caller pass in an index is that by the time the urlbar handles a
     // selection, the selection in its popup has been cleared, so it's not easy
     // to tell which popup index was selected.  Fortunately this file already
     // has urlbarListener, which gets notified of selections in the urlbar
     // before the popup selection is cleared, so just use that.
 
     this._recordUrlOrSearchbarSelectedResultMethod(
-      event, urlbarListener.selectedIndex,
+      event,
+      urlbarListener.selectedIndex,
       "FX_URLBAR_SELECTED_RESULT_METHOD",
       userSelectionBehavior
     );
   },
 
   /**
    * Records the method by which the user selected a urlbar result for the
    * legacy urlbar.
@@ -624,72 +678,85 @@ let BrowserUsageTelemetry = {
    *        The event that triggered the selection.
    * @param {number} index
    *        The index that the user chose in the popup, or -1 if there wasn't a
    *        selection.
    * @param {string} userSelectionBehavior
    *        How the user cycled through results before picking the current match.
    *        Could be one of "tab", "arrow" or "none".
    */
-  recordUrlbarSelectedResultMethod(event, index, userSelectionBehavior = "none") {
+  recordUrlbarSelectedResultMethod(
+    event,
+    index,
+    userSelectionBehavior = "none"
+  ) {
     // The reason this method relies on urlbarListener instead of having the
     // caller pass in an index is that by the time the urlbar handles a
     // selection, the selection in its popup has been cleared, so it's not easy
     // to tell which popup index was selected.  Fortunately this file already
     // has urlbarListener, which gets notified of selections in the urlbar
     // before the popup selection is cleared, so just use that.
 
     this._recordUrlOrSearchbarSelectedResultMethod(
-      event, index,
+      event,
+      index,
       "FX_URLBAR_SELECTED_RESULT_METHOD",
       userSelectionBehavior
     );
   },
 
   /**
    * Records the method by which the user selected a searchbar result.
    *
    * @param {Event} event
    *        The event that triggered the selection.
    * @param {number} highlightedIndex
    *        The index that the user chose in the popup, or -1 if there wasn't a
    *        selection.
    */
   recordSearchbarSelectedResultMethod(event, highlightedIndex) {
     this._recordUrlOrSearchbarSelectedResultMethod(
-      event, highlightedIndex,
+      event,
+      highlightedIndex,
       "FX_SEARCHBAR_SELECTED_RESULT_METHOD",
       "none"
     );
   },
 
-  _recordUrlOrSearchbarSelectedResultMethod(event, highlightedIndex, histogramID, userSelectionBehavior) {
+  _recordUrlOrSearchbarSelectedResultMethod(
+    event,
+    highlightedIndex,
+    histogramID,
+    userSelectionBehavior
+  ) {
     let histogram = Services.telemetry.getHistogramById(histogramID);
     // command events are from the one-off context menu.  Treat them as clicks.
     // Note that we don't care about MouseEvent subclasses here, since
     // those are not clicks.
-    let isClick = event && (ChromeUtils.getClassName(event) == "MouseEvent" ||
-                            event.type == "command");
+    let isClick =
+      event &&
+      (ChromeUtils.getClassName(event) == "MouseEvent" ||
+        event.type == "command");
     let category;
     if (isClick) {
       category = "click";
     } else if (highlightedIndex >= 0) {
       switch (userSelectionBehavior) {
-      case "tab":
-        category = "tabEnterSelection";
-        break;
-      case "arrow":
-        category = "arrowEnterSelection";
-        break;
-      case "rightClick":
-        // Selected by right mouse button.
-        category = "rightClickEnter";
-        break;
-      default:
-        category = "enterSelection";
+        case "tab":
+          category = "tabEnterSelection";
+          break;
+        case "arrow":
+          category = "arrowEnterSelection";
+          break;
+        case "rightClick":
+          // Selected by right mouse button.
+          category = "rightClickEnter";
+          break;
+        default:
+          category = "enterSelection";
       }
     } else {
       category = "enter";
     }
     histogram.add(category);
   },
 
   /**
@@ -704,18 +771,24 @@ let BrowserUsageTelemetry = {
 
     // Attach the tabopen handlers to the existing Windows.
     for (let win of Services.wm.getEnumerator("navigator:browser")) {
       this._registerWindow(win);
     }
 
     // Get the initial tab and windows max counts.
     const counts = getOpenTabsAndWinsCounts();
-    Services.telemetry.scalarSetMaximum(MAX_TAB_COUNT_SCALAR_NAME, counts.tabCount);
-    Services.telemetry.scalarSetMaximum(MAX_WINDOW_COUNT_SCALAR_NAME, counts.winCount);
+    Services.telemetry.scalarSetMaximum(
+      MAX_TAB_COUNT_SCALAR_NAME,
+      counts.tabCount
+    );
+    Services.telemetry.scalarSetMaximum(
+      MAX_WINDOW_COUNT_SCALAR_NAME,
+      counts.winCount
+    );
   },
 
   /**
    * Adds listeners to a single chrome window.
    */
   _registerWindow(win) {
     win.addEventListener("unload", this);
     win.addEventListener("TabOpen", this, true);
@@ -728,17 +801,20 @@ let BrowserUsageTelemetry = {
   /**
    * Removes listeners from a single chrome window.
    */
   _unregisterWindow(win) {
     win.removeEventListener("unload", this);
     win.removeEventListener("TabOpen", this, true);
     win.removeEventListener("TabPinned", this, true);
 
-    win.defaultView.gBrowser.tabContainer.removeEventListener(TAB_RESTORING_TOPIC, this);
+    win.defaultView.gBrowser.tabContainer.removeEventListener(
+      TAB_RESTORING_TOPIC,
+      this
+    );
     win.defaultView.gBrowser.removeTabsProgressListener(URICountListener);
   },
 
   /**
    * Updates the tab counts.
    * @param {Number} [newTabCount=0] The count of the opened tabs across all windows. This
    *        is computed manually if not provided.
    */
@@ -752,53 +828,65 @@ let BrowserUsageTelemetry = {
     this._recordTabCount(tabCount);
   },
 
   _onTabPinned(target) {
     const pinnedTabs = getPinnedTabsCount();
 
     // Update the "tab pinned" count and its maximum.
     Services.telemetry.scalarAdd(TAB_PINNED_EVENT_COUNT_SCALAR_NAME, 1);
-    Services.telemetry.scalarSetMaximum(MAX_TAB_PINNED_COUNT_SCALAR_NAME, pinnedTabs);
+    Services.telemetry.scalarSetMaximum(
+      MAX_TAB_PINNED_COUNT_SCALAR_NAME,
+      pinnedTabs
+    );
   },
 
   /**
    * Tracks the window count and registers the listeners for the tab count.
    * @param{Object} win The window object.
    */
   _onWindowOpen(win) {
     // Make sure to have a |nsIDOMWindow|.
     if (!(win instanceof Ci.nsIDOMWindow)) {
       return;
     }
 
     let onLoad = () => {
       win.removeEventListener("load", onLoad);
 
       // Ignore non browser windows.
-      if (win.document.documentElement.getAttribute("windowtype") != "navigator:browser") {
+      if (
+        win.document.documentElement.getAttribute("windowtype") !=
+        "navigator:browser"
+      ) {
         return;
       }
 
       this._registerWindow(win);
       // Track the window open event and check the maximum.
       const counts = getOpenTabsAndWinsCounts();
       Services.telemetry.scalarAdd(WINDOW_OPEN_EVENT_COUNT_SCALAR_NAME, 1);
-      Services.telemetry.scalarSetMaximum(MAX_WINDOW_COUNT_SCALAR_NAME, counts.winCount);
+      Services.telemetry.scalarSetMaximum(
+        MAX_WINDOW_COUNT_SCALAR_NAME,
+        counts.winCount
+      );
 
       // We won't receive the "TabOpen" event for the first tab within a new window.
       // Account for that.
       this._onTabOpen(counts.tabCount);
     };
     win.addEventListener("load", onLoad);
   },
 
   _recordTabCount(tabCount) {
     let currentTime = Date.now();
-    if (currentTime > this._lastRecordTabCount + MINIMUM_TAB_COUNT_INTERVAL_MS) {
+    if (
+      currentTime >
+      this._lastRecordTabCount + MINIMUM_TAB_COUNT_INTERVAL_MS
+    ) {
       if (tabCount === undefined) {
         tabCount = getTabCount();
       }
       Services.telemetry.getHistogramById("TAB_COUNT").add(tabCount);
       this._lastRecordTabCount = currentTime;
     }
   },
 };
--- a/browser/modules/BrowserWindowTracker.jsm
+++ b/browser/modules/BrowserWindowTracker.jsm
@@ -4,18 +4,20 @@
 
 /*
  * This module tracks each browser window and informs network module
  * the current selected tab's content outer window ID.
  */
 
 var EXPORTED_SYMBOLS = ["BrowserWindowTracker"];
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 // Lazy getters
 XPCOMUtils.defineLazyModuleGetters(this, {
   PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
 });
 
 // Constants
 const TAB_EVENTS = ["TabBrowserInserted", "TabSelect"];
@@ -29,37 +31,49 @@ var _trackedWindows = [];
 // Global methods
 function debug(s) {
   if (DEBUG) {
     dump("-*- UpdateTopLevelContentWindowIDHelper: " + s + "\n");
   }
 }
 
 function _updateCurrentContentOuterWindowID(browser) {
-  if (!browser.outerWindowID ||
-      browser.outerWindowID === _lastTopLevelWindowID ||
-      browser.ownerGlobal != _trackedWindows[0]) {
+  if (
+    !browser.outerWindowID ||
+    browser.outerWindowID === _lastTopLevelWindowID ||
+    browser.ownerGlobal != _trackedWindows[0]
+  ) {
     return;
   }
 
-  debug("Current window uri=" + (browser.currentURI && browser.currentURI.spec) +
-        " id=" + browser.outerWindowID);
+  debug(
+    "Current window uri=" +
+      (browser.currentURI && browser.currentURI.spec) +
+      " id=" +
+      browser.outerWindowID
+  );
 
   _lastTopLevelWindowID = browser.outerWindowID;
-  let windowIDWrapper = Cc["@mozilla.org/supports-PRUint64;1"]
-                          .createInstance(Ci.nsISupportsPRUint64);
+  let windowIDWrapper = Cc["@mozilla.org/supports-PRUint64;1"].createInstance(
+    Ci.nsISupportsPRUint64
+  );
   windowIDWrapper.data = _lastTopLevelWindowID;
-  Services.obs.notifyObservers(windowIDWrapper,
-                               "net:current-toplevel-outer-content-windowid");
+  Services.obs.notifyObservers(
+    windowIDWrapper,
+    "net:current-toplevel-outer-content-windowid"
+  );
 }
 
 function _handleEvent(event) {
   switch (event.type) {
     case "TabBrowserInserted":
-      if (event.target.ownerGlobal.gBrowser.selectedBrowser === event.target.linkedBrowser) {
+      if (
+        event.target.ownerGlobal.gBrowser.selectedBrowser ===
+        event.target.linkedBrowser
+      ) {
         _updateCurrentContentOuterWindowID(event.target.linkedBrowser);
       }
       break;
     case "TabSelect":
       _updateCurrentContentOuterWindowID(event.target.linkedBrowser);
       break;
     case "activate":
       WindowHelper.onActivate(event.target);
@@ -67,38 +81,43 @@ function _handleEvent(event) {
     case "unload":
       WindowHelper.removeWindow(event.currentTarget);
       break;
   }
 }
 
 function _handleMessage(message) {
   let browser = message.target;
-  if (message.name === "Browser:Init" &&
-      browser === browser.ownerGlobal.gBrowser.selectedBrowser) {
+  if (
+    message.name === "Browser:Init" &&
+    browser === browser.ownerGlobal.gBrowser.selectedBrowser
+  ) {
     _updateCurrentContentOuterWindowID(browser);
   }
 }
 
 function _trackWindowOrder(window) {
   if (window.windowState == window.STATE_MINIMIZED) {
-    let firstMinimizedWindow = _trackedWindows.findIndex(w => w.windowState == w.STATE_MINIMIZED);
+    let firstMinimizedWindow = _trackedWindows.findIndex(
+      w => w.windowState == w.STATE_MINIMIZED
+    );
     if (firstMinimizedWindow == -1) {
       firstMinimizedWindow = _trackedWindows.length;
     }
     _trackedWindows.splice(firstMinimizedWindow, 0, window);
   } else {
     _trackedWindows.unshift(window);
   }
 }
 
 function _untrackWindowOrder(window) {
   let idx = _trackedWindows.indexOf(window);
-  if (idx >= 0)
+  if (idx >= 0) {
     _trackedWindows.splice(idx, 1);
+  }
 }
 
 // Methods that impact a window. Put into single object for organization.
 var WindowHelper = {
   addWindow(window) {
     // Add event listeners
     TAB_EVENTS.forEach(function(event) {
       window.gBrowser.tabContainer.addEventListener(event, _handleEvent);
@@ -128,18 +147,19 @@ var WindowHelper = {
     });
 
     let messageManager = window.getGroupMessageManager("browsers");
     messageManager.removeMessageListener("Browser:Init", _handleMessage);
   },
 
   onActivate(window) {
     // If this window was the last focused window, we don't need to do anything
-    if (window == _trackedWindows[0])
+    if (window == _trackedWindows[0]) {
       return;
+    }
 
     _untrackWindowOrder(window);
     _trackWindowOrder(window);
 
     _updateCurrentContentOuterWindowID(window.gBrowser.selectedBrowser);
   },
 };
 
@@ -150,21 +170,23 @@ this.BrowserWindowTracker = {
    * @param options an object accepting the arguments for the search.
    *        * private: true to restrict the search to private windows
    *            only, false to restrict the search to non-private only.
    *            Omit the property to search in both groups.
    *        * allowPopups: true if popup windows are permissable.
    */
   getTopWindow(options = {}) {
     for (let win of _trackedWindows) {
-      if (!win.closed &&
-          (options.allowPopups || win.toolbar.visible) &&
-          (!("private" in options) ||
-           PrivateBrowsingUtils.permanentPrivateBrowsing ||
-           PrivateBrowsingUtils.isWindowPrivate(win) == options.private)) {
+      if (
+        !win.closed &&
+        (options.allowPopups || win.toolbar.visible) &&
+        (!("private" in options) ||
+          PrivateBrowsingUtils.permanentPrivateBrowsing ||
+          PrivateBrowsingUtils.isWindowPrivate(win) == options.private)
+      ) {
         return win;
       }
     }
     return null;
   },
 
   /**
    * Number of currently open browser windows.
--- a/browser/modules/ContentClick.jsm
+++ b/browser/modules/ContentClick.jsm
@@ -1,25 +1,34 @@
 /* -*- mode: js; indent-tabs-mode: nil; js-indent-level: 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/. */
 
 "use strict";
 
-var EXPORTED_SYMBOLS = [ "ContentClick" ];
+var EXPORTED_SYMBOLS = ["ContentClick"];
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-ChromeUtils.defineModuleGetter(this, "PlacesUIUtils",
-                               "resource:///modules/PlacesUIUtils.jsm");
-ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils",
-                               "resource://gre/modules/PrivateBrowsingUtils.jsm");
-ChromeUtils.defineModuleGetter(this, "E10SUtils",
-                               "resource://gre/modules/E10SUtils.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "PlacesUIUtils",
+  "resource:///modules/PlacesUIUtils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "PrivateBrowsingUtils",
+  "resource://gre/modules/PrivateBrowsingUtils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "E10SUtils",
+  "resource://gre/modules/E10SUtils.jsm"
+);
 
 var ContentClick = {
   // Listeners are added in BrowserGlue.jsm
   receiveMessage(message) {
     switch (message.name) {
       case "Content:Click":
         this.contentAreaClick(message.json, message.target);
         break;
@@ -34,18 +43,20 @@ var ContentClick = {
    */
   contentAreaClick(json, browser) {
     // This is heavily based on contentAreaClick from browser.js (Bug 903016)
     // The json is set up in a way to look like an Event.
     let window = browser.ownerGlobal;
 
     if (!json.href) {
       // Might be middle mouse navigation.
-      if (Services.prefs.getBoolPref("middlemouse.contentLoadURL") &&
-          !Services.prefs.getBoolPref("general.autoScroll")) {
+      if (
+        Services.prefs.getBoolPref("middlemouse.contentLoadURL") &&
+        !Services.prefs.getBoolPref("general.autoScroll")
+      ) {
         window.middleMousePaste(json);
       }
       return;
     }
 
     // If the browser is not in a place where we can open links, bail out.
     // This can happen in osx sheets, dialogs, etc. that are not browser
     // windows.  Specifically the payments UI is in an osx sheet.
@@ -53,24 +64,28 @@ var ContentClick = {
       return;
     }
 
     // Mark the page as a user followed link.  This is done so that history can
     // distinguish automatic embed visits from user activated ones.  For example
     // pages loaded in frames are embed visits and lost with the session, while
     // visits across frames should be preserved.
     try {
-      if (!PrivateBrowsingUtils.isWindowPrivate(window))
+      if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
         PlacesUIUtils.markPageAsFollowedLink(json.href);
-    } catch (ex) { /* Skip invalid URIs. */ }
+      }
+    } catch (ex) {
+      /* Skip invalid URIs. */
+    }
 
     // This part is based on handleLinkClick.
     var where = window.whereToOpenLink(json);
-    if (where == "current")
+    if (where == "current") {
       return;
+    }
 
     // Todo(903022): code for where == save
 
     let params = {
       charset: browser.characterSet,
       referrerInfo: E10SUtils.deserializeReferrerInfo(json.referrerInfo),
       allowMixedContent: json.allowMixedContent,
       isContentWindowPrivate: json.isContentWindowPrivate,
--- a/browser/modules/ContentCrashHandlers.jsm
+++ b/browser/modules/ContentCrashHandlers.jsm
@@ -1,30 +1,35 @@
 /* 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/. */
 
 "use strict";
 
-var EXPORTED_SYMBOLS = [ "PluginCrashReporter",
-                         "SubframeCrashHandler",
-                         "TabCrashHandler",
-                         "UnsubmittedCrashHandler" ];
+var EXPORTED_SYMBOLS = [
+  "PluginCrashReporter",
+  "SubframeCrashHandler",
+  "TabCrashHandler",
+  "UnsubmittedCrashHandler",
+];
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   AppConstants: "resource://gre/modules/AppConstants.jsm",
   BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
   clearTimeout: "resource://gre/modules/Timer.jsm",
   CrashSubmit: "resource://gre/modules/CrashSubmit.jsm",
   E10SUtils: "resource://gre/modules/E10SUtils.jsm",
   PluralForm: "resource://gre/modules/PluralForm.jsm",
-  RemotePages: "resource://gre/modules/remotepagemanager/RemotePageManagerParent.jsm",
+  RemotePages:
+    "resource://gre/modules/remotepagemanager/RemotePageManagerParent.jsm",
   SessionStore: "resource:///modules/sessionstore/SessionStore.jsm",
   setTimeout: "resource://gre/modules/Timer.jsm",
 });
 
 XPCOMUtils.defineLazyGetter(this, "gNavigatorBundle", function() {
   const url = "chrome://browser/locale/browser.properties";
   return Services.strings.createBundle(url);
 });
@@ -75,54 +80,72 @@ var TabCrashHandler = {
   childMap: new Map(),
   browserMap: new BrowserWeakMap(),
   unseenCrashedChildIDs: [],
   crashedBrowserQueues: new Map(),
   testBuildIDMismatch: false,
 
   get prefs() {
     delete this.prefs;
-    return this.prefs = Services.prefs.getBranch("browser.tabs.crashReporting.");
+    return (this.prefs = Services.prefs.getBranch(
+      "browser.tabs.crashReporting."
+    ));
   },
 
   init() {
-    if (this.initialized)
+    if (this.initialized) {
       return;
+    }
     this.initialized = true;
 
     Services.obs.addObserver(this, "ipc:content-shutdown");
     Services.obs.addObserver(this, "oop-frameloader-crashed");
 
     this.pageListener = new RemotePages("about:tabcrashed");
     // LOAD_BACKGROUND pages don't fire load events, so the about:tabcrashed
     // content will fire up its own message when its initial scripts have
     // finished running.
-    this.pageListener.addMessageListener("Load", this.receiveMessage.bind(this));
-    this.pageListener.addMessageListener("RemotePage:Unload", this.receiveMessage.bind(this));
-    this.pageListener.addMessageListener("closeTab", this.receiveMessage.bind(this));
-    this.pageListener.addMessageListener("restoreTab", this.receiveMessage.bind(this));
-    this.pageListener.addMessageListener("restoreAll", this.receiveMessage.bind(this));
+    this.pageListener.addMessageListener(
+      "Load",
+      this.receiveMessage.bind(this)
+    );
+    this.pageListener.addMessageListener(
+      "RemotePage:Unload",
+      this.receiveMessage.bind(this)
+    );
+    this.pageListener.addMessageListener(
+      "closeTab",
+      this.receiveMessage.bind(this)
+    );
+    this.pageListener.addMessageListener(
+      "restoreTab",
+      this.receiveMessage.bind(this)
+    );
+    this.pageListener.addMessageListener(
+      "restoreAll",
+      this.receiveMessage.bind(this)
+    );
   },
 
   observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "ipc:content-shutdown": {
         aSubject.QueryInterface(Ci.nsIPropertyBag2);
 
         if (!aSubject.get("abnormal")) {
           return;
         }
 
         let childID = aSubject.get("childID");
         let dumpID = aSubject.get("dumpID");
 
         if (!dumpID) {
           Services.telemetry
-                  .getHistogramById("FX_CONTENT_CRASH_DUMP_UNAVAILABLE")
-                  .add(1);
+            .getHistogramById("FX_CONTENT_CRASH_DUMP_UNAVAILABLE")
+            .add(1);
         } else if (AppConstants.MOZ_CRASHREPORTER) {
           this.childMap.set(childID, dumpID);
         }
 
         if (!this.flushCrashedBrowserQueue(childID)) {
           this.unseenCrashedChildIDs.push(childID);
           // The elements in unseenCrashedChildIDs will only be removed if
           // the tab crash page is shown. However, ipc:content-shutdown might
@@ -133,29 +156,34 @@ var TabCrashHandler = {
           // we will never show the tab crash page, and never remove the element
           // from the list.
           //
           // Instead of trying to account for all of those cases, we prevent
           // this list from getting too large by putting a reasonable upper
           // limit on how many childIDs we track. It's unlikely that this
           // array would ever get so large as to be unwieldy (that'd be a lot
           // or crashes!), but a leak is a leak.
-          if (this.unseenCrashedChildIDs.length > MAX_UNSEEN_CRASHED_CHILD_IDS) {
+          if (
+            this.unseenCrashedChildIDs.length > MAX_UNSEEN_CRASHED_CHILD_IDS
+          ) {
             this.unseenCrashedChildIDs.shift();
           }
         }
 
         // check for environment affecting crash reporting
-        let env = Cc["@mozilla.org/process/environment;1"]
-                    .getService(Ci.nsIEnvironment);
+        let env = Cc["@mozilla.org/process/environment;1"].getService(
+          Ci.nsIEnvironment
+        );
         let shutdown = env.exists("MOZ_CRASHREPORTER_SHUTDOWN");
 
         if (shutdown) {
-          dump("A content process crashed and MOZ_CRASHREPORTER_SHUTDOWN is " +
-               "set, shutting down\n");
+          dump(
+            "A content process crashed and MOZ_CRASHREPORTER_SHUTDOWN is " +
+              "set, shutting down\n"
+          );
           Services.startup.quit(Ci.nsIAppStartup.eForceQuit);
         }
 
         break;
       }
       case "oop-frameloader-crashed": {
         let browser = aSubject.ownerElement;
         if (!browser) {
@@ -267,18 +295,20 @@ var TabCrashHandler = {
       this.crashedBrowserQueues.set(childID, browserQueue);
     }
     // It's probably unnecessary to store this browser as a
     // weak reference, since the content process should complete
     // its teardown in the same tick of the event loop, and then
     // this queue will be flushed. The weak reference is to avoid
     // leaking browsers in case anything goes wrong during this
     // teardown process.
-    browserQueue.push({browser: Cu.getWeakReference(browser),
-                       restartRequired});
+    browserQueue.push({
+      browser: Cu.getWeakReference(browser),
+      restartRequired,
+    });
   },
 
   /**
    * This method is exposed for SessionStore to call if the user selects
    * a tab which will restore on demand. It's possible that the tab
    * is in this state because it recently crashed. If that's the case, then
    * it's also possible that the user has not seen the tab crash page for
    * that particular crash, in which case, we might show it to them instead
@@ -295,18 +325,17 @@ var TabCrashHandler = {
     let childID = this.browserMap.get(browser);
     // We will only show the tab crash page if:
     // 1) We are aware that this browser crashed
     // 2) We know we've never shown the tab crash page for the
     //    crash yet
     // 3) The user is not configured to automatically submit backlogged
     //    crash reports. If they are, we'll send the crash report
     //    immediately.
-    if (childID &&
-        this.unseenCrashedChildIDs.includes(childID)) {
+    if (childID && this.unseenCrashedChildIDs.includes(childID)) {
       if (UnsubmittedCrashHandler.autoSubmit) {
         let dumpID = this.childMap.get(childID);
         if (dumpID) {
           UnsubmittedCrashHandler.submitReports([dumpID]);
         }
       } else {
         this.sendToTabCrashedPage(browser);
         return true;
@@ -316,17 +345,19 @@ var TabCrashHandler = {
     return false;
   },
 
   sendToRestartRequiredPage(browser) {
     let uri = browser.currentURI;
     let gBrowser = browser.ownerGlobal.gBrowser;
     let tab = gBrowser.getTabForBrowser(browser);
     // The restart required page is non-remote by default.
-    gBrowser.updateBrowserRemoteness(browser, { remoteType: E10SUtils.NOT_REMOTE });
+    gBrowser.updateBrowserRemoteness(browser, {
+      remoteType: E10SUtils.NOT_REMOTE,
+    });
 
     browser.docShell.displayLoadError(Cr.NS_ERROR_BUILDID_MISMATCH, uri, null);
     tab.setAttribute("crashed", true);
 
     // Make sure to only count once even if there are multiple windows
     // that will all show about:restartrequired.
     if (this._crashedTabCount == 1) {
       Services.telemetry.scalarAdd("dom.contentprocess.buildID_mismatch", 1);
@@ -342,17 +373,19 @@ var TabCrashHandler = {
    *        The browser that has recently crashed.
    */
   sendToTabCrashedPage(browser) {
     let title = browser.contentTitle;
     let uri = browser.currentURI;
     let gBrowser = browser.ownerGlobal.gBrowser;
     let tab = gBrowser.getTabForBrowser(browser);
     // The tab crashed page is non-remote by default.
-    gBrowser.updateBrowserRemoteness(browser, { remoteType: E10SUtils.NOT_REMOTE });
+    gBrowser.updateBrowserRemoteness(browser, {
+      remoteType: E10SUtils.NOT_REMOTE,
+    });
 
     browser.setAttribute("crashedPageTitle", title);
     browser.docShell.displayLoadError(Cr.NS_ERROR_CONTENT_CRASHED, uri, null);
     browser.removeAttribute("crashedPageTitle");
     tab.setAttribute("crashed", true);
   },
 
   /**
@@ -401,33 +434,29 @@ var TabCrashHandler = {
 
     let childID = this.browserMap.get(browser);
     let dumpID = this.childMap.get(childID);
     if (!dumpID) {
       return;
     }
 
     if (!message.data.sendReport) {
-      Services.telemetry.getHistogramById("FX_CONTENT_CRASH_NOT_SUBMITTED").add(1);
+      Services.telemetry
+        .getHistogramById("FX_CONTENT_CRASH_NOT_SUBMITTED")
+        .add(1);
       this.prefs.setBoolPref("sendReport", false);
       return;
     }
 
-    let {
-      includeURL,
-      comments,
-      email,
-      emailMe,
-      URL,
-    } = message.data;
+    let { includeURL, comments, email, emailMe, URL } = message.data;
 
     let extraExtraKeyVals = {
-      "Comments": comments,
-      "Email": email,
-      "URL": URL,
+      Comments: comments,
+      Email: email,
+      URL,
     };
 
     // For the entries in extraExtraKeyVals, we only want to submit the
     // extra data values where they are not the empty string.
     for (let key in extraExtraKeyVals) {
       let val = extraExtraKeyVals[key].trim();
       if (!val) {
         delete extraExtraKeyVals[key];
@@ -456,26 +485,29 @@ var TabCrashHandler = {
     }
 
     this.childMap.set(childID, null); // Avoid resubmission.
     this.removeSubmitCheckboxesForSameCrash(childID);
   },
 
   removeSubmitCheckboxesForSameCrash(childID) {
     for (let window of Services.wm.getEnumerator("navigator:browser")) {
-      if (!window.gMultiProcessBrowser)
+      if (!window.gMultiProcessBrowser) {
         continue;
+      }
 
       for (let browser of window.gBrowser.browsers) {
-        if (browser.isRemoteBrowser)
+        if (browser.isRemoteBrowser) {
           continue;
+        }
 
         let doc = browser.contentDocument;
-        if (!doc.documentURI.startsWith("about:tabcrashed"))
+        if (!doc.documentURI.startsWith("about:tabcrashed")) {
           continue;
+        }
 
         if (this.browserMap.get(browser) == childID) {
           this.browserMap.delete(browser);
           let ports = this.pageListener.portsForBrowser(browser);
           if (ports.length) {
             // For about:tabcrashed, we don't expect subframes. We can
             // assume sending to the first port is sufficient.
             ports[0].sendAsyncMessage("CrashReportSent");
@@ -560,17 +592,19 @@ var TabCrashHandler = {
     });
 
     let browser = message.target.browser;
     let childID = this.browserMap.get(browser);
 
     // Make sure to only count once even if there are multiple windows
     // that will all show about:tabcrashed.
     if (this._crashedTabCount == 0 && childID) {
-      Services.telemetry.getHistogramById("FX_CONTENT_CRASH_NOT_SUBMITTED").add(1);
+      Services.telemetry
+        .getHistogramById("FX_CONTENT_CRASH_NOT_SUBMITTED")
+        .add(1);
     }
   },
 
   /**
    * For some <xul:browser>, return a crash report dump ID for that browser
    * if we have been informed of one. Otherwise, return null.
    *
    * @param browser (<xul:browser)
@@ -601,18 +635,19 @@ var SubframeCrashHandler = {
  * crash report directory for reports, and (if enabled), to
  * prompt the user to submit those reports. It might also
  * submit those reports automatically without prompting if
  * the user has opted in.
  */
 var UnsubmittedCrashHandler = {
   get prefs() {
     delete this.prefs;
-    return this.prefs =
-      Services.prefs.getBranch("browser.crashReports.unsubmittedCheck.");
+    return (this.prefs = Services.prefs.getBranch(
+      "browser.crashReports.unsubmittedCheck."
+    ));
   },
 
   get enabled() {
     return this.prefs.getBoolPref("enabled");
   },
 
   // showingNotification is set to true once a notification
   // is successfully shown, and then set back to false if
@@ -772,18 +807,19 @@ var UnsubmittedCrashHandler = {
       // this situation. Too many of these, and we'll assume the
       // user doesn't know or care about unsubmitted notifications,
       // and we'll suppress the notification for a while.
       let chances = this.prefs.getIntPref("chancesUntilSuppress");
       if (--chances < 0) {
         // We're out of chances!
         this.prefs.clearUserPref("chancesUntilSuppress");
         // We'll suppress for DAYS_TO_SUPPRESS days.
-        let suppressUntil =
-          this.dateString(new Date(Date.now() + (DAY * DAYS_TO_SUPPRESS)));
+        let suppressUntil = this.dateString(
+          new Date(Date.now() + DAY * DAYS_TO_SUPPRESS)
+        );
         this.prefs.setCharPref("suppressUntilDate", suppressUntil);
         return false;
       }
       this.prefs.setIntPref("chancesUntilSuppress", chances);
     }
 
     return true;
   },
@@ -797,18 +833,19 @@ var UnsubmittedCrashHandler = {
    * @returns The <xul:notification> if one is shown. null otherwise.
    */
   showPendingSubmissionsNotification(reportIDs) {
     let count = reportIDs.length;
     if (!count) {
       return null;
     }
 
-    let messageTemplate =
-      gNavigatorBundle.GetStringFromName("pendingCrashReports2.label");
+    let messageTemplate = gNavigatorBundle.GetStringFromName(
+      "pendingCrashReports2.label"
+    );
 
     let message = PluralForm.get(count, messageTemplate).replace("#1", count);
 
     let notification = this.show({
       notificationID: "pending-crash-reports",
       message,
       reportIDs,
       onAction: () => {
@@ -874,92 +911,107 @@ var UnsubmittedCrashHandler = {
     let chromeWin = BrowserWindowTracker.getTopWindow();
     if (!chromeWin) {
       // Can't show a notification in this case. We'll hopefully
       // get another opportunity to have the user submit their
       // crash reports later.
       return null;
     }
 
-    let notification = chromeWin.gNotificationBox
-                                .getNotificationWithValue(notificationID);
+    let notification = chromeWin.gNotificationBox.getNotificationWithValue(
+      notificationID
+    );
     if (notification) {
       return null;
     }
 
-    let buttons = [{
-      label: gNavigatorBundle.GetStringFromName("pendingCrashReports.send"),
-      callback: () => {
-        this.submitReports(reportIDs);
-        if (onAction) {
-          onAction();
-        }
+    let buttons = [
+      {
+        label: gNavigatorBundle.GetStringFromName("pendingCrashReports.send"),
+        callback: () => {
+          this.submitReports(reportIDs);
+          if (onAction) {
+            onAction();
+          }
+        },
       },
-    },
-    {
-      label: gNavigatorBundle.GetStringFromName("pendingCrashReports.alwaysSend"),
-      callback: () => {
-        this.autoSubmit = true;
-        this.submitReports(reportIDs);
-        if (onAction) {
-          onAction();
-        }
+      {
+        label: gNavigatorBundle.GetStringFromName(
+          "pendingCrashReports.alwaysSend"
+        ),
+        callback: () => {
+          this.autoSubmit = true;
+          this.submitReports(reportIDs);
+          if (onAction) {
+            onAction();
+          }
+        },
       },
-    },
-    {
-      label: gNavigatorBundle.GetStringFromName("pendingCrashReports.viewAll"),
-      callback() {
-        chromeWin.openTrustedLinkIn("about:crashes", "tab");
-        return true;
+      {
+        label: gNavigatorBundle.GetStringFromName(
+          "pendingCrashReports.viewAll"
+        ),
+        callback() {
+          chromeWin.openTrustedLinkIn("about:crashes", "tab");
+          return true;
+        },
       },
-    }];
+    ];
 
-    let eventCallback = (eventType) => {
+    let eventCallback = eventType => {
       if (eventType == "dismissed") {
         // The user intentionally dismissed the notification,
         // which we interpret as meaning that they don't care
         // to submit the reports. We'll ignore these particular
         // reports going forward.
         reportIDs.forEach(function(reportID) {
           CrashSubmit.ignore(reportID);
         });
         if (onAction) {
           onAction();
         }
       }
     };
 
-    return chromeWin.gNotificationBox.appendNotification(message,
-      notificationID, "chrome://browser/skin/tab-crashed.svg",
-      chromeWin.gNotificationBox.PRIORITY_INFO_HIGH, buttons, eventCallback);
+    return chromeWin.gNotificationBox.appendNotification(
+      message,
+      notificationID,
+      "chrome://browser/skin/tab-crashed.svg",
+      chromeWin.gNotificationBox.PRIORITY_INFO_HIGH,
+      buttons,
+      eventCallback
+    );
   },
 
   get autoSubmit() {
-    return Services.prefs
-                   .getBoolPref("browser.crashReports.unsubmittedCheck.autoSubmit2");
+    return Services.prefs.getBoolPref(
+      "browser.crashReports.unsubmittedCheck.autoSubmit2"
+    );
   },
 
   set autoSubmit(val) {
-    Services.prefs.setBoolPref("browser.crashReports.unsubmittedCheck.autoSubmit2",
-                               val);
+    Services.prefs.setBoolPref(
+      "browser.crashReports.unsubmittedCheck.autoSubmit2",
+      val
+    );
   },
 
   /**
    * Attempt to submit reports to the crash report server. Each
    * report will have the "SubmittedFromInfobar" extra key set
    * to true.
    *
    * @param reportIDs (Array<string>)
    *        The array of reportIDs to submit.
    */
   submitReports(reportIDs) {
     for (let reportID of reportIDs) {
       CrashSubmit.submit(reportID, {
         extraExtraKeyVals: {
-          "SubmittedFromInfobar": true,
+          SubmittedFromInfobar: true,
         },
       }).catch(Cu.reportError);
     }
   },
 };
 
 var PluginCrashReporter = {
   /**
@@ -985,55 +1037,65 @@ var PluginCrashReporter = {
     Services.obs.removeObserver(this, "profile-after-change");
     this.initialized = false;
   },
 
   observe(subject, topic, data) {
     switch (topic) {
       case "plugin-crashed": {
         let propertyBag = subject;
-        if (!(propertyBag instanceof Ci.nsIPropertyBag2) ||
-            !(propertyBag instanceof Ci.nsIWritablePropertyBag2) ||
-            !propertyBag.hasKey("runID") ||
-            !propertyBag.hasKey("pluginDumpID")) {
-          Cu.reportError("PluginCrashReporter can not read plugin information.");
+        if (
+          !(propertyBag instanceof Ci.nsIPropertyBag2) ||
+          !(propertyBag instanceof Ci.nsIWritablePropertyBag2) ||
+          !propertyBag.hasKey("runID") ||
+          !propertyBag.hasKey("pluginDumpID")
+        ) {
+          Cu.reportError(
+            "PluginCrashReporter can not read plugin information."
+          );
           return;
         }
 
         let runID = propertyBag.getPropertyAsUint32("runID");
         let pluginDumpID = propertyBag.getPropertyAsAString("pluginDumpID");
         let browserDumpID = propertyBag.getPropertyAsAString("browserDumpID");
         if (pluginDumpID) {
           this.crashReports.set(runID, { pluginDumpID, browserDumpID });
         }
         break;
       }
       case "gmp-plugin-crash": {
         let propertyBag = subject;
-        if (!(propertyBag instanceof Ci.nsIWritablePropertyBag2) ||
-            !propertyBag.hasKey("pluginID") ||
-            !propertyBag.hasKey("pluginDumpID") ||
-            !propertyBag.hasKey("pluginName")) {
-          Cu.reportError("PluginCrashReporter can not read plugin information.");
+        if (
+          !(propertyBag instanceof Ci.nsIWritablePropertyBag2) ||
+          !propertyBag.hasKey("pluginID") ||
+          !propertyBag.hasKey("pluginDumpID") ||
+          !propertyBag.hasKey("pluginName")
+        ) {
+          Cu.reportError(
+            "PluginCrashReporter can not read plugin information."
+          );
           return;
         }
 
         let pluginID = propertyBag.getPropertyAsUint32("pluginID");
         let pluginDumpID = propertyBag.getPropertyAsAString("pluginDumpID");
         if (pluginDumpID) {
           this.crashReports.set(pluginID, { pluginDumpID });
         }
 
         // Only the parent process gets the gmp-plugin-crash observer
         // notification, so we need to inform any content processes that
         // the GMP has crashed.
         if (Services.ppmm) {
           let pluginName = propertyBag.getPropertyAsAString("pluginName");
-          Services.ppmm.broadcastAsyncMessage("gmp-plugin-crash",
-                                              { pluginName, pluginID });
+          Services.ppmm.broadcastAsyncMessage("gmp-plugin-crash", {
+            pluginName,
+            pluginID,
+          });
         }
         break;
       }
       case "profile-after-change":
         this.uninit();
         break;
     }
   },
@@ -1049,47 +1111,55 @@ var PluginCrashReporter = {
    * @param keyVals
    *        An object whose key-value pairs will be merged
    *        with the ".extra" file submitted with the report.
    *        The properties of htis object will override properties
    *        of the same name in the .extra file.
    */
   submitCrashReport(runID, keyVals) {
     if (!this.crashReports.has(runID)) {
-      Cu.reportError(`Could not find plugin dump IDs for run ID ${runID}.` +
-                     `It is possible that a report was already submitted.`);
+      Cu.reportError(
+        `Could not find plugin dump IDs for run ID ${runID}.` +
+          `It is possible that a report was already submitted.`
+      );
       return;
     }
 
     keyVals = keyVals || {};
     let { pluginDumpID, browserDumpID } = this.crashReports.get(runID);
 
     let submissionPromise = CrashSubmit.submit(pluginDumpID, {
       recordSubmission: true,
       extraExtraKeyVals: keyVals,
     });
 
-    if (browserDumpID)
+    if (browserDumpID) {
       CrashSubmit.submit(browserDumpID).catch(Cu.reportError);
+    }
 
     this.broadcastState(runID, "submitting");
 
-    submissionPromise.then(() => {
-      this.broadcastState(runID, "success");
-    }, () => {
-      this.broadcastState(runID, "failed");
-    });
+    submissionPromise.then(
+      () => {
+        this.broadcastState(runID, "success");
+      },
+      () => {
+        this.broadcastState(runID, "failed");
+      }
+    );
 
     this.crashReports.delete(runID);
   },
 
   broadcastState(runID, state) {
     for (let window of Services.wm.getEnumerator("navigator:browser")) {
       let mm = window.messageManager;
-      mm.broadcastAsyncMessage("BrowserPlugins:CrashReportSubmitted",
-                               { runID, state });
+      mm.broadcastAsyncMessage("BrowserPlugins:CrashReportSubmitted", {
+        runID,
+        state,
+      });
     }
   },
 
   hasCrashReport(runID) {
     return this.crashReports.has(runID);
   },
 };
--- a/browser/modules/ContentMetaHandler.jsm
+++ b/browser/modules/ContentMetaHandler.jsm
@@ -1,15 +1,17 @@
 /* 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/. */
 
 "use strict";
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 XPCOMUtils.defineLazyGlobalGetters(this, ["URL"]);
 
 // Debounce time in milliseconds - this should be long enough to account for
 // sync script tags that could appear between desired meta tags
 const TIMEOUT_DELAY = 1000;
 
 const ACCEPTED_PROTOCOLS = ["http:", "https:"];
 
@@ -57,24 +59,28 @@ function shouldExtractMetadata(aRules, a
  */
 function checkLoadURIStr(aURL) {
   if (!ACCEPTED_PROTOCOLS.includes(aURL.protocol)) {
     return false;
   }
   try {
     let ssm = Services.scriptSecurityManager;
     let principal = ssm.createNullPrincipal({});
-    ssm.checkLoadURIStrWithPrincipal(principal, aURL.href, ssm.DISALLOW_INHERIT_PRINCIPAL);
+    ssm.checkLoadURIStrWithPrincipal(
+      principal,
+      aURL.href,
+      ssm.DISALLOW_INHERIT_PRINCIPAL
+    );
   } catch (e) {
     return false;
   }
   return true;
 }
 
-var EXPORTED_SYMBOLS = [ "ContentMetaHandler" ];
+var EXPORTED_SYMBOLS = ["ContentMetaHandler"];
 
 /*
  * This listens to DOMMetaAdded events and collects relevant metadata about the
  * meta tag received. Then, it sends the metadata gathered from the meta tags
  * and the url of the page as it's payload to be inserted into moz_places.
  */
 
 var ContentMetaHandler = {
@@ -89,31 +95,30 @@ var ContentMetaHandler = {
       // If there's no meta tag, or we're in a sub-frame, ignore this
       if (!metaTag || !metaTag.ownerDocument || window != window.top) {
         return;
       }
       this.handleMetaTag(metaTag, chromeGlobal, metaTags);
     });
   },
 
-
   handleMetaTag(metaTag, chromeGlobal, metaTags) {
     const url = metaTag.ownerDocument.documentURI;
 
     let name = metaTag.name;
     let prop = metaTag.getAttributeNS(null, "property");
     if (!name && !prop) {
       return;
     }
 
     let tag = name || prop;
 
     const entry = metaTags.get(url) || {
-      description: {value: null, currMaxScore: -1},
-      image: {value: null, currMaxScore: -1},
+      description: { value: null, currMaxScore: -1 },
+      image: { value: null, currMaxScore: -1 },
       timeout: null,
     };
 
     // Malformed meta tag - do not store it
     const content = metaTag.getAttributeNS(null, "content");
     if (!content) {
       return;
     }
@@ -144,27 +149,35 @@ var ContentMetaHandler = {
     }
 
     if (entry.timeout) {
       entry.timeout.delay = TIMEOUT_DELAY;
     } else {
       // We want to debounce incoming meta tags until we're certain we have the
       // best one for description and preview image, and only store that one
       entry.timeout = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
-      entry.timeout.initWithCallback(() => {
-        entry.timeout = null;
+      entry.timeout.initWithCallback(
+        () => {
+          entry.timeout = null;
+
+          // Save description and preview image to moz_places
+          chromeGlobal.sendAsyncMessage("Meta:SetPageInfo", {
+            url,
+            description: entry.description.value,
+            previewImageURL: entry.image.value,
+          });
 
-        // Save description and preview image to moz_places
-        chromeGlobal.sendAsyncMessage("Meta:SetPageInfo", {
-          url,
-          description: entry.description.value,
-          previewImageURL: entry.image.value,
-        });
-
-        // Telemetry for recording the size of page metadata
-        let metadataSize = entry.description.value ? entry.description.value.length : 0;
-        metadataSize += entry.image.value ? entry.image.value.length : 0;
-        Services.telemetry.getHistogramById("PAGE_METADATA_SIZE").add(metadataSize);
-        metaTags.delete(url);
-      }, TIMEOUT_DELAY, Ci.nsITimer.TYPE_ONE_SHOT);
+          // Telemetry for recording the size of page metadata
+          let metadataSize = entry.description.value
+            ? entry.description.value.length
+            : 0;
+          metadataSize += entry.image.value ? entry.image.value.length : 0;
+          Services.telemetry
+            .getHistogramById("PAGE_METADATA_SIZE")
+            .add(metadataSize);
+          metaTags.delete(url);
+        },
+        TIMEOUT_DELAY,
+        Ci.nsITimer.TYPE_ONE_SHOT
+      );
     }
   },
 };
--- a/browser/modules/ContentObservers.js
+++ b/browser/modules/ContentObservers.js
@@ -9,20 +9,23 @@
  * observer service notifications to the chrome process through
  * message passing. Using a process script avoids having them in
  * content.js and thereby registering N observers for N open tabs,
  * which is bad for perf.
  */
 
 "use strict";
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-ChromeUtils.defineModuleGetter(this, "WebRTCChild",
-  "resource:///actors/WebRTCChild.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "WebRTCChild",
+  "resource:///actors/WebRTCChild.jsm"
+);
 
 var gEMEUIObserver = function(subject, topic, data) {
   let win = subject.top;
   let mm = getMessageManagerForWindow(win);
   if (mm) {
     mm.sendAsyncMessage("EMEVideo:ContentMediaKeysRequest", data);
   }
 };
@@ -37,33 +40,35 @@ var gDecoderDoctorObserver = function(su
 
 function getMessageManagerForWindow(aContentWindow) {
   return aContentWindow.docShell.messageManager;
 }
 
 Services.obs.addObserver(gEMEUIObserver, "mediakeys-request");
 Services.obs.addObserver(gDecoderDoctorObserver, "decoder-doctor-notification");
 
-
 // WebRTCChild observer registration.
-const kWebRTCObserverTopics = ["getUserMedia:request",
-                               "recording-device-stopped",
-                               "PeerConnection:request",
-                               "recording-device-events",
-                               "recording-window-ended"];
+const kWebRTCObserverTopics = [
+  "getUserMedia:request",
+  "recording-device-stopped",
+  "PeerConnection:request",
+  "recording-device-events",
+  "recording-window-ended",
+];
 
 function webRTCObserve(aSubject, aTopic, aData) {
   WebRTCChild.observe(aSubject, aTopic, aData);
 }
 
 for (let topic of kWebRTCObserverTopics) {
   Services.obs.addObserver(webRTCObserve, topic);
 }
 
-if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT)
+if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) {
   Services.obs.addObserver(processShutdown, "content-child-shutdown");
+}
 
 function processShutdown() {
   for (let topic of kWebRTCObserverTopics) {
     Services.obs.removeObserver(webRTCObserve, topic);
   }
   Services.obs.removeObserver(processShutdown, "content-child-shutdown");
 }
--- a/browser/modules/ContentSearch.jsm
+++ b/browser/modules/ContentSearch.jsm
@@ -1,28 +1,37 @@
 /* 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/. */
 "use strict";
 
-var EXPORTED_SYMBOLS = [
-  "ContentSearch",
-];
+var EXPORTED_SYMBOLS = ["ContentSearch"];
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 
 XPCOMUtils.defineLazyGlobalGetters(this, ["XMLHttpRequest"]);
 
-ChromeUtils.defineModuleGetter(this, "FormHistory",
-  "resource://gre/modules/FormHistory.jsm");
-ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils",
-  "resource://gre/modules/PrivateBrowsingUtils.jsm");
-ChromeUtils.defineModuleGetter(this, "SearchSuggestionController",
-  "resource://gre/modules/SearchSuggestionController.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "FormHistory",
+  "resource://gre/modules/FormHistory.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "PrivateBrowsingUtils",
+  "resource://gre/modules/PrivateBrowsingUtils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "SearchSuggestionController",
+  "resource://gre/modules/SearchSuggestionController.jsm"
+);
 
 const INBOUND_MESSAGE = "ContentSearch";
 const OUTBOUND_MESSAGE = INBOUND_MESSAGE;
 const MAX_LOCAL_SUGGESTIONS = 3;
 const MAX_SUGGESTIONS = 6;
 
 /**
  * ContentSearch receives messages named INBOUND_MESSAGE and sends messages
@@ -82,17 +91,16 @@ const MAX_SUGGESTIONS = 6;
  *     data: see _onMessageGetSuggestions
  *   SuggestionsCancelled
  *     Sent in reply to GetSuggestions when pending GetSuggestions events are
  *     cancelled.
  *     data: null
  */
 
 var ContentSearch = {
-
   // Inbound events are queued and processed in FIFO order instead of handling
   // them immediately, which would result in non-FIFO responses due to the
   // asynchrononicity added by converting image data URIs to ArrayBuffers.
   _eventQueue: [],
   _currentEventPromise: null,
 
   // This is used to handle search suggestions.  It maps xul:browsers to objects
   // { controller, previousFormHistoryResult }.  See _onMessageGetSuggestions.
@@ -105,30 +113,40 @@ var ContentSearch = {
   // fetch cancellation from _cancelSuggestions.
   _currentSuggestion: null,
 
   init() {
     Services.obs.addObserver(this, "browser-search-engine-modified");
     Services.obs.addObserver(this, "browser-search-service");
     Services.obs.addObserver(this, "shutdown-leaks-before-check");
     Services.prefs.addObserver("browser.search.hiddenOneOffs", this);
-    this._stringBundle = Services.strings.createBundle("chrome://global/locale/autocomplete.properties");
+    this._stringBundle = Services.strings.createBundle(
+      "chrome://global/locale/autocomplete.properties"
+    );
   },
 
   get searchSuggestionUIStrings() {
     if (this._searchSuggestionUIStrings) {
       return this._searchSuggestionUIStrings;
     }
     this._searchSuggestionUIStrings = {};
-    let searchBundle = Services.strings.createBundle("chrome://browser/locale/search.properties");
-    let stringNames = ["searchHeader", "searchForSomethingWith2",
-                       "searchWithHeader", "searchSettings"];
+    let searchBundle = Services.strings.createBundle(
+      "chrome://browser/locale/search.properties"
+    );
+    let stringNames = [
+      "searchHeader",
+      "searchForSomethingWith2",
+      "searchWithHeader",
+      "searchSettings",
+    ];
 
     for (let name of stringNames) {
-      this._searchSuggestionUIStrings[name] = searchBundle.GetStringFromName(name);
+      this._searchSuggestionUIStrings[name] = searchBundle.GetStringFromName(
+        name
+      );
     }
     return this._searchSuggestionUIStrings;
   },
 
   destroy() {
     if (this._destroyedPromise) {
       return this._destroyedPromise;
     }
@@ -181,32 +199,34 @@ var ContentSearch = {
       type: "Message",
       data: msg,
     });
     this._processEventQueue();
   },
 
   observe(subj, topic, data) {
     switch (topic) {
-    case "browser-search-service":
-      if (data != "init-complete") {
+      case "browser-search-service":
+        if (data != "init-complete") {
+          break;
+        }
+      case "nsPref:changed":
+      case "browser-search-engine-modified":
+        this._eventQueue.push({
+          type: "Observe",
+          data,
+        });
+        this._processEventQueue();
         break;
-      }
-    case "nsPref:changed":
-    case "browser-search-engine-modified":
-      this._eventQueue.push({
-        type: "Observe",
-        data,
-      });
-      this._processEventQueue();
-      break;
-    case "shutdown-leaks-before-check":
-      subj.wrappedJSObject.client.addBlocker(
-        "ContentSearch: Wait until the service is destroyed", () => this.destroy());
-      break;
+      case "shutdown-leaks-before-check":
+        subj.wrappedJSObject.client.addBlocker(
+          "ContentSearch: Wait until the service is destroyed",
+          () => this.destroy()
+        );
+        break;
     }
   },
 
   removeFormHistoryEntry(msg, entry) {
     let browserData = this._suggestionDataForBrowser(msg.target);
     if (browserData && browserData.previousFormHistoryResult) {
       let { previousFormHistoryResult } = browserData;
       for (let i = 0; i < previousFormHistoryResult.matchCount; i++) {
@@ -221,17 +241,21 @@ var ContentSearch = {
   performSearch(msg, data) {
     this._ensureDataHasProperties(data, [
       "engineName",
       "searchString",
       "healthReportKey",
       "searchPurpose",
     ]);
     let engine = Services.search.getEngineByName(data.engineName);
-    let submission = engine.getSubmission(data.searchString, "", data.searchPurpose);
+    let submission = engine.getSubmission(
+      data.searchString,
+      "",
+      data.searchPurpose
+    );
     let browser = msg.target;
     let win = browser.ownerGlobal;
     if (!win) {
       // The browser may have been closed between the time its content sent the
       // message and the time we handle it.
       return;
     }
     let where = win.whereToOpenLink(data.originalEvent);
@@ -242,29 +266,36 @@ var ContentSearch = {
     // where === "current"), openUILinkIn will not work because that tab is no
     // longer the current one. For this case we manually load the URI.
     if (where === "current") {
       // Since we're going to load the search in the same browser, blur the search
       // UI to prevent further interaction before we start loading.
       this._reply(msg, "Blur");
       browser.loadURI(submission.uri.spec, {
         postData: submission.postData,
-        triggeringPrincipal: Services.scriptSecurityManager.createNullPrincipal({
-          userContextId: win.gBrowser.selectedBrowser.getAttribute("userContextId"),
-        }),
+        triggeringPrincipal: Services.scriptSecurityManager.createNullPrincipal(
+          {
+            userContextId: win.gBrowser.selectedBrowser.getAttribute(
+              "userContextId"
+            ),
+          }
+        ),
       });
     } else {
       let params = {
         postData: submission.postData,
-        inBackground: Services.prefs.getBoolPref("browser.tabs.loadInBackground"),
+        inBackground: Services.prefs.getBoolPref(
+          "browser.tabs.loadInBackground"
+        ),
       };
       win.openTrustedLinkIn(submission.uri.spec, where, params);
     }
-    win.BrowserSearch.recordSearchInTelemetry(engine, data.healthReportKey,
-                                              { selection: data.selection });
+    win.BrowserSearch.recordSearchInTelemetry(engine, data.healthReportKey, {
+      selection: data.selection,
+    });
   },
 
   async getSuggestions(engineName, searchString, browser) {
     let engine = Services.search.getEngineByName(engineName);
     if (!engine) {
       throw new Error("Unknown engine name: " + engineName);
     }
 
@@ -310,26 +341,29 @@ var ContentSearch = {
       isPrivate = PrivateBrowsingUtils.isBrowserPrivate(browser.target);
     } catch (err) {
       return false;
     }
     if (isPrivate || entry === "") {
       return false;
     }
     let browserData = this._suggestionDataForBrowser(browser.target, true);
-    FormHistory.update({
-      op: "bump",
-      fieldname: browserData.controller.formHistoryParam,
-      value: entry,
-    }, {
-      handleCompletion: () => {},
-      handleError: err => {
-        Cu.reportError("Error adding form history entry: " + err);
+    FormHistory.update(
+      {
+        op: "bump",
+        fieldname: browserData.controller.formHistoryParam,
+        value: entry,
       },
-    });
+      {
+        handleCompletion: () => {},
+        handleError: err => {
+          Cu.reportError("Error adding form history entry: " + err);
+        },
+      }
+    );
     return true;
   },
 
   async currentStateObj() {
     let state = {
       engines: [],
       currentEngine: await this._currentEngineObj(),
     };
@@ -367,17 +401,20 @@ var ContentSearch = {
         this._processEventQueue();
       }
     })();
   },
 
   _cancelSuggestions(msg) {
     let cancelled = false;
     // cancel active suggestion request
-    if (this._currentSuggestion && this._currentSuggestion.target === msg.target) {
+    if (
+      this._currentSuggestion &&
+      this._currentSuggestion.target === msg.target
+    ) {
       this._currentSuggestion.controller.stop();
       cancelled = true;
     }
     // cancel queued suggestion requests
     for (let i = 0; i < this._eventQueue.length; i++) {
       let m = this._eventQueue[i].data;
       if (msg.target === m.target && m.data.type === "GetSuggestions") {
         this._eventQueue.splice(i, 1);
@@ -419,22 +456,23 @@ var ContentSearch = {
     Services.search.defaultEngine = Services.search.getEngineByName(data);
   },
 
   _onMessageManageEngines(msg) {
     msg.target.ownerGlobal.openPreferences("paneSearch");
   },
 
   async _onMessageGetSuggestions(msg, data) {
-    this._ensureDataHasProperties(data, [
-      "engineName",
-      "searchString",
-    ]);
-    let {engineName, searchString} = data;
-    let suggestions = await this.getSuggestions(engineName, searchString, msg.target);
+    this._ensureDataHasProperties(data, ["engineName", "searchString"]);
+    let { engineName, searchString } = data;
+    let suggestions = await this.getSuggestions(
+      engineName,
+      searchString,
+      msg.target
+    );
 
     this._reply(msg, "Suggestions", {
       engineName: data.engineName,
       searchString: suggestions.term,
       formHistory: suggestions.local,
       remote: suggestions.remote,
     });
   },
@@ -492,27 +530,32 @@ var ContentSearch = {
     }
   },
 
   _broadcast(type, data) {
     Services.mm.broadcastAsyncMessage(...this._msgArgs(type, data));
   },
 
   _msgArgs(type, data) {
-    return [OUTBOUND_MESSAGE, {
-      type,
-      data,
-    }];
+    return [
+      OUTBOUND_MESSAGE,
+      {
+        type,
+        data,
+      },
+    ];
   },
 
   async _currentEngineObj() {
     let engine = Services.search.defaultEngine;
     let favicon = engine.getIconURLBySize(16, 16);
     let placeholder = this._stringBundle.formatStringFromName(
-      "searchWithEngine", [engine.name]);
+      "searchWithEngine",
+      [engine.name]
+    );
     let obj = {
       name: engine.name,
       placeholder,
       iconData: await this._maybeConvertURIToArrayBuffer(favicon),
     };
     return obj;
   },
 
--- a/browser/modules/Discovery.jsm
+++ b/browser/modules/Discovery.jsm
@@ -1,24 +1,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/. */
- "use strict";
+"use strict";
+
+var EXPORTED_SYMBOLS = ["Discovery"];
 
-var EXPORTED_SYMBOLS = [
-  "Discovery",
-];
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-ChromeUtils.defineModuleGetter(this, "ClientID",
-                               "resource://gre/modules/ClientID.jsm");
-ChromeUtils.defineModuleGetter(this, "ContextualIdentityService",
-                               "resource://gre/modules/ContextualIdentityService.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "ClientID",
+  "resource://gre/modules/ClientID.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "ContextualIdentityService",
+  "resource://gre/modules/ContextualIdentityService.jsm"
+);
 
 const RECOMMENDATION_ENABLED = "browser.discovery.enabled";
 const TELEMETRY_ENABLED = "datareporting.healthreport.uploadEnabled";
 const TAAR_COOKIE_NAME = "taarId";
 
 const Discovery = {
   set enabled(val) {
     val = !!val;
@@ -36,35 +42,53 @@ const Discovery = {
     return DiscoveryInternal.update(true);
   },
 
   update() {
     return DiscoveryInternal.update();
   },
 };
 
-XPCOMUtils.defineLazyPreferenceGetter(this, "gRecommendationEnabled",
-                                      RECOMMENDATION_ENABLED, false,
-                                      Discovery.update);
-XPCOMUtils.defineLazyPreferenceGetter(this, "gTelemetryEnabled",
-                                      TELEMETRY_ENABLED, false,
-                                      Discovery.update);
-XPCOMUtils.defineLazyPreferenceGetter(this, "gCachedClientID",
-                                      "toolkit.telemetry.cachedClientID", "",
-                                      Discovery.reset);
-XPCOMUtils.defineLazyPreferenceGetter(this, "gContainersEnabled",
-                                      "browser.discovery.containers.enabled", false,
-                                      Discovery.reset);
+XPCOMUtils.defineLazyPreferenceGetter(
+  this,
+  "gRecommendationEnabled",
+  RECOMMENDATION_ENABLED,
+  false,
+  Discovery.update
+);
+XPCOMUtils.defineLazyPreferenceGetter(
+  this,
+  "gTelemetryEnabled",
+  TELEMETRY_ENABLED,
+  false,
+  Discovery.update
+);
+XPCOMUtils.defineLazyPreferenceGetter(
+  this,
+  "gCachedClientID",
+  "toolkit.telemetry.cachedClientID",
+  "",
+  Discovery.reset
+);
+XPCOMUtils.defineLazyPreferenceGetter(
+  this,
+  "gContainersEnabled",
+  "browser.discovery.containers.enabled",
+  false,
+  Discovery.reset
+);
 
 Services.obs.addObserver(Discovery.update, "contextual-identity-created");
 
 const DiscoveryInternal = {
   get sites() {
     delete this.sites;
-    this.sites = Services.prefs.getCharPref("browser.discovery.sites", "").split(",");
+    this.sites = Services.prefs
+      .getCharPref("browser.discovery.sites", "")
+      .split(",");
     return this.sites;
   },
 
   getContextualIDs() {
     // There is never a zero id, this is just for use in update.
     let IDs = [0];
     if (gContainersEnabled) {
       ContextualIdentityService.getPublicIdentities().forEach(identity => {
@@ -74,18 +98,20 @@ const DiscoveryInternal = {
     return IDs;
   },
 
   async update(reset = false) {
     if (reset || !Discovery.enabled) {
       for (let site of this.sites) {
         Services.cookies.remove(site, TAAR_COOKIE_NAME, "/", false, {});
         ContextualIdentityService.getPublicIdentities().forEach(identity => {
-          let {userContextId} = identity;
-          Services.cookies.remove(site, TAAR_COOKIE_NAME, "/", false, {userContextId});
+          let { userContextId } = identity;
+          Services.cookies.remove(site, TAAR_COOKIE_NAME, "/", false, {
+            userContextId,
+          });
         });
       }
     }
 
     if (Discovery.enabled) {
       // If the client id is not cached, wait for the notification that it is
       // cached.  This will happen shortly after startup in TelemetryController.jsm.
       // When that happens, we'll get a pref notification for the cached id,
@@ -93,27 +119,39 @@ const DiscoveryInternal = {
       if (!gCachedClientID) {
         return;
       }
       let id = await ClientID.getClientIdHash();
       for (let site of this.sites) {
         // This cookie gets tied down as much as possible.  Specifically,
         // SameSite, Secure, HttpOnly and non-PrivateBrowsing.
         for (let userContextId of this.getContextualIDs()) {
-          let originAttributes = {privateBrowsingId: 0};
+          let originAttributes = { privateBrowsingId: 0 };
           if (userContextId > 0) {
             originAttributes.userContextId = userContextId;
           }
-          if (Services.cookies.cookieExists(site, "/", TAAR_COOKIE_NAME, originAttributes)) {
+          if (
+            Services.cookies.cookieExists(
+              site,
+              "/",
+              TAAR_COOKIE_NAME,
+              originAttributes
+            )
+          ) {
             continue;
           }
-          Services.cookies.add(site, "/", TAAR_COOKIE_NAME, id,
-                              true, // secure
-                              true, // httpOnly
-                              true, // session
-                              Date.now(),
-                              originAttributes,
-                              Ci.nsICookie.SAMESITE_LAX);
+          Services.cookies.add(
+            site,
+            "/",
+            TAAR_COOKIE_NAME,
+            id,
+            true, // secure
+            true, // httpOnly
+            true, // session
+            Date.now(),
+            originAttributes,
+            Ci.nsICookie.SAMESITE_LAX
+          );
         }
       }
     }
   },
 };
--- a/browser/modules/EveryWindow.jsm
+++ b/browser/modules/EveryWindow.jsm
@@ -23,25 +23,27 @@ var EXPORTED_SYMBOLS = ["EveryWindow"];
  * init is called on every existing window at the time of registration,
  * and on all future windows at browser-delayed-startup-finished.
  *
  * uninit is called on every existing window if requested at the time
  * of unregistration, and at the time of domwindowclosed.
  * If the window is closing, a second argument is passed with value `true`.
  */
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var initialized = false;
 var callbacks = new Map();
 
 function callForEveryWindow(callback) {
   let windowList = Services.wm.getEnumerator("navigator:browser");
   for (let win of windowList) {
-    win.delayedStartupPromise.then(() => { callback(win); });
+    win.delayedStartupPromise.then(() => {
+      callback(win);
+    });
   }
 }
 
 this.EveryWindow = {
   /**
    * Registers init and uninit functions to be called on every window.
    *
    * @param {string} id A unique identifier for the consumer, to be
@@ -53,17 +55,17 @@ this.EveryWindow = {
    * @returns {boolean} Returns false if the id was taken, else true.
    */
   registerCallback: function EW_registerCallback(id, init, uninit) {
     if (callbacks.has(id)) {
       return false;
     }
 
     if (!initialized) {
-      let addUnloadListener = (win) => {
+      let addUnloadListener = win => {
         function observer(subject, topic, data) {
           if (topic == "domwindowclosed" && subject === win) {
             Services.ww.unregisterNotification(observer);
             for (let c of callbacks.values()) {
               c.uninit(win, true);
             }
           }
         }
@@ -78,17 +80,17 @@ this.EveryWindow = {
       }, "browser-delayed-startup-finished");
 
       callForEveryWindow(addUnloadListener);
 
       initialized = true;
     }
 
     callForEveryWindow(init);
-    callbacks.set(id, {id, init, uninit});
+    callbacks.set(id, { id, init, uninit });
 
     return true;
   },
 
   /**
    * Unregisters a previously registered consumer.
    *
    * @param {string} id The id to unregister.
--- a/browser/modules/ExtensionsUI.jsm
+++ b/browser/modules/ExtensionsUI.jsm
@@ -1,71 +1,97 @@
 /* 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/. */
 "use strict";
 
 var EXPORTED_SYMBOLS = ["ExtensionsUI"];
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-const {EventEmitter} = ChromeUtils.import("resource://gre/modules/EventEmitter.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
+const { EventEmitter } = ChromeUtils.import(
+  "resource://gre/modules/EventEmitter.jsm"
+);
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   AddonManager: "resource://gre/modules/AddonManager.jsm",
   AddonManagerPrivate: "resource://gre/modules/AddonManager.jsm",
-  AMTelemetry:  "resource://gre/modules/AddonManager.jsm",
+  AMTelemetry: "resource://gre/modules/AddonManager.jsm",
   AppMenuNotifications: "resource://gre/modules/AppMenuNotifications.jsm",
   BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
   ExtensionData: "resource://gre/modules/Extension.jsm",
   ExtensionPermissions: "resource://gre/modules/ExtensionPermissions.jsm",
   PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
   Services: "resource://gre/modules/Services.jsm",
 });
 
-XPCOMUtils.defineLazyPreferenceGetter(this, "WEBEXT_PERMISSION_PROMPTS",
-                                      "extensions.webextPermissionPrompts", false);
-XPCOMUtils.defineLazyPreferenceGetter(this, "allowPrivateBrowsingByDefault",
-                                      "extensions.allowPrivateBrowsingByDefault", true);
-XPCOMUtils.defineLazyPreferenceGetter(this, "privateNotificationShown",
-                                      "extensions.privatebrowsing.notification", false);
-XPCOMUtils.defineLazyPreferenceGetter(this, "SUPPORT_URL", "app.support.baseURL",
-                                      "", null, val => Services.urlFormatter.formatURL(val));
+XPCOMUtils.defineLazyPreferenceGetter(
+  this,
+  "WEBEXT_PERMISSION_PROMPTS",
+  "extensions.webextPermissionPrompts",
+  false
+);
+XPCOMUtils.defineLazyPreferenceGetter(
+  this,
+  "allowPrivateBrowsingByDefault",
+  "extensions.allowPrivateBrowsingByDefault",
+  true
+);
+XPCOMUtils.defineLazyPreferenceGetter(
+  this,
+  "privateNotificationShown",
+  "extensions.privatebrowsing.notification",
+  false
+);
+XPCOMUtils.defineLazyPreferenceGetter(
+  this,
+  "SUPPORT_URL",
+  "app.support.baseURL",
+  "",
+  null,
+  val => Services.urlFormatter.formatURL(val)
+);
 
-const DEFAULT_EXTENSION_ICON = "chrome://mozapps/skin/extensions/extensionGeneric.svg";
+const DEFAULT_EXTENSION_ICON =
+  "chrome://mozapps/skin/extensions/extensionGeneric.svg";
 
 const BROWSER_PROPERTIES = "chrome://browser/locale/browser.properties";
 const BRAND_PROPERTIES = "chrome://branding/locale/brand.properties";
 
 const HTML_NS = "http://www.w3.org/1999/xhtml";
 
 function getTabBrowser(browser) {
   while (browser.ownerGlobal.docShell.itemType !== Ci.nsIDocShell.typeChrome) {
     browser = browser.ownerGlobal.docShell.chromeEventHandler;
   }
-  return {browser, window: browser.ownerGlobal};
+  return { browser, window: browser.ownerGlobal };
 }
 
 var ExtensionsUI = {
   sideloaded: new Set(),
   updates: new Set(),
   sideloadListener: null,
   histogram: null,
 
   pendingNotifications: new WeakMap(),
 
   async init() {
-    this.histogram = Services.telemetry.getHistogramById("EXTENSION_INSTALL_PROMPT_RESULT");
+    this.histogram = Services.telemetry.getHistogramById(
+      "EXTENSION_INSTALL_PROMPT_RESULT"
+    );
 
     Services.obs.addObserver(this, "webextension-permission-prompt");
     Services.obs.addObserver(this, "webextension-update-permissions");
     Services.obs.addObserver(this, "webextension-install-notify");
     Services.obs.addObserver(this, "webextension-optional-permission-prompt");
     Services.obs.addObserver(this, "webextension-defaultsearch-prompt");
 
-    await Services.wm.getMostRecentWindow("navigator:browser").delayedStartupPromise;
+    await Services.wm.getMostRecentWindow("navigator:browser")
+      .delayedStartupPromise;
 
     this._checkForSideloaded();
   },
 
   async _checkForSideloaded() {
     let sideloaded = await AddonManagerPrivate.getNewSideloads();
 
     if (!sideloaded.length) {
@@ -95,35 +121,37 @@ var ExtensionsUI = {
           },
         };
         AddonManager.addAddonListener(this.sideloadListener);
       }
 
       for (let addon of sideloaded) {
         this.sideloaded.add(addon);
       }
-        this._updateNotifications();
+      this._updateNotifications();
     }
   },
 
   _updateNotifications() {
     if (this.sideloaded.size + this.updates.size == 0) {
       AppMenuNotifications.removeNotification("addon-alert");
     } else {
       AppMenuNotifications.showBadgeOnlyNotification("addon-alert");
     }
     this.emit("change");
   },
 
   showAddonsManager(browser, strings, icon, histkey) {
     let global = browser.selectedBrowser.ownerGlobal;
-    return global.BrowserOpenAddonsMgr("addons://list/extension").then(aomWin => {
-      let aomBrowser = aomWin.docShell.chromeEventHandler;
-      return this.showPermissionsPrompt(aomBrowser, strings, icon, histkey);
-    });
+    return global
+      .BrowserOpenAddonsMgr("addons://list/extension")
+      .then(aomWin => {
+        let aomBrowser = aomWin.docShell.chromeEventHandler;
+        return this.showPermissionsPrompt(aomBrowser, strings, icon, histkey);
+      });
   },
 
   showSideloaded(browser, addon) {
     addon.markAsSeen();
     this.sideloaded.delete(addon);
     this._updateNotifications();
 
     let strings = this._buildStrings({
@@ -131,83 +159,100 @@ var ExtensionsUI = {
       permissions: addon.userPermissions,
       type: "sideload",
     });
 
     AMTelemetry.recordManageEvent(addon, "sideload_prompt", {
       num_strings: strings.msgs.length,
     });
 
-    this.showAddonsManager(browser, strings, addon.iconURL, "sideload")
-        .then(async answer => {
-          if (answer) {
-            await addon.enable();
+    this.showAddonsManager(browser, strings, addon.iconURL, "sideload").then(
+      async answer => {
+        if (answer) {
+          await addon.enable();
 
-            this._updateNotifications();
+          this._updateNotifications();
 
-            // The user has just enabled a sideloaded extension, if the permission
-            // can be changed for the extension, show the post-install panel to
-            // give the user that opportunity.
-            if (addon.permissions & AddonManager.PERM_CAN_CHANGE_PRIVATEBROWSING_ACCESS) {
-              this.showInstallNotification(browser, addon);
-            }
+          // The user has just enabled a sideloaded extension, if the permission
+          // can be changed for the extension, show the post-install panel to
+          // give the user that opportunity.
+          if (
+            addon.permissions &
+            AddonManager.PERM_CAN_CHANGE_PRIVATEBROWSING_ACCESS
+          ) {
+            this.showInstallNotification(browser, addon);
           }
-          this.emit("sideload-response");
-        });
+        }
+        this.emit("sideload-response");
+      }
+    );
   },
 
   showUpdate(browser, info) {
     AMTelemetry.recordInstallEvent(info.install, {
       step: "permissions_prompt",
       num_strings: info.strings.msgs.length,
     });
 
-    this.showAddonsManager(browser, info.strings, info.addon.iconURL, "update")
-        .then(answer => {
-          if (answer) {
-            info.resolve();
-          } else {
-            info.reject();
-          }
-          // At the moment, this prompt will re-appear next time we do an update
-          // check.  See bug 1332360 for proposal to avoid this.
-          this.updates.delete(info);
-          this._updateNotifications();
-        });
+    this.showAddonsManager(
+      browser,
+      info.strings,
+      info.addon.iconURL,
+      "update"
+    ).then(answer => {
+      if (answer) {
+        info.resolve();
+      } else {
+        info.reject();
+      }
+      // At the moment, this prompt will re-appear next time we do an update
+      // check.  See bug 1332360 for proposal to avoid this.
+      this.updates.delete(info);
+      this._updateNotifications();
+    });
   },
 
   observe(subject, topic, data) {
     if (topic == "webextension-permission-prompt") {
-      let {target, info} = subject.wrappedJSObject;
+      let { target, info } = subject.wrappedJSObject;
 
-      let {browser, window} = getTabBrowser(target);
+      let { browser, window } = getTabBrowser(target);
 
       // Dismiss the progress notification.  Note that this is bad if
       // there are multiple simultaneous installs happening, see
       // bug 1329884 for a longer explanation.
-      let progressNotification = window.PopupNotifications.getNotification("addon-progress", browser);
+      let progressNotification = window.PopupNotifications.getNotification(
+        "addon-progress",
+        browser
+      );
       if (progressNotification) {
         progressNotification.remove();
       }
 
-      info.unsigned = info.addon.signedState <= AddonManager.SIGNEDSTATE_MISSING;
-      if (info.unsigned && Cu.isInAutomation &&
-          Services.prefs.getBoolPref("extensions.ui.ignoreUnsigned", false)) {
+      info.unsigned =
+        info.addon.signedState <= AddonManager.SIGNEDSTATE_MISSING;
+      if (
+        info.unsigned &&
+        Cu.isInAutomation &&
+        Services.prefs.getBoolPref("extensions.ui.ignoreUnsigned", false)
+      ) {
         info.unsigned = false;
       }
 
       let strings = this._buildStrings(info);
 
       // If this is an update with no promptable permissions, just apply it
       if (info.type == "update" && strings.msgs.length == 0) {
         info.resolve();
         return;
       }
 
-      let icon = info.unsigned ? "chrome://browser/skin/warning.svg" : info.icon;
+      let icon = info.unsigned
+        ? "chrome://browser/skin/warning.svg"
+        : info.icon;
 
       let histkey;
       if (info.type == "sideload") {
         histkey = "sideload";
       } else if (info.type == "update") {
         histkey = "update";
       } else if (info.source == "AMO") {
         histkey = "installAmo";
@@ -223,24 +268,25 @@ var ExtensionsUI = {
         });
       } else {
         AMTelemetry.recordInstallEvent(info.install, {
           step: "permissions_prompt",
           num_strings: strings.msgs.length,
         });
       }
 
-      this.showPermissionsPrompt(browser, strings, icon, histkey)
-          .then(answer => {
-            if (answer) {
-              info.resolve();
-            } else {
-              info.reject();
-            }
-          });
+      this.showPermissionsPrompt(browser, strings, icon, histkey).then(
+        answer => {
+          if (answer) {
+            info.resolve();
+          } else {
+            info.reject();
+          }
+        }
+      );
     } else if (topic == "webextension-update-permissions") {
       let info = subject.wrappedJSObject;
       info.type = "update";
       let strings = this._buildStrings(info);
 
       // If we don't prompt for any new permissions, just apply it
       if (strings.msgs.length == 0) {
         info.resolve();
@@ -254,69 +300,92 @@ var ExtensionsUI = {
         addon: info.addon,
         resolve: info.resolve,
         reject: info.reject,
       };
 
       this.updates.add(update);
       this._updateNotifications();
     } else if (topic == "webextension-install-notify") {
-      let {target, addon, callback} = subject.wrappedJSObject;
+      let { target, addon, callback } = subject.wrappedJSObject;
       this.showInstallNotification(target, addon).then(() => {
         if (callback) {
           callback();
         }
       });
     } else if (topic == "webextension-optional-permission-prompt") {
-      let {browser, name, icon, permissions, resolve} = subject.wrappedJSObject;
+      let {
+        browser,
+        name,
+        icon,
+        permissions,
+        resolve,
+      } = subject.wrappedJSObject;
       let strings = this._buildStrings({
         type: "optional",
-        addon: {name},
+        addon: { name },
         permissions,
       });
 
       // If we don't have any promptable permissions, just proceed
       if (strings.msgs.length == 0) {
         resolve(true);
         return;
       }
       resolve(this.showPermissionsPrompt(browser, strings, icon));
     } else if (topic == "webextension-defaultsearch-prompt") {
-      let {browser, name, icon, respond, currentEngine, newEngine} = subject.wrappedJSObject;
+      let {
+        browser,
+        name,
+        icon,
+        respond,
+        currentEngine,
+        newEngine,
+      } = subject.wrappedJSObject;
 
       let bundle = Services.strings.createBundle(BROWSER_PROPERTIES);
 
       let strings = {};
-      strings.acceptText = bundle.GetStringFromName("webext.defaultSearchYes.label");
-      strings.acceptKey = bundle.GetStringFromName("webext.defaultSearchYes.accessKey");
-      strings.cancelText = bundle.GetStringFromName("webext.defaultSearchNo.label");
-      strings.cancelKey = bundle.GetStringFromName("webext.defaultSearchNo.accessKey");
+      strings.acceptText = bundle.GetStringFromName(
+        "webext.defaultSearchYes.label"
+      );
+      strings.acceptKey = bundle.GetStringFromName(
+        "webext.defaultSearchYes.accessKey"
+      );
+      strings.cancelText = bundle.GetStringFromName(
+        "webext.defaultSearchNo.label"
+      );
+      strings.cancelKey = bundle.GetStringFromName(
+        "webext.defaultSearchNo.accessKey"
+      );
       strings.addonName = name;
-      strings.text = bundle.formatStringFromName("webext.defaultSearch.description",
-                                                 ["<>", currentEngine, newEngine]);
+      strings.text = bundle.formatStringFromName(
+        "webext.defaultSearch.description",
+        ["<>", currentEngine, newEngine]
+      );
 
       this.showDefaultSearchPrompt(browser, strings, icon).then(respond);
     }
   },
 
   // Create a set of formatted strings for a permission prompt
   _buildStrings(info) {
     let bundle = Services.strings.createBundle(BROWSER_PROPERTIES);
     let brandBundle = Services.strings.createBundle(BRAND_PROPERTIES);
     let appName = brandBundle.GetStringFromName("brandShortName");
-    let info2 = Object.assign({appName}, info);
+    let info2 = Object.assign({ appName }, info);
 
     let strings = ExtensionData.formatPermissionStrings(info2, bundle);
     strings.addonName = info.addon.name;
     strings.learnMore = bundle.GetStringFromName("webextPerms.learnMore");
     return strings;
   },
 
   async showPermissionsPrompt(target, strings, icon, histkey) {
-    let {browser, window} = getTabBrowser(target);
+    let { browser, window } = getTabBrowser(target);
 
     // Wait for any pending prompts in this window to complete before
     // showing the next one.
     let pending;
     while ((pending = this.pendingNotifications.get(window))) {
       await pending;
     }
 
@@ -325,22 +394,24 @@ var ExtensionsUI = {
         let doc = this.browser.ownerDocument;
         if (topic == "showing") {
           let textEl = doc.getElementById("addon-webext-perm-text");
           textEl.textContent = strings.text;
           textEl.hidden = !strings.text;
 
           let listIntroEl = doc.getElementById("addon-webext-perm-intro");
           listIntroEl.textContent = strings.listIntro;
-          listIntroEl.hidden = (strings.msgs.length == 0);
+          listIntroEl.hidden = strings.msgs.length == 0;
 
           let listInfoEl = doc.getElementById("addon-webext-perm-info");
           listInfoEl.textContent = strings.learnMore;
-          listInfoEl.href = Services.urlFormatter.formatURLPref("app.support.baseURL") + "extension-permissions";
-          listInfoEl.hidden = (strings.msgs.length == 0);
+          listInfoEl.href =
+            Services.urlFormatter.formatURLPref("app.support.baseURL") +
+            "extension-permissions";
+          listInfoEl.hidden = strings.msgs.length == 0;
 
           let list = doc.getElementById("addon-webext-perm-list");
           while (list.firstChild) {
             list.firstChild.remove();
           }
 
           for (let msg of strings.msgs) {
             let item = doc.createElementNS(HTML_NS, "li");
@@ -385,19 +456,25 @@ var ExtensionsUI = {
             if (histkey) {
               this.histogram.add(histkey + "Rejected");
             }
             resolve(false);
           },
         },
       ];
 
-      window.PopupNotifications.show(browser, "addon-webext-permissions", strings.header,
-                                     "addons-notification-icon", action,
-                                     secondaryActions, popupOptions);
+      window.PopupNotifications.show(
+        browser,
+        "addon-webext-permissions",
+        strings.header,
+        "addons-notification-icon",
+        action,
+        secondaryActions,
+        popupOptions
+      );
     });
 
     this.pendingNotifications.set(window, promise);
     promise.finally(() => this.pendingNotifications.delete(window));
     return promise;
   },
 
   showDefaultSearchPrompt(target, strings, icon) {
@@ -428,45 +505,59 @@ var ExtensionsUI = {
           label: strings.cancelText,
           accessKey: strings.cancelKey,
           callback: () => {
             resolve(false);
           },
         },
       ];
 
-      let {browser, window} = getTabBrowser(target);
-      window.PopupNotifications.show(browser, "addon-webext-defaultsearch", strings.text,
-                                     "addons-notification-icon", action,
-                                     secondaryActions, popupOptions);
+      let { browser, window } = getTabBrowser(target);
+      window.PopupNotifications.show(
+        browser,
+        "addon-webext-defaultsearch",
+        strings.text,
+        "addons-notification-icon",
+        action,
+        secondaryActions,
+        popupOptions
+      );
     });
   },
 
   showInstallNotification(target, addon) {
-    let {window} = getTabBrowser(target);
+    let { window } = getTabBrowser(target);
 
     let brandBundle = window.document.getElementById("bundle_brand");
     let appName = brandBundle.getString("brandShortName");
     let bundle = window.gNavigatorBundle;
 
-    let message = bundle.getFormattedString("addonPostInstall.message1",
-                                            ["<>", appName]);
+    let message = bundle.getFormattedString("addonPostInstall.message1", [
+      "<>",
+      appName,
+    ]);
     return new Promise(resolve => {
       // Show or hide private permission ui based on the pref.
       function setCheckbox(win) {
         let checkbox = win.document.getElementById("addon-incognito-checkbox");
         checkbox.checked = false;
-        checkbox.hidden = !(addon.permissions & AddonManager.PERM_CAN_CHANGE_PRIVATEBROWSING_ACCESS);
+        checkbox.hidden = !(
+          addon.permissions &
+          AddonManager.PERM_CAN_CHANGE_PRIVATEBROWSING_ACCESS
+        );
       }
       setCheckbox(window);
 
       async function actionResolve(win) {
         let checkbox = win.document.getElementById("addon-incognito-checkbox");
         if (checkbox.checked) {
-          let perms = {permissions: ["internal:privateBrowsingAllowed"], origins: []};
+          let perms = {
+            permissions: ["internal:privateBrowsingAllowed"],
+            origins: [],
+          };
           await ExtensionPermissions.add(addon.id, perms);
           AMTelemetry.recordActionEvent({
             addon,
             object: "doorhanger",
             action: "privateBrowsingAllowed",
             view: "postInstall",
             value: "on",
           });
@@ -480,30 +571,36 @@ var ExtensionsUI = {
 
         resolve();
       }
 
       let action = {
         callback: actionResolve,
       };
 
-      let icon = addon.isWebExtension ?
-                 AddonManager.getPreferredIconURL(addon, 32, window) || DEFAULT_EXTENSION_ICON :
-                 "chrome://browser/skin/addons/addon-install-installed.svg";
+      let icon = addon.isWebExtension
+        ? AddonManager.getPreferredIconURL(addon, 32, window) ||
+          DEFAULT_EXTENSION_ICON
+        : "chrome://browser/skin/addons/addon-install-installed.svg";
       let options = {
         name: addon.name,
         message,
         popupIconURL: icon,
         onRefresh: setCheckbox,
-        onDismissed: (win) => {
+        onDismissed: win => {
           AppMenuNotifications.removeNotification("addon-installed");
           actionResolve(win);
         },
       };
-      AppMenuNotifications.showNotification("addon-installed", action, null, options);
+      AppMenuNotifications.showNotification(
+        "addon-installed",
+        action,
+        null,
+        options
+      );
     });
   },
 
   promisePrivateBrowsingNotification(window) {
     return new Promise(resolve => {
       let action = {
         callback: () => {
           resolve();
@@ -533,27 +630,39 @@ var ExtensionsUI = {
 
       let options = {
         popupIconURL: "chrome://browser/skin/addons/addon-private-browsing.svg",
         onDismissed: () => {
           AppMenuNotifications.removeNotification("addon-private-browsing");
           resolve();
         },
       };
-      window.document.getElementById("addon-private-browsing-learn-more")
-                     .setAttribute("href", SUPPORT_URL + "extensions-pb");
-      AppMenuNotifications.showNotification("addon-private-browsing", manage, action, options);
+      window.document
+        .getElementById("addon-private-browsing-learn-more")
+        .setAttribute("href", SUPPORT_URL + "extensions-pb");
+      AppMenuNotifications.showNotification(
+        "addon-private-browsing",
+        manage,
+        action,
+        options
+      );
     });
   },
 
   showPrivateBrowsingNotification(window) {
     // Show the addons private browsing panel the first time a private window
     // is opened.
-    if (!allowPrivateBrowsingByDefault && !privateNotificationShown &&
-        PrivateBrowsingUtils.isWindowPrivate(window)) {
+    if (
+      !allowPrivateBrowsingByDefault &&
+      !privateNotificationShown &&
+      PrivateBrowsingUtils.isWindowPrivate(window)
+    ) {
       ExtensionsUI.promisePrivateBrowsingNotification(window).then(() => {
-        Services.prefs.setBoolPref("extensions.privatebrowsing.notification", true);
+        Services.prefs.setBoolPref(
+          "extensions.privatebrowsing.notification",
+          true
+        );
       });
     }
   },
 };
 
 EventEmitter.decorate(ExtensionsUI);
--- a/browser/modules/FaviconLoader.jsm
+++ b/browser/modules/FaviconLoader.jsm
@@ -1,54 +1,66 @@
 /* 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/. */
 
 "use strict";
 
 const EXPORTED_SYMBOLS = ["FaviconLoader"];
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyGlobalGetters(this, ["Blob", "FileReader"]);
 
-ChromeUtils.defineModuleGetter(this, "DeferredTask",
-  "resource://gre/modules/DeferredTask.jsm");
-ChromeUtils.defineModuleGetter(this, "PromiseUtils",
-  "resource://gre/modules/PromiseUtils.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "DeferredTask",
+  "resource://gre/modules/DeferredTask.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "PromiseUtils",
+  "resource://gre/modules/PromiseUtils.jsm"
+);
 
 const STREAM_SEGMENT_SIZE = 4096;
 const PR_UINT32_MAX = 0xffffffff;
 
-const BinaryInputStream = Components.Constructor("@mozilla.org/binaryinputstream;1",
-                                                 "nsIBinaryInputStream", "setInputStream");
-const StorageStream = Components.Constructor("@mozilla.org/storagestream;1",
-                                             "nsIStorageStream", "init");
-const BufferedOutputStream = Components.Constructor("@mozilla.org/network/buffered-output-stream;1",
-                                                    "nsIBufferedOutputStream", "init");
+const BinaryInputStream = Components.Constructor(
+  "@mozilla.org/binaryinputstream;1",
+  "nsIBinaryInputStream",
+  "setInputStream"
+);
+const StorageStream = Components.Constructor(
+  "@mozilla.org/storagestream;1",
+  "nsIStorageStream",
+  "init"
+);
+const BufferedOutputStream = Components.Constructor(
+  "@mozilla.org/network/buffered-output-stream;1",
+  "nsIBufferedOutputStream",
+  "init"
+);
 
 const SIZES_TELEMETRY_ENUM = {
   NO_SIZES: 0,
   ANY: 1,
   DIMENSION: 2,
   INVALID: 3,
 };
 
 const FAVICON_PARSING_TIMEOUT = 100;
 const FAVICON_RICH_ICON_MIN_WIDTH = 96;
 const PREFERRED_WIDTH = 16;
 
 // URL schemes that we don't want to load and convert to data URLs.
-const LOCAL_FAVICON_SCHEMES = [
-  "chrome",
-  "about",
-  "resource",
-  "data",
-];
+const LOCAL_FAVICON_SCHEMES = ["chrome", "about", "resource", "data"];
 
 const MAX_FAVICON_EXPIRATION = 7 * 24 * 60 * 60 * 1000;
 const MAX_ICON_SIZE = 2048;
 
 const TYPE_ICO = "image/x-icon";
 const TYPE_SVG = "image/svg+xml";
 
 function promiseBlobAsDataURL(blob) {
@@ -70,65 +82,77 @@ function promiseBlobAsOctets(blob) {
     reader.readAsBinaryString(blob);
   });
 }
 
 function promiseImage(stream, type) {
   return new Promise((resolve, reject) => {
     let imgTools = Cc["@mozilla.org/image/tools;1"].getService(Ci.imgITools);
 
-    imgTools.decodeImageAsync(stream, type, (image, result) => {
-      if (!Components.isSuccessCode(result)) {
-        reject();
-        return;
-      }
+    imgTools.decodeImageAsync(
+      stream,
+      type,
+      (image, result) => {
+        if (!Components.isSuccessCode(result)) {
+          reject();
+          return;
+        }
 
-      resolve(image);
-    }, Services.tm.currentThread);
+        resolve(image);
+      },
+      Services.tm.currentThread
+    );
   });
 }
 
 class FaviconLoad {
   constructor(iconInfo) {
     this.icon = iconInfo;
 
     this.channel = Services.io.newChannelFromURI(
       iconInfo.iconUri,
       iconInfo.node,
       iconInfo.node.nodePrincipal,
       iconInfo.node.nodePrincipal,
-      (Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS |
-       Ci.nsILoadInfo.SEC_ALLOW_CHROME |
-       Ci.nsILoadInfo.SEC_DISALLOW_SCRIPT),
-      Ci.nsIContentPolicy.TYPE_INTERNAL_IMAGE_FAVICON);
+      Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS |
+        Ci.nsILoadInfo.SEC_ALLOW_CHROME |
+        Ci.nsILoadInfo.SEC_DISALLOW_SCRIPT,
+      Ci.nsIContentPolicy.TYPE_INTERNAL_IMAGE_FAVICON
+    );
 
-    this.channel.loadFlags |= Ci.nsIRequest.LOAD_BACKGROUND |
-                              Ci.nsIRequest.VALIDATE_NEVER |
-                              Ci.nsIRequest.LOAD_FROM_CACHE;
+    this.channel.loadFlags |=
+      Ci.nsIRequest.LOAD_BACKGROUND |
+      Ci.nsIRequest.VALIDATE_NEVER |
+      Ci.nsIRequest.LOAD_FROM_CACHE;
     // Sometimes node is a document and sometimes it is an element. This is
     // the easiest single way to get to the load group in both those cases.
-    this.channel.loadGroup = iconInfo.node.ownerGlobal.document.documentLoadGroup;
+    this.channel.loadGroup =
+      iconInfo.node.ownerGlobal.document.documentLoadGroup;
     this.channel.notificationCallbacks = this;
 
     if (this.channel instanceof Ci.nsIHttpChannel) {
       try {
         let acceptHeader = Services.prefs.getCharPref("image.http.accept");
         this.channel.setRequestHeader("Accept", acceptHeader, false);
       } catch (e) {
         // Failing to get the pref or set the header is ignorable.
       }
     }
 
     if (this.channel instanceof Ci.nsIHttpChannelInternal) {
       this.channel.blockAuthPrompt = true;
     }
 
-    if (Services.prefs.getBoolPref("network.http.tailing.enabled", true) &&
-        this.channel instanceof Ci.nsIClassOfService) {
-      this.channel.addClassFlags(Ci.nsIClassOfService.Tail | Ci.nsIClassOfService.Throttleable);
+    if (
+      Services.prefs.getBoolPref("network.http.tailing.enabled", true) &&
+      this.channel instanceof Ci.nsIClassOfService
+    ) {
+      this.channel.addClassFlags(
+        Ci.nsIClassOfService.Tail | Ci.nsIClassOfService.Throttleable
+      );
     }
   }
 
   load() {
     this._deferred = PromiseUtils.defer();
 
     // Clear the references when we succeed or fail.
     let cleanup = () => {
@@ -136,17 +160,20 @@ class FaviconLoad {
       this.dataBuffer = null;
       this.stream = null;
     };
     this._deferred.promise.then(cleanup, cleanup);
 
     this.dataBuffer = new StorageStream(STREAM_SEGMENT_SIZE, PR_UINT32_MAX);
 
     // storage streams do not implement writeFrom so wrap it with a buffered stream.
-    this.stream = new BufferedOutputStream(this.dataBuffer.getOutputStream(0), STREAM_SEGMENT_SIZE * 2);
+    this.stream = new BufferedOutputStream(
+      this.dataBuffer.getOutputStream(0),
+      STREAM_SEGMENT_SIZE * 2
+    );
 
     try {
       this.channel.asyncOpen(this);
     } catch (e) {
       this._deferred.reject(e);
     }
 
     return this._deferred.promise;
@@ -155,18 +182,17 @@ class FaviconLoad {
   cancel() {
     if (!this.channel) {
       return;
     }
 
     this.channel.cancel(Cr.NS_BINDING_ABORTED);
   }
 
-  onStartRequest(request) {
-  }
+  onStartRequest(request) {}
 
   onDataAvailable(request, inputStream, offset, count) {
     this.stream.writeFrom(inputStream, count);
   }
 
   asyncOnChannelRedirect(oldChannel, newChannel, flags, callback) {
     if (oldChannel == this.channel) {
       this.channel = newChannel;
@@ -182,73 +208,109 @@ class FaviconLoad {
       return;
     }
 
     this.stream.close();
     this.stream = null;
 
     if (!Components.isSuccessCode(statusCode)) {
       if (statusCode == Cr.NS_BINDING_ABORTED) {
-        this._deferred.reject(Components.Exception(`Favicon load from ${this.icon.iconUri.spec} was cancelled.`, statusCode));
+        this._deferred.reject(
+          Components.Exception(
+            `Favicon load from ${this.icon.iconUri.spec} was cancelled.`,
+            statusCode
+          )
+        );
       } else {
-        this._deferred.reject(Components.Exception(`Favicon at "${this.icon.iconUri.spec}" failed to load.`, statusCode));
+        this._deferred.reject(
+          Components.Exception(
+            `Favicon at "${this.icon.iconUri.spec}" failed to load.`,
+            statusCode
+          )
+        );
       }
       return;
     }
 
     if (this.channel instanceof Ci.nsIHttpChannel) {
       if (!this.channel.requestSucceeded) {
-        this._deferred.reject(Components.Exception(`Favicon at "${this.icon.iconUri.spec}" failed to load: ${this.channel.responseStatusText}.`, Cr.NS_ERROR_FAILURE));
+        this._deferred.reject(
+          Components.Exception(
+            `Favicon at "${this.icon.iconUri.spec}" failed to load: ${
+              this.channel.responseStatusText
+            }.`,
+            Cr.NS_ERROR_FAILURE
+          )
+        );
         return;
       }
     }
 
     // Attempt to get an expiration time from the cache.  If this fails, we'll
     // use this default.
     let expiration = Date.now() + MAX_FAVICON_EXPIRATION;
 
     // This stuff isn't available after onStopRequest returns (so don't start
     // any async operations before this!).
     if (this.channel instanceof Ci.nsICacheInfoChannel) {
       try {
-        expiration = Math.min(this.channel.cacheTokenExpirationTime * 1000, expiration);
+        expiration = Math.min(
+          this.channel.cacheTokenExpirationTime * 1000,
+          expiration
+        );
       } catch (e) {
         // Ignore failures to get the expiration time.
       }
     }
 
     try {
       let stream = new BinaryInputStream(this.dataBuffer.newInputStream(0));
       let buffer = new ArrayBuffer(this.dataBuffer.length);
       stream.readArrayBuffer(buffer.byteLength, buffer);
 
       let type = this.channel.contentType;
       let blob = new Blob([buffer], { type });
 
       if (type != "image/svg+xml") {
         let octets = await promiseBlobAsOctets(blob);
-        let sniffer = Cc["@mozilla.org/image/loader;1"].
-                      createInstance(Ci.nsIContentSniffer);
-        type = sniffer.getMIMETypeFromContent(this.channel, octets, octets.length);
+        let sniffer = Cc["@mozilla.org/image/loader;1"].createInstance(
+          Ci.nsIContentSniffer
+        );
+        type = sniffer.getMIMETypeFromContent(
+          this.channel,
+          octets,
+          octets.length
+        );
 
         if (!type) {
-          throw Components.Exception(`Favicon at "${this.icon.iconUri.spec}" did not match a known mimetype.`, Cr.NS_ERROR_FAILURE);
+          throw Components.Exception(
+            `Favicon at "${
+              this.icon.iconUri.spec
+            }" did not match a known mimetype.`,
+            Cr.NS_ERROR_FAILURE
+          );
         }
 
         blob = blob.slice(0, blob.size, type);
 
         let image;
         try {
           image = await promiseImage(this.dataBuffer.newInputStream(0), type);
         } catch (e) {
-          throw Components.Exception(`Favicon at "${this.icon.iconUri.spec}" could not be decoded.`, Cr.NS_ERROR_FAILURE);
+          throw Components.Exception(
+            `Favicon at "${this.icon.iconUri.spec}" could not be decoded.`,
+            Cr.NS_ERROR_FAILURE
+          );
         }
 
         if (image.width > MAX_ICON_SIZE || image.height > MAX_ICON_SIZE) {
-          throw Components.Exception(`Favicon at "${this.icon.iconUri.spec}" is too large.`, Cr.NS_ERROR_FAILURE);
+          throw Components.Exception(
+            `Favicon at "${this.icon.iconUri.spec}" is too large.`,
+            Cr.NS_ERROR_FAILURE
+          );
         }
       }
 
       let dataURL = await promiseBlobAsDataURL(blob);
 
       this._deferred.resolve({
         expiration,
         dataURL,
@@ -296,34 +358,42 @@ function extractIconSize(aSizes) {
       }
     }
   } else {
     sizesType = SIZES_TELEMETRY_ENUM.NO_SIZES;
   }
 
   // Telemetry probes for measuring the sizes attribute
   // usage and available dimensions.
-  Services.telemetry.getHistogramById("LINK_ICON_SIZES_ATTR_USAGE").add(sizesType);
-  if (width > 0)
-    Services.telemetry.getHistogramById("LINK_ICON_SIZES_ATTR_DIMENSION").add(width);
+  Services.telemetry
+    .getHistogramById("LINK_ICON_SIZES_ATTR_USAGE")
+    .add(sizesType);
+  if (width > 0) {
+    Services.telemetry
+      .getHistogramById("LINK_ICON_SIZES_ATTR_DIMENSION")
+      .add(width);
+  }
 
   return width;
 }
 
 /*
  * Get link icon URI from a link dom node.
  *
  * @param {DOMNode} aLink A link dom node.
  * @return {nsIURI} A uri of the icon.
  */
 function getLinkIconURI(aLink) {
   let targetDoc = aLink.ownerDocument;
   let uri = Services.io.newURI(aLink.href, targetDoc.characterSet);
   try {
-    uri = uri.mutate().setUserPass("").finalize();
+    uri = uri
+      .mutate()
+      .setUserPass("")
+      .finalize();
   } catch (e) {
     // some URIs are immutable
   }
   return uri;
 }
 
 /**
  * Guess a type for an icon based on its declared type or file extension.
@@ -373,26 +443,34 @@ function selectIcons(iconInfos, preferre
 
   for (let icon of iconInfos) {
     if (!icon.isRichIcon) {
       // First check for svg. If it's not available check for an icon with a
       // size adapt to the current resolution. If both are not available, prefer
       // ico files. When multiple icons are in the same set, the latest wins.
       if (guessType(icon) == TYPE_SVG) {
         preferredIcon = icon;
-      } else if (icon.width == preferredWidth && guessType(preferredIcon) != TYPE_SVG) {
+      } else if (
+        icon.width == preferredWidth &&
+        guessType(preferredIcon) != TYPE_SVG
+      ) {
         preferredIcon = icon;
-      } else if (guessType(icon) == TYPE_ICO && (!preferredIcon || guessType(preferredIcon) == TYPE_ICO)) {
+      } else if (
+        guessType(icon) == TYPE_ICO &&
+        (!preferredIcon || guessType(preferredIcon) == TYPE_ICO)
+      ) {
         preferredIcon = icon;
       }
 
       // Check for an icon larger yet closest to preferredWidth, that can be
       // downscaled efficiently.
-      if (icon.width >= preferredWidth &&
-          (!bestSizedIcon || bestSizedIcon.width >= icon.width)) {
+      if (
+        icon.width >= preferredWidth &&
+        (!bestSizedIcon || bestSizedIcon.width >= icon.width)
+      ) {
         bestSizedIcon = icon;
       }
     }
 
     // Note that some sites use hi-res icons without specifying them as
     // apple-touch or fluid icons.
     if (icon.isRichIcon || icon.width >= FAVICON_RICH_ICON_MIN_WIDTH) {
       if (!largestRichIcon || largestRichIcon.width < icon.width) {
@@ -435,18 +513,23 @@ class IconLoader {
       this._loader.cancel();
     }
 
     if (LOCAL_FAVICON_SCHEMES.includes(iconInfo.iconUri.scheme)) {
       // We need to do a manual security check because the channel won't do
       // it for us.
       try {
         Services.scriptSecurityManager.checkLoadURIWithPrincipal(
-          iconInfo.node.nodePrincipal, iconInfo.iconUri, Services.scriptSecurityManager.ALLOW_CHROME);
-      } catch (ex) { return; }
+          iconInfo.node.nodePrincipal,
+          iconInfo.iconUri,
+          Services.scriptSecurityManager.ALLOW_CHROME
+        );
+      } catch (ex) {
+        return;
+      }
       this.mm.sendAsyncMessage("Link:SetIcon", {
         pageURL: iconInfo.pageUri.spec,
         originalURL: iconInfo.iconUri.spec,
         canUseForTab: !iconInfo.isRichIcon,
         expiration: undefined,
         iconURL: iconInfo.iconUri.spec,
       });
       return;
@@ -499,29 +582,33 @@ class FaviconLoader {
     this.mm = mm;
     this.iconInfos = [];
 
     // For every page we attempt to find a rich icon and a tab icon. These
     // objects take care of the load process for each.
     this.richIconLoader = new IconLoader(mm);
     this.tabIconLoader = new IconLoader(mm);
 
-    this.iconTask = new DeferredTask(() => this.loadIcons(), FAVICON_PARSING_TIMEOUT);
+    this.iconTask = new DeferredTask(
+      () => this.loadIcons(),
+      FAVICON_PARSING_TIMEOUT
+    );
   }
 
   loadIcons() {
     // If the page is unloaded immediately after the DeferredTask's timer fires
     // we can still attempt to load icons, which will fail since the content
     // window is no longer available. Checking if iconInfos has been cleared
     // allows us to bail out early in this case.
     if (this.iconInfos.length == 0) {
       return;
     }
 
-    let preferredWidth = PREFERRED_WIDTH * Math.ceil(this.mm.content.devicePixelRatio);
+    let preferredWidth =
+      PREFERRED_WIDTH * Math.ceil(this.mm.content.devicePixelRatio);
     let { richIcon, tabIcon } = selectIcons(this.iconInfos, preferredWidth);
     this.iconInfos = [];
 
     if (richIcon) {
       this.richIconLoader.load(richIcon);
     }
 
     if (tabIcon) {
@@ -539,17 +626,20 @@ class FaviconLoader {
     return false;
   }
 
   addDefaultIcon(pageUri) {
     // Currently ImageDocuments will just load the default favicon, see bug
     // 403651 for discussion.
     this.iconInfos.push({
       pageUri,
-      iconUri: pageUri.mutate().setPathQueryRef("/favicon.ico").finalize(),
+      iconUri: pageUri
+        .mutate()
+        .setPathQueryRef("/favicon.ico")
+        .finalize(),
       width: -1,
       isRichIcon: false,
       type: TYPE_ICO,
       node: this.mm.content.document,
     });
     this.iconTask.arm();
   }
 
@@ -567,18 +657,19 @@ class FaviconLoader {
 
     this.iconTask.disarm();
     this.iconInfos = [];
   }
 }
 
 function makeFaviconFromLink(aLink, aIsRichIcon) {
   let iconUri = getLinkIconURI(aLink);
-  if (!iconUri)
+  if (!iconUri) {
     return null;
+  }
 
   // Extract the size type and width.
   let width = extractIconSize(aLink.sizes);
 
   return {
     pageUri: aLink.ownerDocument.documentURIObject,
     iconUri,
     width,
--- a/browser/modules/FormValidationHandler.jsm
+++ b/browser/modules/FormValidationHandler.jsm
@@ -3,20 +3,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /*
  * Chrome side handling of form validation popup.
  */
 
 "use strict";
 
-var EXPORTED_SYMBOLS = [ "FormValidationHandler" ];
+var EXPORTED_SYMBOLS = ["FormValidationHandler"];
 
-var FormValidationHandler =
-{
+var FormValidationHandler = {
   _panel: null,
   _anchor: null,
 
   /*
    * Public apis
    */
 
   uninit() {
@@ -75,17 +74,20 @@ var FormValidationHandler =
    */
 
   _onPopupHiding(aEvent) {
     aEvent.originalTarget.removeEventListener("popuphiding", this, true);
     let tabBrowser = aEvent.originalTarget.ownerGlobal.gBrowser;
     tabBrowser.selectedBrowser.removeEventListener("scroll", this, true);
     tabBrowser.selectedBrowser.removeEventListener("FullZoomChange", this);
     tabBrowser.selectedBrowser.removeEventListener("TextZoomChange", this);
-    tabBrowser.selectedBrowser.removeEventListener("ZoomChangeUsingMouseWheel", this);
+    tabBrowser.selectedBrowser.removeEventListener(
+      "ZoomChangeUsingMouseWheel",
+      this
+    );
 
     this._panel.hidden = true;
     this._panel = null;
     this._anchor.hidden = true;
     this._anchor = null;
   },
 
   /*
@@ -119,17 +121,20 @@ var FormValidationHandler =
     if (!previouslyShown) {
       // Cleanup after the popup is hidden
       this._panel.addEventListener("popuphiding", this, true);
 
       // Hide if the user scrolls the page
       tabBrowser.selectedBrowser.addEventListener("scroll", this, true);
       tabBrowser.selectedBrowser.addEventListener("FullZoomChange", this);
       tabBrowser.selectedBrowser.addEventListener("TextZoomChange", this);
-      tabBrowser.selectedBrowser.addEventListener("ZoomChangeUsingMouseWheel", this);
+      tabBrowser.selectedBrowser.addEventListener(
+        "ZoomChangeUsingMouseWheel",
+        this
+      );
 
       // Open the popup
       this._panel.openPopup(this._anchor, aPanelData.position, 0, 0, false);
     }
   },
 
   /*
    * Hide the popup if currently displayed. Will fire an event to onPopupHiding
--- a/browser/modules/HomePage.jsm
+++ b/browser/modules/HomePage.jsm
@@ -4,35 +4,37 @@
 
 /* globals ChromeUtils, Services */
 /* exported HomePage */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["HomePage"];
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils",
-                               "resource://gre/modules/PrivateBrowsingUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "PrivateBrowsingUtils",
+  "resource://gre/modules/PrivateBrowsingUtils.jsm"
+);
 
 const kPrefName = "browser.startup.homepage";
 
 function getHomepagePref(useDefault) {
   let homePage;
   let prefs = Services.prefs;
   if (useDefault) {
     prefs = prefs.getDefaultBranch(null);
   }
   try {
     // Historically, this was a localizable pref, but default Firefox builds
     // don't use this.
     // Distributions and local customizations might still use this, so let's
     // keep it.
-    homePage = prefs.getComplexValue(kPrefName,
-                                     Ci.nsIPrefLocalizedString).data;
+    homePage = prefs.getComplexValue(kPrefName, Ci.nsIPrefLocalizedString).data;
   } catch (ex) {}
 
   if (!homePage) {
     homePage = prefs.getStringPref(kPrefName);
   }
 
   // Apparently at some point users ended up with blank home pages somehow.
   // If that happens, reset the pref and read it again.
@@ -42,25 +44,36 @@ function getHomepagePref(useDefault) {
   }
 
   return homePage;
 }
 
 let HomePage = {
   get(aWindow) {
     let homePages = getHomepagePref();
-    if (PrivateBrowsingUtils.permanentPrivateBrowsing ||
-        (aWindow && PrivateBrowsingUtils.isWindowPrivate(aWindow))) {
+    if (
+      PrivateBrowsingUtils.permanentPrivateBrowsing ||
+      (aWindow && PrivateBrowsingUtils.isWindowPrivate(aWindow))
+    ) {
       // If an extension controls the setting and does not have private
       // browsing permission, use the default setting.
-      let extensionControlled = Services.prefs.getBoolPref("browser.startup.homepage_override.extensionControlled", false);
-      let privateAllowed = Services.prefs.getBoolPref("browser.startup.homepage_override.privateAllowed", false);
+      let extensionControlled = Services.prefs.getBoolPref(
+        "browser.startup.homepage_override.extensionControlled",
+        false
+      );
+      let privateAllowed = Services.prefs.getBoolPref(
+        "browser.startup.homepage_override.privateAllowed",
+        false
+      );
       // There is a potential on upgrade that the prefs are not set yet, so we double check
       // for moz-extension.
-      if (!privateAllowed && (extensionControlled || homePages.includes("moz-extension://"))) {
+      if (
+        !privateAllowed &&
+        (extensionControlled || homePages.includes("moz-extension://"))
+      ) {
         return this.getDefault();
       }
     }
 
     return homePages;
   },
 
   getDefault() {
--- a/browser/modules/LaterRun.jsm
+++ b/browser/modules/LaterRun.jsm
@@ -1,70 +1,88 @@
 /* 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/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["LaterRun"];
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 const kEnabledPref = "browser.laterrun.enabled";
 const kPagePrefRoot = "browser.laterrun.pages.";
 // Number of sessions we've been active in
 const kSessionCountPref = "browser.laterrun.bookkeeping.sessionCount";
 // Time the profile was created at:
 const kProfileCreationTime = "browser.laterrun.bookkeeping.profileCreationTime";
 
 // After 50 sessions or 1 month since install, assume we will no longer be
 // interested in showing anything to "new" users
 const kSelfDestructSessionLimit = 50;
 const kSelfDestructHoursLimit = 31 * 24;
 
 class Page {
-  constructor({pref, minimumHoursSinceInstall, minimumSessionCount, requireBoth, url}) {
+  constructor({
+    pref,
+    minimumHoursSinceInstall,
+    minimumSessionCount,
+    requireBoth,
+    url,
+  }) {
     this.pref = pref;
     this.minimumHoursSinceInstall = minimumHoursSinceInstall || 0;
     this.minimumSessionCount = minimumSessionCount || 1;
     this.requireBoth = requireBoth || false;
     this.url = url;
   }
 
   get hasRun() {
     return Services.prefs.getBoolPref(this.pref + "hasRun", false);
   }
 
   applies(sessionInfo) {
     if (this.hasRun) {
       return false;
     }
     if (this.requireBoth) {
-      return sessionInfo.sessionCount >= this.minimumSessionCount &&
-             sessionInfo.hoursSinceInstall >= this.minimumHoursSinceInstall;
+      return (
+        sessionInfo.sessionCount >= this.minimumSessionCount &&
+        sessionInfo.hoursSinceInstall >= this.minimumHoursSinceInstall
+      );
     }
-    return sessionInfo.sessionCount >= this.minimumSessionCount ||
-           sessionInfo.hoursSinceInstall >= this.minimumHoursSinceInstall;
+    return (
+      sessionInfo.sessionCount >= this.minimumSessionCount ||
+      sessionInfo.hoursSinceInstall >= this.minimumHoursSinceInstall
+    );
   }
 }
 
 let LaterRun = {
   init() {
     if (!this.enabled) {
       return;
     }
     // If this is the first run, set the time we were installed
-    if (Services.prefs.getPrefType(kProfileCreationTime) == Ci.nsIPrefBranch.PREF_INVALID) {
+    if (
+      Services.prefs.getPrefType(kProfileCreationTime) ==
+      Ci.nsIPrefBranch.PREF_INVALID
+    ) {
       // We need to store seconds in order to fit within int prefs.
-      Services.prefs.setIntPref(kProfileCreationTime, Math.floor(Date.now() / 1000));
+      Services.prefs.setIntPref(
+        kProfileCreationTime,
+        Math.floor(Date.now() / 1000)
+      );
     }
     this.sessionCount++;
 
-    if (this.hoursSinceInstall > kSelfDestructHoursLimit ||
-        this.sessionCount > kSelfDestructSessionLimit) {
+    if (
+      this.hoursSinceInstall > kSelfDestructHoursLimit ||
+      this.sessionCount > kSelfDestructSessionLimit
+    ) {
       this.selfDestruct();
     }
   },
 
   // The enabled, hoursSinceInstall and sessionCount properties mirror the
   // preferences system, and are here for convenience.
   get enabled() {
     return Services.prefs.getBoolPref(kEnabledPref, false);
@@ -74,25 +92,31 @@ let LaterRun = {
     let wasEnabled = this.enabled;
     Services.prefs.setBoolPref(kEnabledPref, val);
     if (val && !wasEnabled) {
       this.init();
     }
   },
 
   get hoursSinceInstall() {
-    let installStamp = Services.prefs.getIntPref(kProfileCreationTime, Date.now() / 1000);
+    let installStamp = Services.prefs.getIntPref(
+      kProfileCreationTime,
+      Date.now() / 1000
+    );
     return Math.floor((Date.now() / 1000 - installStamp) / 3600);
   },
 
   get sessionCount() {
     if (this._sessionCount) {
       return this._sessionCount;
     }
-    return this._sessionCount = Services.prefs.getIntPref(kSessionCountPref, 0);
+    return (this._sessionCount = Services.prefs.getIntPref(
+      kSessionCountPref,
+      0
+    ));
   },
 
   set sessionCount(val) {
     this._sessionCount = val;
     Services.prefs.setIntPref(kSessionCountPref, val);
   },
 
   // Because we don't want to keep incrementing this indefinitely for no reason,
@@ -105,17 +129,19 @@ let LaterRun = {
   // Create an array of Page objects based on the currently set prefs
   readPages() {
     // Enumerate all the pages.
     let allPrefsForPages = Services.prefs.getChildList(kPagePrefRoot);
     let pageDataStore = new Map();
     for (let pref of allPrefsForPages) {
       let [slug, prop] = pref.substring(kPagePrefRoot.length).split(".");
       if (!pageDataStore.has(slug)) {
-        pageDataStore.set(slug, {pref: pref.substring(0, pref.length - prop.length)});
+        pageDataStore.set(slug, {
+          pref: pref.substring(0, pref.length - prop.length),
+        });
       }
       if (prop == "requireBoth" || prop == "hasRun") {
         pageDataStore.get(slug)[prop] = Services.prefs.getBoolPref(pref, false);
       } else if (prop == "url") {
         pageDataStore.get(slug)[prop] = Services.prefs.getStringPref(pref, "");
       } else {
         pageDataStore.get(slug)[prop] = Services.prefs.getIntPref(pref, 0);
       }
@@ -123,21 +149,25 @@ let LaterRun = {
     let rv = [];
     for (let [, pageData] of pageDataStore) {
       if (pageData.url) {
         let uri = null;
         try {
           let urlString = Services.urlFormatter.formatURL(pageData.url.trim());
           uri = Services.io.newURI(urlString);
         } catch (ex) {
-          Cu.reportError("Invalid LaterRun page URL " + pageData.url + " ignored.");
+          Cu.reportError(
+            "Invalid LaterRun page URL " + pageData.url + " ignored."
+          );
           continue;
         }
         if (!uri.schemeIs("https")) {
-          Cu.reportError("Insecure LaterRun page URL " + uri.spec + " ignored.");
+          Cu.reportError(
+            "Insecure LaterRun page URL " + uri.spec + " ignored."
+          );
         } else {
           pageData.url = uri.spec;
           rv.push(new Page(pageData));
         }
       }
     }
     return rv;
   },
--- a/browser/modules/LiveBookmarkMigrator.jsm
+++ b/browser/modules/LiveBookmarkMigrator.jsm
@@ -1,82 +1,94 @@
 /* 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/. */
 
 "use strict";
 
-const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { AppConstants } = ChromeUtils.import(
+  "resource://gre/modules/AppConstants.jsm"
+);
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
   OS: "resource://gre/modules/osfile.jsm",
   PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
 });
 
 XPCOMUtils.defineLazyGlobalGetters(this, ["URL", "XMLSerializer"]);
 
 XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() {
-  return Services.strings.createBundle("chrome://browser/locale/browser.properties");
+  return Services.strings.createBundle(
+    "chrome://browser/locale/browser.properties"
+  );
 });
 
 const kMigrationPref = "browser.livebookmarks.migrationAttemptsLeft";
 
 function migrationSucceeded() {
   Services.prefs.clearUserPref(kMigrationPref);
 }
 
 function migrationError() {
   // Decrement the number of remaining attempts.
-  let remainingAttempts = Math.max(0, Services.prefs.getIntPref(kMigrationPref, 1) - 1);
+  let remainingAttempts = Math.max(
+    0,
+    Services.prefs.getIntPref(kMigrationPref, 1) - 1
+  );
   Services.prefs.setIntPref(kMigrationPref, remainingAttempts);
 }
 
 var LiveBookmarkMigrator = {
   _isOldDefaultBookmark(liveBookmark) {
     if (!liveBookmark.feedURI || !liveBookmark.feedURI.host) {
       return false;
     }
-    let {host} = liveBookmark.feedURI;
-    return host.endsWith("fxfeeds.mozilla.com") || host.endsWith("fxfeeds.mozilla.org");
+    let { host } = liveBookmark.feedURI;
+    return (
+      host.endsWith("fxfeeds.mozilla.com") ||
+      host.endsWith("fxfeeds.mozilla.org")
+    );
   },
 
   async _fetch() {
     function getAnnoSQLFragment(aAnnoParam) {
       return `SELECT a.content
               FROM moz_items_annos a
               JOIN moz_anno_attributes n ON n.id = a.anno_attribute_id
               WHERE a.item_id = b.id
                 AND n.name = ${aAnnoParam}`;
     }
 
     // Copied and modified from nsLivemarkService.js, which we'll want to remove even when
     // we keep this migration for a while.
-    const LB_SQL =
-      `SELECT b.title, b.guid, b.dateAdded, b.position as 'index', p.guid AS parentGuid,
+    const LB_SQL = `SELECT b.title, b.guid, b.dateAdded, b.position as 'index', p.guid AS parentGuid,
               ( ${getAnnoSQLFragment(":feedURI_anno")} ) AS feedURI,
               ( ${getAnnoSQLFragment(":siteURI_anno")} ) AS siteURI
             FROM moz_bookmarks b
             JOIN moz_bookmarks p ON b.parent = p.id
             JOIN moz_items_annos a ON a.item_id = b.id
             JOIN moz_anno_attributes n ON a.anno_attribute_id = n.id
             WHERE b.type = :folder_type
               AND n.name = :feedURI_anno
       ORDER BY b.position DESC`;
     // We sort by position so we go over items last-to-first. This way, we can insert a
     // duplicate "normal" bookmark for each livemark, without causing future insertions
     // to be off-by-N in their positioning because of the insertions.
 
     let conn = await PlacesUtils.promiseDBConnection();
-    let rows = await conn.execute(LB_SQL,
-      { folder_type: Ci.nsINavBookmarksService.TYPE_FOLDER,
-        feedURI_anno: PlacesUtils.LMANNO_FEEDURI,
-        siteURI_anno: PlacesUtils.LMANNO_SITEURI });
+    let rows = await conn.execute(LB_SQL, {
+      folder_type: Ci.nsINavBookmarksService.TYPE_FOLDER,
+      feedURI_anno: PlacesUtils.LMANNO_FEEDURI,
+      siteURI_anno: PlacesUtils.LMANNO_SITEURI,
+    });
     // Create a JS object out of the sqlite result:
     let liveBookmarks = [];
     for (let row of rows) {
       let siteURI = row.getResultByName("siteURI");
       let feedURI = row.getResultByName("feedURI");
       try {
         feedURI = new URL(feedURI);
         siteURI = siteURI ? new URL(siteURI) : null;
@@ -106,18 +118,20 @@ var LiveBookmarkMigrator = {
       let hiddenDOMDoc = hiddenBrowser.document;
       // Create head:
       let doc = hiddenDOMDoc.implementation.createDocument("", "opml", null);
       let root = doc.documentElement;
       root.setAttribute("version", "1.0");
       let head = doc.createElement("head");
       root.appendChild(head);
       let title = doc.createElement("title");
-      title.textContent =
-        gBrowserBundle.formatStringFromName("livebookmarkMigration.title", [appName]);
+      title.textContent = gBrowserBundle.formatStringFromName(
+        "livebookmarkMigration.title",
+        [appName]
+      );
       head.appendChild(title);
 
       let body = doc.createElement("body");
       root.appendChild(body);
       // Make things vaguely readable:
       body.textContent = "\n";
 
       for (let lb of liveBookmarks) {
@@ -134,72 +148,87 @@ var LiveBookmarkMigrator = {
           outline.setAttribute("htmlUrl", lb.siteURI.href);
         }
         body.appendChild(outline);
         body.appendChild(doc.createTextNode("\n"));
       }
 
       let serializer = new XMLSerializer();
       // The serializer doesn't add an XML declaration (bug 318086), so we add it manually.
-      opmlString = '<?xml version="1.0"?>\n' + serializer.serializeToString(doc);
+      opmlString =
+        '<?xml version="1.0"?>\n' + serializer.serializeToString(doc);
     } finally {
       hiddenBrowser.close();
     }
 
-    let {path: basePath} = Services.dirsvc.get("Desk", Ci.nsIFile);
+    let { path: basePath } = Services.dirsvc.get("Desk", Ci.nsIFile);
     let feedFileName = appName + " feeds backup.opml";
     basePath = OS.Path.join(basePath, feedFileName);
-    let {file, path} = await OS.File.openUnique(basePath, {humanReadable: true});
+    let { file, path } = await OS.File.openUnique(basePath, {
+      humanReadable: true,
+    });
     await file.close();
-    return OS.File.writeAtomic(path, opmlString, {encoding: "utf-8"});
+    return OS.File.writeAtomic(path, opmlString, { encoding: "utf-8" });
   },
 
   async _transformBookmarks(liveBookmarks) {
-    let itemsToReplace = liveBookmarks.filter(lb => !this._isOldDefaultBookmark(lb));
+    let itemsToReplace = liveBookmarks.filter(
+      lb => !this._isOldDefaultBookmark(lb)
+    );
     let itemsToInsert = itemsToReplace.map(item => ({
       url: item.siteURI || item.feedURI,
       parentGuid: item.parentGuid,
       index: item.index,
       title: item.title,
       dateAdded: item.dateAdded,
     }));
     // Insert new bookmarks at the same index. The list is sorted by position
     // in reverse order, so we'll insert later items before the earlier ones.
     // This avoids the indices getting outdated for later insertions.
     for (let item of itemsToInsert) {
       await PlacesUtils.bookmarks.insert(item).catch(Cu.reportError);
     }
     // Now remove all of the actual live bookmarks. Avoid mismatches due to the
     // bookmarks having been moved or altered in the meantime, just remove
     // anything with a matching guid:
-    let itemsToRemove = liveBookmarks.map(lb => ({guid: lb.guid}));
+    let itemsToRemove = liveBookmarks.map(lb => ({ guid: lb.guid }));
     await PlacesUtils.bookmarks.remove(itemsToRemove).catch(Cu.reportError);
   },
 
   _openSUMOPage() {
-    let sumoURL = Services.urlFormatter.formatURLPref("app.support.baseURL") + "live-bookmarks-migration";
-    let topWin = BrowserWindowTracker.getTopWindow({private: false});
+    let sumoURL =
+      Services.urlFormatter.formatURLPref("app.support.baseURL") +
+      "live-bookmarks-migration";
+    let topWin = BrowserWindowTracker.getTopWindow({ private: false });
     if (!topWin) {
       let args = PlacesUtils.toISupportsString(sumoURL);
-      Services.ww.openWindow(null, AppConstants.BROWSER_CHROME_URL, "_blank", "chrome,dialog=no,all", args);
+      Services.ww.openWindow(
+        null,
+        AppConstants.BROWSER_CHROME_URL,
+        "_blank",
+        "chrome,dialog=no,all",
+        args
+      );
     } else {
       topWin.openTrustedLinkIn(sumoURL, "tab");
     }
   },
 
   async migrate() {
     try {
       // First fetch all live bookmark folders:
       let liveBookmarks = await this._fetch();
       if (!liveBookmarks || !liveBookmarks.length) {
         migrationSucceeded();
         return;
       }
 
-      let haveNonDefaultBookmarks = liveBookmarks.some(lb => !this._isOldDefaultBookmark(lb));
+      let haveNonDefaultBookmarks = liveBookmarks.some(
+        lb => !this._isOldDefaultBookmark(lb)
+      );
       // Then generate OPML file content, write to disk, if we've got anything to back up:
       if (haveNonDefaultBookmarks) {
         await this._writeOPML(liveBookmarks);
       }
       // Replace all live bookmarks with normal bookmarks.
       await this._transformBookmarks(liveBookmarks).catch(ex => {
         // Don't stop migrating at this point, because we've written the exported OPML file.
         // We shouldn't ever hit this - transformLiveBookmarks is supposed to take
@@ -210,17 +239,22 @@ var LiveBookmarkMigrator = {
       try {
         if (haveNonDefaultBookmarks) {
           this._openSUMOPage();
         }
       } catch (ex) {
         // Note that if we get here, we've removed any extant livemarks, so there's no point
         // re-running the migration - there won't be any livemarks left and we won't re-show the SUMO
         // page. So just report the error, but mark migration as successful.
-        Cu.reportError(new Error("Live bookmarks migration didn't manage to show the support page: " + ex));
+        Cu.reportError(
+          new Error(
+            "Live bookmarks migration didn't manage to show the support page: " +
+              ex
+          )
+        );
       }
     } catch (ex) {
       migrationError();
       throw ex;
     }
 
     migrationSucceeded();
   },
--- a/browser/modules/NewTabPagePreloading.jsm
+++ b/browser/modules/NewTabPagePreloading.jsm
@@ -4,63 +4,73 @@
 
 /*
  * This module is in charge of preloading 'new tab' pages for use when
  * the user opens a new tab.
  */
 
 var EXPORTED_SYMBOLS = ["NewTabPagePreloading"];
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
   E10SUtils: "resource://gre/modules/E10SUtils.jsm",
   PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
 });
 
 XPCOMUtils.defineLazyServiceGetters(this, {
-  gAboutNewTabService: ["@mozilla.org/browser/aboutnewtab-service;1", "nsIAboutNewTabService"],
+  gAboutNewTabService: [
+    "@mozilla.org/browser/aboutnewtab-service;1",
+    "nsIAboutNewTabService",
+  ],
 });
 
 let NewTabPagePreloading = {
   // Maximum number of instances of a given page we'll preload at any time.
   // Because we preload about:newtab for normal windows, and about:privatebrowsing
   // for private ones, we could have 3 of each.
   MAX_COUNT: 3,
 
   // How many preloaded tabs we have, across all windows, for the private and non-private
   // case:
   browserCounts: {
     normal: 0,
     private: 0,
   },
 
   get enabled() {
-    return this.prefEnabled && this.newTabEnabled &&
-      !gAboutNewTabService.overridden;
+    return (
+      this.prefEnabled && this.newTabEnabled && !gAboutNewTabService.overridden
+    );
   },
 
   /**
    * Create a browser in the right process type.
    */
   _createBrowser(win) {
     const {
       gBrowser,
       gMultiProcessBrowser,
       gFissionBrowser,
       BROWSER_NEW_TAB_URL,
     } = win;
 
-    let remoteType =
-      E10SUtils.getRemoteTypeForURI(BROWSER_NEW_TAB_URL,
-                                    gMultiProcessBrowser,
-                                    gFissionBrowser);
-    let browser = gBrowser.createBrowser({ isPreloadBrowser: true, remoteType });
+    let remoteType = E10SUtils.getRemoteTypeForURI(
+      BROWSER_NEW_TAB_URL,
+      gMultiProcessBrowser,
+      gFissionBrowser
+    );
+    let browser = gBrowser.createBrowser({
+      isPreloadBrowser: true,
+      remoteType,
+    });
     gBrowser.preloadedBrowser = browser;
 
     let panel = gBrowser.getPanel(browser);
     gBrowser.tabpanels.appendChild(panel);
 
     if (remoteType != E10SUtils.NOT_REMOTE) {
       // For remote browsers, we need to make sure that the webProgress is
       // instantiated, otherwise the parent won't get informed about the state
@@ -71,20 +81,25 @@ let NewTabPagePreloading = {
   },
 
   /**
    * Move the contents of a preload browser across to a different window.
    */
   _adoptBrowserFromOtherWindow(window) {
     let winPrivate = PrivateBrowsingUtils.isWindowPrivate(window);
     // Grab the least-recently-focused window with a preloaded browser:
-    let oldWin = BrowserWindowTracker.orderedWindows.filter(w => {
-      return winPrivate == PrivateBrowsingUtils.isWindowPrivate(w) &&
-        w.gBrowser && w.gBrowser.preloadedBrowser;
-    }).pop();
+    let oldWin = BrowserWindowTracker.orderedWindows
+      .filter(w => {
+        return (
+          winPrivate == PrivateBrowsingUtils.isWindowPrivate(w) &&
+          w.gBrowser &&
+          w.gBrowser.preloadedBrowser
+        );
+      })
+      .pop();
     if (!oldWin) {
       return null;
     }
     // Don't call getPreloadedBrowser because it'll consume the browser:
     let oldBrowser = oldWin.gBrowser.preloadedBrowser;
     oldWin.gBrowser.preloadedBrowser = null;
 
     let newBrowser = this._createBrowser(window);
@@ -94,36 +109,43 @@ let NewTabPagePreloading = {
 
     oldBrowser.swapBrowsers(newBrowser);
 
     // Switch outerWindowIDs for remote browsers.
     if (newBrowser.isRemoteBrowser) {
       newBrowser._outerWindowID = oldBrowser._outerWindowID;
     }
 
-    window.gBrowser._outerWindowIDBrowserMap.set(newBrowser.outerWindowID, newBrowser);
+    window.gBrowser._outerWindowIDBrowserMap.set(
+      newBrowser.outerWindowID,
+      newBrowser
+    );
     newBrowser.permanentKey = oldBrowser.permanentKey;
 
     oldWin.gBrowser.getPanel(oldBrowser).remove();
     return newBrowser;
   },
 
   maybeCreatePreloadedBrowser(window) {
     // If we're not enabled, have already got one, or are in a popup window,
     // don't bother creating a preload browser - there's no point.
-    if (!this.enabled || window.gBrowser.preloadedBrowser ||
-        !window.toolbar.visible) {
+    if (
+      !this.enabled ||
+      window.gBrowser.preloadedBrowser ||
+      !window.toolbar.visible
+    ) {
       return;
     }
 
     // Don't bother creating a preload browser if we're not in the top set of windows:
     let windowPrivate = PrivateBrowsingUtils.isWindowPrivate(window);
     let countKey = windowPrivate ? "private" : "normal";
-    let topWindows = BrowserWindowTracker.orderedWindows.filter(w =>
-      PrivateBrowsingUtils.isWindowPrivate(w) == windowPrivate);
+    let topWindows = BrowserWindowTracker.orderedWindows.filter(
+      w => PrivateBrowsingUtils.isWindowPrivate(w) == windowPrivate
+    );
     if (topWindows.indexOf(window) >= this.MAX_COUNT) {
       return;
     }
 
     // If we're in the top set of windows, and we already have enough preloaded
     // tabs, don't create yet another one, just steal an existing one:
     if (this.browserCounts[countKey] >= this.MAX_COUNT) {
       let browser = this._adoptBrowserFromOtherWindow(window);
@@ -162,27 +184,39 @@ let NewTabPagePreloading = {
 
     // Attach the nsIFormFillController now that we know the browser
     // will be used. If we do that before and the preloaded browser
     // won't be consumed until shutdown then we leak a docShell.
     // Also, we do not need to take care of attaching nsIFormFillControllers
     // in the case that the browser is remote, as remote browsers take
     // care of that themselves.
     if (browser) {
-      let countKey = PrivateBrowsingUtils.isWindowPrivate(window) ? "private" : "normal";
+      let countKey = PrivateBrowsingUtils.isWindowPrivate(window)
+        ? "private"
+        : "normal";
       this.browserCounts[countKey]--;
       browser.setAttribute("preloadedState", "consumed");
       browser.setAttribute("autocompletepopup", "PopupAutoComplete");
     }
 
     return browser;
   },
 
   removePreloadedBrowser(window) {
     let browser = this.getPreloadedBrowser(window);
     if (browser) {
       window.gBrowser.getPanel(browser).remove();
     }
   },
 };
 
-XPCOMUtils.defineLazyPreferenceGetter(NewTabPagePreloading, "prefEnabled", "browser.newtab.preload", true);
-XPCOMUtils.defineLazyPreferenceGetter(NewTabPagePreloading, "newTabEnabled", "browser.newtabpage.enabled", true);
+XPCOMUtils.defineLazyPreferenceGetter(
+  NewTabPagePreloading,
+  "prefEnabled",
+  "browser.newtab.preload",
+  true
+);
+XPCOMUtils.defineLazyPreferenceGetter(
+  NewTabPagePreloading,
+  "newTabEnabled",
+  "browser.newtabpage.enabled",
+  true
+);
--- a/browser/modules/OpenInTabsUtils.jsm
+++ b/browser/modules/OpenInTabsUtils.jsm
@@ -1,21 +1,25 @@
 /* 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/. */
 
 "use strict";
 
 this.EXPORTED_SYMBOLS = ["OpenInTabsUtils"];
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "bundle", function() {
-  return Services.strings.createBundle("chrome://browser/locale/tabbrowser.properties");
+  return Services.strings.createBundle(
+    "chrome://browser/locale/tabbrowser.properties"
+  );
 });
 
 /**
  * Utility functions that can be used when opening multiple tabs, that can be
  * called without any tabbrowser instance.
  */
 this.OpenInTabsUtils = {
   getString(key) {
@@ -40,32 +44,36 @@ this.OpenInTabsUtils = {
     }
 
     // default to true: if it were false, we wouldn't get this far
     let warnOnOpen = { value: true };
 
     const messageKey = "tabs.openWarningMultipleBranded";
     const openKey = "tabs.openButtonMultiple";
     const BRANDING_BUNDLE_URI = "chrome://branding/locale/brand.properties";
-    let brandShortName = Services.strings.createBundle(BRANDING_BUNDLE_URI).
-                         GetStringFromName("brandShortName");
+    let brandShortName = Services.strings
+      .createBundle(BRANDING_BUNDLE_URI)
+      .GetStringFromName("brandShortName");
 
     let buttonPressed = Services.prompt.confirmEx(
       aWindow,
       this.getString("tabs.openWarningTitle"),
       this.getFormattedString(messageKey, [numTabsToOpen, brandShortName]),
-      (Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0) +
-        (Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1),
-      this.getString(openKey), null, null,
-      this.getFormattedString("tabs.openWarningPromptMeBranded",
-                              [brandShortName]),
+      Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0 +
+        Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1,
+      this.getString(openKey),
+      null,
+      null,
+      this.getFormattedString("tabs.openWarningPromptMeBranded", [
+        brandShortName,
+      ]),
       warnOnOpen
     );
 
-    let reallyOpen = (buttonPressed == 0);
+    let reallyOpen = buttonPressed == 0;
     // don't set the pref unless they press OK and it's false
     if (reallyOpen && !warnOnOpen.value) {
       Services.prefs.setBoolPref(WARN_ON_OPEN_PREF, false);
     }
 
     return reallyOpen;
   },
 
--- a/browser/modules/PageActions.jsm
+++ b/browser/modules/PageActions.jsm
@@ -9,26 +9,38 @@ var EXPORTED_SYMBOLS = [
   // PageActions.Action
   // PageActions.ACTION_ID_BOOKMARK
   // PageActions.ACTION_ID_PIN_TAB
   // PageActions.ACTION_ID_BOOKMARK_SEPARATOR
   // PageActions.ACTION_ID_BUILT_IN_SEPARATOR
   // PageActions.ACTION_ID_TRANSIENT_SEPARATOR
 ];
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-ChromeUtils.defineModuleGetter(this, "AppConstants",
-  "resource://gre/modules/AppConstants.jsm");
-ChromeUtils.defineModuleGetter(this, "AsyncShutdown",
-  "resource://gre/modules/AsyncShutdown.jsm");
-ChromeUtils.defineModuleGetter(this, "BinarySearch",
-  "resource://gre/modules/BinarySearch.jsm");
-ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils",
-  "resource://gre/modules/PrivateBrowsingUtils.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "AppConstants",
+  "resource://gre/modules/AppConstants.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "AsyncShutdown",
+  "resource://gre/modules/AsyncShutdown.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "BinarySearch",
+  "resource://gre/modules/BinarySearch.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "PrivateBrowsingUtils",
+  "resource://gre/modules/PrivateBrowsingUtils.jsm"
+);
 
 const ACTION_ID_BOOKMARK = "bookmark";
 const ACTION_ID_PIN_TAB = "pinTab";
 const ACTION_ID_BOOKMARK_SEPARATOR = "bookmarkSeparator";
 const ACTION_ID_BUILT_IN_SEPARATOR = "builtInSeparator";
 const ACTION_ID_TRANSIENT_SEPARATOR = "transientSeparator";
 
 const PREF_PERSISTED_ACTIONS = "browser.pageActions.persistedActions";
@@ -74,17 +86,17 @@ var PageActions = {
 
     // Purge removed actions from persisted state on shutdown.  The point is not
     // to do it on Action.remove().  That way actions that are removed and
     // re-added while the app is running will have their urlbar placement and
     // other state remembered and restored.  This happens for upgraded and
     // downgraded extensions, for example.
     AsyncShutdown.profileBeforeChange.addBlocker(
       "PageActions: purging unregistered actions from cache",
-      () => this._purgeUnregisteredPersistedActions(),
+      () => this._purgeUnregisteredPersistedActions()
     );
   },
 
   _deferredAddActionCalls: [],
 
   /**
    * A list of all Action objects, not in any particular order.  Not live.
    * (array of Action objects)
@@ -112,30 +124,34 @@ var PageActions = {
   actionsInPanel(browserWindow) {
     function filter(action) {
       return action.shouldShowInPanel(browserWindow);
     }
     let actions = this._builtInActions.filter(filter);
     let nonBuiltInActions = this._nonBuiltInActions.filter(filter);
     if (nonBuiltInActions.length) {
       if (actions.length) {
-        actions.push(new Action({
-          id: ACTION_ID_BUILT_IN_SEPARATOR,
-          _isSeparator: true,
-        }));
+        actions.push(
+          new Action({
+            id: ACTION_ID_BUILT_IN_SEPARATOR,
+            _isSeparator: true,
+          })
+        );
       }
       actions.push(...nonBuiltInActions);
     }
     let transientActions = this._transientActions.filter(filter);
     if (transientActions.length) {
       if (actions.length) {
-        actions.push(new Action({
-          id: ACTION_ID_TRANSIENT_SEPARATOR,
-          _isSeparator: true,
-        }));
+        actions.push(
+          new Action({
+            id: ACTION_ID_TRANSIENT_SEPARATOR,
+            _isSeparator: true,
+          })
+        );
       }
       actions.push(...transientActions);
     }
     return actions;
   },
 
   /**
    * The list of actions currently in the urlbar, sorted in the order in which
@@ -208,63 +224,70 @@ var PageActions = {
     // _nonBuiltInActions.
 
     // Keep in mind that _insertBeforeActionID may be present but null, which
     // means the action should be appended to the built-ins.
     if ("__insertBeforeActionID" in action) {
       // A "semi-built-in" action, probably an action from an extension
       // bundled with the browser.  Right now we simply assume that no other
       // consumers will use _insertBeforeActionID.
-      let index =
-        !action.__insertBeforeActionID ? -1 :
-        this._builtInActions.findIndex(a => {
-          return a.id == action.__insertBeforeActionID;
-        });
+      let index = !action.__insertBeforeActionID
+        ? -1
+        : this._builtInActions.findIndex(a => {
+            return a.id == action.__insertBeforeActionID;
+          });
       if (index < 0) {
         // Append the action (excluding transient actions).
         index = this._builtInActions.filter(a => !a.__transient).length;
       }
       this._builtInActions.splice(index, 0, action);
     } else if (action.__transient) {
       // A transient action.
       this._transientActions.push(action);
     } else if (action._isBuiltIn) {
       // A built-in action. These are mostly added on init before all other
       // actions, one after the other. Extension actions load later and should
       // be at the end, so just push onto the array.
       this._builtInActions.push(action);
     } else {
       // A non-built-in action, like a non-bundled extension potentially.
       // Keep this list sorted by title.
-      let index = BinarySearch.insertionIndexOf((a1, a2) => {
-        return a1.getTitle().localeCompare(a2.getTitle());
-      }, this._nonBuiltInActions, action);
+      let index = BinarySearch.insertionIndexOf(
+        (a1, a2) => {
+          return a1.getTitle().localeCompare(a2.getTitle());
+        },
+        this._nonBuiltInActions,
+        action
+      );
       this._nonBuiltInActions.splice(index, 0, action);
     }
 
     if (this._persistedActions.ids.includes(action.id)) {
       // The action has been seen before.  Override its pinnedToUrlbar value
       // with the persisted value.  Set the private version of that property
       // so that onActionToggledPinnedToUrlbar isn't called, which happens when
       // the public version is set.
-      action._pinnedToUrlbar =
-        this._persistedActions.idsInUrlbar.includes(action.id);
+      action._pinnedToUrlbar = this._persistedActions.idsInUrlbar.includes(
+        action.id
+      );
     } else {
       // The action is new.  Store it in the persisted actions.
       this._persistedActions.ids.push(action.id);
       this._updateIDsPinnedToUrlbarForAction(action);
     }
   },
 
   _updateIDsPinnedToUrlbarForAction(action) {
     let index = this._persistedActions.idsInUrlbar.indexOf(action.id);
     if (action.pinnedToUrlbar) {
       if (index < 0) {
-        index = action.id == ACTION_ID_BOOKMARK ? -1 :
-                this._persistedActions.idsInUrlbar.indexOf(ACTION_ID_BOOKMARK);
+        index =
+          action.id == ACTION_ID_BOOKMARK
+            ? -1
+            : this._persistedActions.idsInUrlbar.indexOf(ACTION_ID_BOOKMARK);
         if (index < 0) {
           index = this._persistedActions.idsInUrlbar.length;
         }
         this._persistedActions.idsInUrlbar.splice(index, 0, action.id);
       }
     } else if (index >= 0) {
       this._persistedActions.idsInUrlbar.splice(index, 1);
     }
@@ -323,18 +346,19 @@ var PageActions = {
     for (let bpa of allBrowserPageActions()) {
       bpa.placeActionInUrlbar(action);
     }
   },
 
   logTelemetry(type, action, node = null) {
     if (type == "used") {
       type =
-        node && node.closest("#urlbar-container") ? "urlbar_used" :
-        "panel_used";
+        node && node.closest("#urlbar-container")
+          ? "urlbar_used"
+          : "panel_used";
     }
     let histogramID = "FX_PAGE_ACTION_" + type.toUpperCase();
     try {
       let histogram = Services.telemetry.getHistogramById(histogramID);
       if (action._isMozillaAction) {
         histogram.add(action.labelForHistogram);
       } else {
         histogram.add("other");
@@ -374,19 +398,21 @@ var PageActions = {
       });
     }
     this._storePersistedActions();
   },
 
   _migratePersistedActions(actions) {
     // Start with actions.version and migrate one version at a time, all the way
     // up to the current version.
-    for (let version = actions.version || 0;
-         version < PERSISTED_ACTIONS_CURRENT_VERSION;
-         version++) {
+    for (
+      let version = actions.version || 0;
+      version < PERSISTED_ACTIONS_CURRENT_VERSION;
+      version++
+    ) {
       let methodName = `_migratePersistedActionsTo${version + 1}`;
       actions = this[methodName](actions);
       actions.version = version + 1;
     }
     return actions;
   },
 
   _migratePersistedActionsTo1(actions) {
@@ -416,17 +442,16 @@ var PageActions = {
     version: PERSISTED_ACTIONS_CURRENT_VERSION,
     // action IDs that have ever been seen and not removed, order not important
     ids: [],
     // action IDs ordered by position in urlbar
     idsInUrlbar: [],
   },
 };
 
-
 /**
  * A single page action.
  *
  * Each action can have both per-browser-window state and global state.
  * Per-window state takes precedence over global state.  This is reflected in
  * the title, tooltip, disabled, and icon properties.  Each of these properties
  * has a getter method and setter method that takes a browser window.  Pass null
  * to get the action's global state.  Pass a browser window to get the per-
@@ -638,18 +663,20 @@ Action.prototype = {
    */
   canShowInWindow(browserWindow) {
     if (this._extensionID) {
       let policy = WebExtensionPolicy.getByID(this._extensionID);
       if (!policy.canAccessWindow(browserWindow)) {
         return false;
       }
     }
-    return !(this.disablePrivateBrowsing &&
-             PrivateBrowsingUtils.isWindowPrivate(browserWindow));
+    return !(
+      this.disablePrivateBrowsing &&
+      PrivateBrowsingUtils.isWindowPrivate(browserWindow)
+    );
   },
 
   /**
    * True if the action is pinned to the urlbar.  The action is shown in the
    * urlbar if it's pinned and not disabled.  (bool)
    */
   get pinnedToUrlbar() {
     return this._pinnedToUrlbar || false;
@@ -696,18 +723,22 @@ Action.prototype = {
     return this._getProperties(browserWindow).iconProps;
   },
 
   _createIconProperties(urls) {
     if (urls && typeof urls == "object") {
       let props = this._iconProperties.get(urls);
       if (!props) {
         props = Object.freeze({
-          "--pageAction-image-16px": escapeCSSURL(this._iconURLForSize(urls, 16)),
-          "--pageAction-image-32px": escapeCSSURL(this._iconURLForSize(urls, 32)),
+          "--pageAction-image-16px": escapeCSSURL(
+            this._iconURLForSize(urls, 16)
+          ),
+          "--pageAction-image-32px": escapeCSSURL(
+            this._iconURLForSize(urls, 32)
+          ),
         });
         this._iconProperties.set(urls, props);
       }
       return props;
     }
 
     let cssURL = urls ? escapeCSSURL(urls) : null;
     return Object.freeze({
@@ -823,18 +854,20 @@ Action.prototype = {
   get isBadged() {
     return this._isBadged || false;
   },
 
   get labelForHistogram() {
     // The histogram label value has a length limit of 20 and restricted to a
     // pattern. See MAX_LABEL_LENGTH and CPP_IDENTIFIER_PATTERN in
     // toolkit/components/telemetry/parse_histograms.py
-    return this._labelForHistogram
-      || this._id.replace(/_\w{1}/g, match => match[1].toUpperCase()).substr(0, 20);
+    return (
+      this._labelForHistogram ||
+      this._id.replace(/_\w{1}/g, match => match[1].toUpperCase()).substr(0, 20)
+    );
   },
 
   /**
    * Selects the best matching icon from the given URLs object for the
    * given preferred size.
    *
    * @param {object} urls
    *        An object containing square icons of various sizes. The name
@@ -854,19 +887,20 @@ Action.prototype = {
     // pass.
     let bestSize = null;
     if (urls[preferredSize]) {
       bestSize = preferredSize;
     } else if (urls[2 * preferredSize]) {
       bestSize = 2 * preferredSize;
     } else {
       let sizes = Object.keys(urls)
-                        .map(key => parseInt(key, 10))
-                        .sort((a, b) => a - b);
-      bestSize = sizes.find(candidate => candidate > preferredSize) || sizes.pop();
+        .map(key => parseInt(key, 10))
+        .sort((a, b) => a - b);
+      bestSize =
+        sizes.find(candidate => candidate > preferredSize) || sizes.pop();
     }
     return urls[bestSize];
   },
 
   /**
    * Performs the command for an action.  If the action has an onCommand
    * handler, then it's called.  If the action has a subview or iframe, then a
    * panel is opened, displaying the subview or iframe.
@@ -1049,38 +1083,42 @@ Action.prototype = {
    *
    * @param  browserWindow (DOM window, required)
    *         The window.
    * @return True if the action should be shown and false otherwise.  Actions
    *         are always shown in the panel unless they're both transient and
    *         disabled.
    */
   shouldShowInPanel(browserWindow) {
-    return (!this.__transient || !this.getDisabled(browserWindow)) &&
-            this.canShowInWindow(browserWindow);
+    return (
+      (!this.__transient || !this.getDisabled(browserWindow)) &&
+      this.canShowInWindow(browserWindow)
+    );
   },
 
   /**
    * Returns whether the action should be shown in a given window's urlbar.
    *
    * @param  browserWindow (DOM window, required)
    *         The window.
    * @return True if the action should be shown and false otherwise.  The action
    *         should be shown if it's both pinned and not disabled.
    */
   shouldShowInUrlbar(browserWindow) {
-    return (this.pinnedToUrlbar && !this.getDisabled(browserWindow)) &&
-            this.canShowInWindow(browserWindow);
+    return (
+      this.pinnedToUrlbar &&
+      !this.getDisabled(browserWindow) &&
+      this.canShowInWindow(browserWindow)
+    );
   },
 
   get _isBuiltIn() {
-    let builtInIDs = [
-      "pocket",
-      "screenshots_mozilla_org",
-    ].concat(gBuiltInActions.filter(a => !a.__isSeparator).map(a => a.id));
+    let builtInIDs = ["pocket", "screenshots_mozilla_org"].concat(
+      gBuiltInActions.filter(a => !a.__isSeparator).map(a => a.id)
+    );
     return builtInIDs.includes(this.id);
   },
 
   get _isMozillaAction() {
     return this._isBuiltIn || this.id == "webcompat-reporter_mozilla_org";
   },
 };
 
@@ -1090,25 +1128,23 @@ this.PageActions.ACTION_ID_BUILT_IN_SEPA
 this.PageActions.ACTION_ID_TRANSIENT_SEPARATOR = ACTION_ID_TRANSIENT_SEPARATOR;
 
 // These are only necessary so that Pocket and the test can use them.
 this.PageActions.ACTION_ID_BOOKMARK = ACTION_ID_BOOKMARK;
 this.PageActions.ACTION_ID_PIN_TAB = ACTION_ID_PIN_TAB;
 this.PageActions.ACTION_ID_BOOKMARK_SEPARATOR = ACTION_ID_BOOKMARK_SEPARATOR;
 this.PageActions.PREF_PERSISTED_ACTIONS = PREF_PERSISTED_ACTIONS;
 
-
 // Sorted in the order in which they should appear in the page action panel.
 // Does not include the page actions of extensions bundled with the browser.
 // They're added by the relevant extension code.
 // NOTE: If you add items to this list (or system add-on actions that we
 // want to keep track of), make sure to also update Histograms.json for the
 // new actions.
 var gBuiltInActions = [
-
   // bookmark
   {
     id: ACTION_ID_BOOKMARK,
     urlbarIDOverride: "star-button-box",
     _urlbarNodeInMarkup: true,
     // The title is set in browser-pageActions.js by calling
     // BookmarkingUI.updateBookmarkPageMenuItem().
     title: "",
@@ -1134,17 +1170,19 @@ var gBuiltInActions = [
         for (let event of ["TabPinned", "TabUnpinned"]) {
           browserWindow.removeEventListener(event, handlePinEvent);
         }
       }
 
       for (let event of ["TabPinned", "TabUnpinned"]) {
         browserWindow.addEventListener(event, handlePinEvent);
       }
-      browserWindow.addEventListener("unload", handleWindowUnload, {once: true});
+      browserWindow.addEventListener("unload", handleWindowUnload, {
+        once: true,
+      });
     },
     onPlacedInPanel(buttonNode) {
       browserPageActions(buttonNode).pinTab.updateState();
     },
     onPlacedInUrlbar(buttonNode) {
       browserPageActions(buttonNode).pinTab.updateState();
     },
     onLocationChange(browserWindow) {
@@ -1161,31 +1199,33 @@ var gBuiltInActions = [
     _isSeparator: true,
   },
 
   // copy URL
   {
     id: "copyURL",
     title: "copyURL-title",
     onBeforePlacedInWindow(browserWindow) {
-      browserPageActions(browserWindow).copyURL
-        .onBeforePlacedInWindow(browserWindow);
+      browserPageActions(browserWindow).copyURL.onBeforePlacedInWindow(
+        browserWindow
+      );
     },
     onCommand(event, buttonNode) {
       browserPageActions(buttonNode).copyURL.onCommand(event, buttonNode);
     },
   },
 
   // email link
   {
     id: "emailLink",
     title: "emailLink-title",
     onBeforePlacedInWindow(browserWindow) {
-      browserPageActions(browserWindow).emailLink
-        .onBeforePlacedInWindow(browserWindow);
+      browserPageActions(browserWindow).emailLink.onBeforePlacedInWindow(
+        browserWindow
+      );
     },
     onCommand(event, buttonNode) {
       browserPageActions(buttonNode).emailLink.onCommand(event, buttonNode);
     },
   },
 
   // add search engine
   {
@@ -1193,87 +1233,96 @@ var gBuiltInActions = [
     // The title is set in browser-pageActions.js.
     title: "",
     isBadged: true,
     _transient: true,
     onShowingInPanel(buttonNode) {
       browserPageActions(buttonNode).addSearchEngine.onShowingInPanel();
     },
     onCommand(event, buttonNode) {
-      browserPageActions(buttonNode).addSearchEngine
-        .onCommand(event, buttonNode);
+      browserPageActions(buttonNode).addSearchEngine.onCommand(
+        event,
+        buttonNode
+      );
     },
     onSubviewShowing(panelViewNode) {
-      browserPageActions(panelViewNode).addSearchEngine
-        .onSubviewShowing(panelViewNode);
+      browserPageActions(panelViewNode).addSearchEngine.onSubviewShowing(
+        panelViewNode
+      );
     },
   },
 ];
 
 // send to device
 if (Services.prefs.getBoolPref("identity.fxaccounts.enabled")) {
-  gBuiltInActions.push(
-  {
+  gBuiltInActions.push({
     id: "sendToDevice",
     // The actual title is set by each window, per window, and depends on the
     // number of tabs that are selected.
     title: "sendToDevice",
     onBeforePlacedInWindow(browserWindow) {
-      browserPageActions(browserWindow).sendToDevice
-        .onBeforePlacedInWindow(browserWindow);
+      browserPageActions(browserWindow).sendToDevice.onBeforePlacedInWindow(
+        browserWindow
+      );
     },
     onLocationChange(browserWindow) {
       browserPageActions(browserWindow).sendToDevice.onLocationChange();
     },
     wantsSubview: true,
     onSubviewPlaced(panelViewNode) {
-      browserPageActions(panelViewNode).sendToDevice
-        .onSubviewPlaced(panelViewNode);
+      browserPageActions(panelViewNode).sendToDevice.onSubviewPlaced(
+        panelViewNode
+      );
     },
     onSubviewShowing(panelViewNode) {
-      browserPageActions(panelViewNode).sendToDevice
-        .onShowingSubview(panelViewNode);
+      browserPageActions(panelViewNode).sendToDevice.onShowingSubview(
+        panelViewNode
+      );
     },
   });
 }
 
 // share URL
 if (AppConstants.platform == "macosx") {
-  gBuiltInActions.push(
-  {
+  gBuiltInActions.push({
     id: "shareURL",
     title: "shareURL-title",
     onShowingInPanel(buttonNode) {
       browserPageActions(buttonNode).shareURL.onShowingInPanel(buttonNode);
     },
     onBeforePlacedInWindow(browserWindow) {
-      browserPageActions(browserWindow).shareURL
-        .onBeforePlacedInWindow(browserWindow);
+      browserPageActions(browserWindow).shareURL.onBeforePlacedInWindow(
+        browserWindow
+      );
     },
     wantsSubview: true,
     onSubviewShowing(panelViewNode) {
-        browserPageActions(panelViewNode).shareURL
-          .onShowingSubview(panelViewNode);
+      browserPageActions(panelViewNode).shareURL.onShowingSubview(
+        panelViewNode
+      );
     },
   });
 }
 
 if (AppConstants.isPlatformAndVersionAtLeast("win", "6.4")) {
   gBuiltInActions.push(
-  // Share URL
-  {
-    id: "shareURL",
-    title: "shareURL-title",
-    onBeforePlacedInWindow(buttonNode) {
-      browserPageActions(buttonNode).shareURL.onBeforePlacedInWindow(buttonNode);
-    },
-    onCommand(event, buttonNode) {
-      browserPageActions(buttonNode).shareURL.onCommand(event, buttonNode);
-    },
-  });
+    // Share URL
+    {
+      id: "shareURL",
+      title: "shareURL-title",
+      onBeforePlacedInWindow(buttonNode) {
+        browserPageActions(buttonNode).shareURL.onBeforePlacedInWindow(
+          buttonNode
+        );
+      },
+      onCommand(event, buttonNode) {
+        browserPageActions(buttonNode).shareURL.onCommand(event, buttonNode);
+      },
+    }
+  );
 }
 
 /**
  * Gets a BrowserPageActions object in a browser window.
  *
  * @param  obj
  *         Either a DOM node or a browser window.
  * @return The BrowserPageActions object in the browser window related to the
--- a/browser/modules/PermissionUI.jsm
+++ b/browser/modules/PermissionUI.jsm
@@ -1,18 +1,15 @@
-
 /* 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/. */
 
 "use strict";
 
-var EXPORTED_SYMBOLS = [
-  "PermissionUI",
-];
+var EXPORTED_SYMBOLS = ["PermissionUI"];
 
 /**
  * PermissionUI is responsible for exposing both a prototype
  * PermissionPrompt that can be used by arbitrary browser
  * components and add-ons, but also hosts the implementations of
  * built-in permission prompts.
  *
  * If you're developing a feature that requires web content to ask
@@ -55,41 +52,69 @@ var EXPORTED_SYMBOLS = [
  * and going through nsIContentPermissionPrompt.
  *
  * It is, however, possible to take advantage of PermissionPrompt without
  * having to go through nsIContentPermissionPrompt or with a
  * nsIContentPermissionRequest. The PermissionPromptPrototype can be
  * imported, subclassed, and have prompt() called directly, without
  * the caller having called into createPermissionPrompt.
  */
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 
-ChromeUtils.defineModuleGetter(this, "Services",
-  "resource://gre/modules/Services.jsm");
-ChromeUtils.defineModuleGetter(this, "SitePermissions",
-  "resource:///modules/SitePermissions.jsm");
-ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils",
-  "resource://gre/modules/PrivateBrowsingUtils.jsm");
-ChromeUtils.defineModuleGetter(this, "URICountListener",
-  "resource:///modules/BrowserUsageTelemetry.jsm");
-ChromeUtils.defineModuleGetter(this, "PermissionUITelemetry",
-  "resource:///modules/PermissionUITelemetry.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "Services",
+  "resource://gre/modules/Services.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "SitePermissions",
+  "resource:///modules/SitePermissions.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "PrivateBrowsingUtils",
+  "resource://gre/modules/PrivateBrowsingUtils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "URICountListener",
+  "resource:///modules/BrowserUsageTelemetry.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "PermissionUITelemetry",
+  "resource:///modules/PermissionUITelemetry.jsm"
+);
 
-XPCOMUtils.defineLazyServiceGetter(this, "IDNService",
-  "@mozilla.org/network/idn-service;1", "nsIIDNService");
+XPCOMUtils.defineLazyServiceGetter(
+  this,
+  "IDNService",
+  "@mozilla.org/network/idn-service;1",
+  "nsIIDNService"
+);
 
 XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() {
-  return Services.strings
-                 .createBundle("chrome://browser/locale/browser.properties");
+  return Services.strings.createBundle(
+    "chrome://browser/locale/browser.properties"
+  );
 });
 
-XPCOMUtils.defineLazyPreferenceGetter(this, "animationsEnabled",
-                                      "toolkit.cosmeticAnimations.enabled");
-XPCOMUtils.defineLazyPreferenceGetter(this, "postPromptAnimationEnabled",
-                                      "permissions.postPrompt.animate");
+XPCOMUtils.defineLazyPreferenceGetter(
+  this,
+  "animationsEnabled",
+  "toolkit.cosmeticAnimations.enabled"
+);
+XPCOMUtils.defineLazyPreferenceGetter(
+  this,
+  "postPromptAnimationEnabled",
+  "permissions.postPrompt.animate"
+);
 
 var PermissionUI = {};
 
 /**
  * PermissionPromptPrototype should be subclassed by callers that
  * want to display prompts to the user. See each method and property
  * below for guidance on what to override.
  *
@@ -321,17 +346,19 @@ var PermissionPromptPrototype = {
    * be called just before. Subclasses may want to override this
    * in order to, for example, bump a counter Telemetry probe for
    * how often a particular permission request is seen.
    *
    * If this returns false, it cancels the process of showing the prompt.  In
    * that case, it is the responsibility of the onBeforeShow() implementation
    * to ensure that allow() or cancel() are called on the object appropriately.
    */
-  onBeforeShow() { return true; },
+  onBeforeShow() {
+    return true;
+  },
 
   /**
    * If the prompt was shown to the user, this callback will be called just
    * after it's been shown.
    */
   onShown() {},
 
   /**
@@ -354,52 +381,59 @@ var PermissionPromptPrototype = {
    */
   prompt() {
     // We ignore requests from non-nsIStandardURLs
     let requestingURI = this.principal.URI;
     if (!(requestingURI instanceof Ci.nsIStandardURL)) {
       return;
     }
 
-    if (this.usePermissionManager &&
-        this.permissionKey) {
+    if (this.usePermissionManager && this.permissionKey) {
       // If we're reading and setting permissions, then we need
       // to check to see if we already have a permission setting
       // for this particular principal.
-      let {state} = SitePermissions.getForPrincipal(this.principal,
-                                                    this.permissionKey,
-                                                    this.browser);
+      let { state } = SitePermissions.getForPrincipal(
+        this.principal,
+        this.permissionKey,
+        this.browser
+      );
 
       if (state == SitePermissions.BLOCK) {
         // If this block was done based on a global user setting, we want to show
         // a post prompt to give the user some more granular control without
         // annoying them too much.
-        if (this.postPromptEnabled &&
-            SitePermissions.getDefault(this.permissionKey) == SitePermissions.BLOCK) {
+        if (
+          this.postPromptEnabled &&
+          SitePermissions.getDefault(this.permissionKey) ==
+            SitePermissions.BLOCK
+        ) {
           this.postPrompt();
         }
         this.cancel();
         return;
       }
 
       if (state == SitePermissions.ALLOW) {
         this.allow();
         return;
       }
 
       // Tell the browser to refresh the identity block display in case there
       // are expired permission states.
-      this.browser.dispatchEvent(new this.browser.ownerGlobal
-                                         .CustomEvent("PermissionStateChange"));
+      this.browser.dispatchEvent(
+        new this.browser.ownerGlobal.CustomEvent("PermissionStateChange")
+      );
     } else if (this.permissionKey) {
       // If we're reading a permission which already has a temporary value,
       // see if we can use the temporary value.
-      let {state} = SitePermissions.get(null,
-                                        this.permissionKey,
-                                        this.browser);
+      let { state } = SitePermissions.get(
+        null,
+        this.permissionKey,
+        this.browser
+      );
 
       if (state == SitePermissions.BLOCK) {
         this.cancel();
         return;
       }
     }
 
     if (this.requiresUserInput && !this.request.isHandlingUserInput) {
@@ -424,39 +458,44 @@ var PermissionPromptPrototype = {
       let action = {
         label: promptAction.label,
         accessKey: promptAction.accessKey,
         callback: state => {
           if (promptAction.callback) {
             promptAction.callback();
           }
 
-          if (this.usePermissionManager &&
-              this.permissionKey) {
-            if ((state && state.checkboxChecked && state.source != "esc-press") ||
-                promptAction.scope == SitePermissions.SCOPE_PERSISTENT) {
+          if (this.usePermissionManager && this.permissionKey) {
+            if (
+              (state && state.checkboxChecked && state.source != "esc-press") ||
+              promptAction.scope == SitePermissions.SCOPE_PERSISTENT
+            ) {
               // Permanently store permission.
               let scope = SitePermissions.SCOPE_PERSISTENT;
               // Only remember permission for session if in PB mode.
               if (PrivateBrowsingUtils.isBrowserPrivate(this.browser)) {
                 scope = SitePermissions.SCOPE_SESSION;
               }
-              SitePermissions.setForPrincipal(this.principal,
-                                              this.permissionKey,
-                                              promptAction.action,
-                                              scope);
+              SitePermissions.setForPrincipal(
+                this.principal,
+                this.permissionKey,
+                promptAction.action,
+                scope
+              );
             } else if (promptAction.action == SitePermissions.BLOCK) {
               // Temporarily store BLOCK permissions only
               // SitePermissions does not consider subframes when storing temporary
               // permissions on a tab, thus storing ALLOW could be exploited.
-              SitePermissions.setForPrincipal(this.principal,
-                                              this.permissionKey,
-                                              promptAction.action,
-                                              SitePermissions.SCOPE_TEMPORARY,
-                                              this.browser);
+              SitePermissions.setForPrincipal(
+                this.principal,
+                this.permissionKey,
+                promptAction.action,
+                SitePermissions.SCOPE_TEMPORARY,
+                this.browser
+              );
             }
 
             // Grant permission if action is ALLOW.
             // Record buttonAction for telemetry.
             if (promptAction.action == SitePermissions.ALLOW) {
               this._buttonAction = "accept";
               this.allow();
             } else {
@@ -468,21 +507,23 @@ var PermissionPromptPrototype = {
               this.cancel();
             }
           } else if (this.permissionKey) {
             // TODO: Add support for permitTemporaryAllow
             if (promptAction.action == SitePermissions.BLOCK) {
               // Temporarily store BLOCK permissions.
               // We don't consider subframes when storing temporary
               // permissions on a tab, thus storing ALLOW could be exploited.
-              SitePermissions.set(null,
-                                  this.permissionKey,
-                                  promptAction.action,
-                                  SitePermissions.SCOPE_TEMPORARY,
-                                  this.browser);
+              SitePermissions.set(
+                null,
+                this.permissionKey,
+                promptAction.action,
+                SitePermissions.SCOPE_TEMPORARY,
+                this.browser
+              );
             }
           }
         },
       };
       if (promptAction.dismiss) {
         action.dismiss = promptAction.dismiss;
       }
 
@@ -523,29 +564,35 @@ var PermissionPromptPrototype = {
           // Since we can not reply to the original permission request anymore,
           // the page will need to listen for permission changes which are triggered
           // by permanent entries in the permission manager.
           let scope = SitePermissions.SCOPE_PERSISTENT;
           // Only remember permission for session if in PB mode.
           if (PrivateBrowsingUtils.isBrowserPrivate(browser)) {
             scope = SitePermissions.SCOPE_SESSION;
           }
-          SitePermissions.setForPrincipal(principal,
-                                          this.permissionKey,
-                                          promptAction.action,
-                                          scope);
+          SitePermissions.setForPrincipal(
+            principal,
+            this.permissionKey,
+            promptAction.action,
+            scope
+          );
         },
       };
       popupNotificationActions.push(action);
     }
 
     if (animationsEnabled && postPromptAnimationEnabled) {
       let anchor = chromeWin.document.getElementById(this.anchorID);
       // Only show the animation on the first request, not after e.g. tab switching.
-      anchor.addEventListener("animationend", () => anchor.removeAttribute("animate"), {once: true});
+      anchor.addEventListener(
+        "animationend",
+        () => anchor.removeAttribute("animate"),
+        { once: true }
+      );
       anchor.setAttribute("animate", "true");
     }
 
     this._showNotification(popupNotificationActions, true);
   },
 
   _showNotification(actions, postPrompt = false) {
     let chromeWin = this.browser.ownerGlobal;
@@ -555,19 +602,21 @@ var PermissionPromptPrototype = {
     let options = this.popupOptions;
 
     let telemetryData = null;
     if (this.request && this.permissionTelemetryKey) {
       telemetryData = {
         permissionTelemetryKey: this.permissionTelemetryKey,
         permissionKey: this.permissionKey,
         principal: this.principal,
-        documentDOMContentLoadedTimestamp: this.request.documentDOMContentLoadedTimestamp,
+        documentDOMContentLoadedTimestamp: this.request
+          .documentDOMContentLoadedTimestamp,
         isHandlingUserInput: this.request.isHandlingUserInput,
-        userHadInteractedWithDocument: this.request.userHadInteractedWithDocument,
+        userHadInteractedWithDocument: this.request
+          .userHadInteractedWithDocument,
       };
     }
 
     if (!options.hasOwnProperty("displayURI") || options.displayURI) {
       options.displayURI = this.principal.URI;
     }
 
     if (!postPrompt) {
@@ -593,39 +642,44 @@ var PermissionPromptPrototype = {
       }
       // The prompt has been removed, notify the PermissionUI.
       // onAfterShow() is currently not called for post-prompts,
       // because there is no prompt that would make use of this.
       // You can remove this restriction if you need it, but be
       // mindful of other consumers.
       if (topic == "removed" && !postPrompt) {
         if (telemetryData) {
-          PermissionUITelemetry.onRemoved(telemetryData, this._buttonAction,
-                                          nextRemovalReason);
+          PermissionUITelemetry.onRemoved(
+            telemetryData,
+            this._buttonAction,
+            nextRemovalReason
+          );
         }
         this.onAfterShow();
       }
       return false;
     };
 
     // Post-prompts show up as dismissed.
     options.dismissed = postPrompt;
 
     // onBeforeShow() is currently not called for post-prompts,
     // because there is no prompt that would make use of this.
     // You can remove this restriction if you need it, but be
     // mindful of other consumers.
     if (postPrompt || this.onBeforeShow() !== false) {
-      chromeWin.PopupNotifications.show(this.browser,
-                                        this.notificationID,
-                                        this.message,
-                                        this.anchorID,
-                                        mainAction,
-                                        secondaryActions,
-                                        options);
+      chromeWin.PopupNotifications.show(
+        this.browser,
+        this.notificationID,
+        this.message,
+        this.anchorID,
+        mainAction,
+        secondaryActions,
+        options
+      );
       if (telemetryData) {
         PermissionUITelemetry.onShow(telemetryData);
       }
     }
   },
 };
 
 PermissionUI.PermissionPromptPrototype = PermissionPromptPrototype;
@@ -659,18 +713,17 @@ var PermissionPromptForRequestPrototype 
     this.request.cancel();
   },
 
   allow(choices) {
     this.request.allow(choices);
   },
 };
 
-PermissionUI.PermissionPromptForRequestPrototype =
-  PermissionPromptForRequestPrototype;
+PermissionUI.PermissionPromptForRequestPrototype = PermissionPromptForRequestPrototype;
 
 /**
  * Creates a PermissionPrompt for a nsIContentPermissionRequest for
  * the GeoLocation API.
  *
  * @param request (nsIContentPermissionRequest)
  *        The request for a permission from content.
  */
@@ -702,17 +755,19 @@ GeolocationPermissionPrompt.prototype = 
     } else {
       // Don't offer "always remember" action in PB mode
       options.checkbox = {
         show: !PrivateBrowsingUtils.isWindowPrivate(this.browser.ownerGlobal),
       };
     }
 
     if (options.checkbox.show) {
-      options.checkbox.label = gBrowserBundle.GetStringFromName("geolocation.remember");
+      options.checkbox.label = gBrowserBundle.GetStringFromName(
+        "geolocation.remember"
+      );
     }
 
     return options;
   },
 
   get notificationID() {
     return "geolocation";
   },
@@ -721,53 +776,66 @@ GeolocationPermissionPrompt.prototype = 
     return "geo-notification-icon";
   },
 
   get message() {
     if (this.principal.URI.schemeIs("file")) {
       return gBrowserBundle.GetStringFromName("geolocation.shareWithFile3");
     }
 
-    return gBrowserBundle.formatStringFromName("geolocation.shareWithSite3",
-                                               ["<>"]);
+    return gBrowserBundle.formatStringFromName("geolocation.shareWithSite3", [
+      "<>",
+    ]);
   },
 
   get promptActions() {
-    return [{
-      label: gBrowserBundle.GetStringFromName("geolocation.allowLocation"),
-      accessKey:
-        gBrowserBundle.GetStringFromName("geolocation.allowLocation.accesskey"),
-      action: SitePermissions.ALLOW,
-    }, {
-      label: gBrowserBundle.GetStringFromName("geolocation.dontAllowLocation"),
-      accessKey:
-        gBrowserBundle.GetStringFromName("geolocation.dontAllowLocation.accesskey"),
-      action: SitePermissions.BLOCK,
-    }];
+    return [
+      {
+        label: gBrowserBundle.GetStringFromName("geolocation.allowLocation"),
+        accessKey: gBrowserBundle.GetStringFromName(
+          "geolocation.allowLocation.accesskey"
+        ),
+        action: SitePermissions.ALLOW,
+      },
+      {
+        label: gBrowserBundle.GetStringFromName(
+          "geolocation.dontAllowLocation"
+        ),
+        accessKey: gBrowserBundle.GetStringFromName(
+          "geolocation.dontAllowLocation.accesskey"
+        ),
+        action: SitePermissions.BLOCK,
+      },
+    ];
   },
-
 };
 
 PermissionUI.GeolocationPermissionPrompt = GeolocationPermissionPrompt;
 
 /**
  * Creates a PermissionPrompt for a nsIContentPermissionRequest for
  * the Desktop Notification API.
  *
  * @param request (nsIContentPermissionRequest)
  *        The request for a permission from content.
  * @return {PermissionPrompt} (see documentation in header)
  */
 function DesktopNotificationPermissionPrompt(request) {
   this.request = request;
 
-  XPCOMUtils.defineLazyPreferenceGetter(this, "requiresUserInput",
-                                        "dom.webnotifications.requireuserinteraction");
-  XPCOMUtils.defineLazyPreferenceGetter(this, "postPromptEnabled",
-                                        "permissions.desktop-notification.postPrompt.enabled");
+  XPCOMUtils.defineLazyPreferenceGetter(
+    this,
+    "requiresUserInput",
+    "dom.webnotifications.requireuserinteraction"
+  );
+  XPCOMUtils.defineLazyPreferenceGetter(
+    this,
+    "postPromptEnabled",
+    "permissions.desktop-notification.postPrompt.enabled"
+  );
 }
 
 DesktopNotificationPermissionPrompt.prototype = {
   __proto__: PermissionPromptForRequestPrototype,
 
   get permissionKey() {
     return "desktop-notification";
   },
@@ -791,68 +859,74 @@ DesktopNotificationPermissionPrompt.prot
     return "web-notifications";
   },
 
   get anchorID() {
     return "web-notifications-notification-icon";
   },
 
   get message() {
-    return gBrowserBundle.formatStringFromName("webNotifications.receiveFromSite2",
-                                                    ["<>"]);
+    return gBrowserBundle.formatStringFromName(
+      "webNotifications.receiveFromSite2",
+      ["<>"]
+    );
   },
 
   get promptActions() {
     let actions = [
       {
         label: gBrowserBundle.GetStringFromName("webNotifications.allow"),
-        accessKey:
-          gBrowserBundle.GetStringFromName("webNotifications.allow.accesskey"),
+        accessKey: gBrowserBundle.GetStringFromName(
+          "webNotifications.allow.accesskey"
+        ),
         action: SitePermissions.ALLOW,
         scope: SitePermissions.SCOPE_PERSISTENT,
       },
       {
         label: gBrowserBundle.GetStringFromName("webNotifications.notNow"),
-        accessKey:
-          gBrowserBundle.GetStringFromName("webNotifications.notNow.accesskey"),
+        accessKey: gBrowserBundle.GetStringFromName(
+          "webNotifications.notNow.accesskey"
+        ),
         action: SitePermissions.BLOCK,
       },
     ];
     if (!PrivateBrowsingUtils.isBrowserPrivate(this.browser)) {
       actions.push({
         label: gBrowserBundle.GetStringFromName("webNotifications.never"),
-        accessKey:
-          gBrowserBundle.GetStringFromName("webNotifications.never.accesskey"),
+        accessKey: gBrowserBundle.GetStringFromName(
+          "webNotifications.never.accesskey"
+        ),
         action: SitePermissions.BLOCK,
         scope: SitePermissions.SCOPE_PERSISTENT,
       });
     }
     return actions;
   },
 
   get postPromptActions() {
     return [
       {
         label: gBrowserBundle.GetStringFromName("webNotifications.allow"),
-        accessKey:
-          gBrowserBundle.GetStringFromName("webNotifications.allow.accesskey"),
+        accessKey: gBrowserBundle.GetStringFromName(
+          "webNotifications.allow.accesskey"
+        ),
         action: SitePermissions.ALLOW,
       },
       {
         label: gBrowserBundle.GetStringFromName("webNotifications.never"),
-        accessKey:
-          gBrowserBundle.GetStringFromName("webNotifications.never.accesskey"),
+        accessKey: gBrowserBundle.GetStringFromName(
+          "webNotifications.never.accesskey"
+        ),
         action: SitePermissions.BLOCK,
       },
     ];
   },
 };
 
-PermissionUI.DesktopNotificationPermissionPrompt =
-  DesktopNotificationPermissionPrompt;
+PermissionUI.DesktopNotificationPermissionPrompt = DesktopNotificationPermissionPrompt;
 
 /**
  * Creates a PermissionPrompt for a nsIContentPermissionRequest for
  * the persistent-storage API.
  *
  * @param request (nsIContentPermissionRequest)
  *        The request for a permission from content.
  */
@@ -864,56 +938,66 @@ PersistentStoragePermissionPrompt.protot
   __proto__: PermissionPromptForRequestPrototype,
 
   get permissionKey() {
     return "persistent-storage";
   },
 
   get popupOptions() {
     let learnMoreURL =
-      Services.urlFormatter.formatURLPref("app.support.baseURL") + "storage-permissions";
+      Services.urlFormatter.formatURLPref("app.support.baseURL") +
+      "storage-permissions";
     return {
       learnMoreURL,
       displayURI: false,
       name: this.principalName,
     };
   },
 
   get notificationID() {
     return "persistent-storage";
   },
 
   get anchorID() {
     return "persistent-storage-notification-icon";
   },
 
   get message() {
-    return gBrowserBundle.formatStringFromName("persistentStorage.allowWithSite",
-                                                    ["<>"]);
+    return gBrowserBundle.formatStringFromName(
+      "persistentStorage.allowWithSite",
+      ["<>"]
+    );
   },
 
   get promptActions() {
     return [
       {
         label: gBrowserBundle.GetStringFromName("persistentStorage.allow"),
-        accessKey:
-          gBrowserBundle.GetStringFromName("persistentStorage.allow.accesskey"),
+        accessKey: gBrowserBundle.GetStringFromName(
+          "persistentStorage.allow.accesskey"
+        ),
         action: Ci.nsIPermissionManager.ALLOW_ACTION,
         scope: SitePermissions.SCOPE_PERSISTENT,
       },
       {
-        label: gBrowserBundle.GetStringFromName("persistentStorage.notNow.label"),
-        accessKey:
-          gBrowserBundle.GetStringFromName("persistentStorage.notNow.accesskey"),
+        label: gBrowserBundle.GetStringFromName(
+          "persistentStorage.notNow.label"
+        ),
+        accessKey: gBrowserBundle.GetStringFromName(
+          "persistentStorage.notNow.accesskey"
+        ),
         action: Ci.nsIPermissionManager.DENY_ACTION,
       },
       {
-        label: gBrowserBundle.GetStringFromName("persistentStorage.neverAllow.label"),
-        accessKey:
-          gBrowserBundle.GetStringFromName("persistentStorage.neverAllow.accesskey"),
+        label: gBrowserBundle.GetStringFromName(
+          "persistentStorage.neverAllow.label"
+        ),
+        accessKey: gBrowserBundle.GetStringFromName(
+          "persistentStorage.neverAllow.accesskey"
+        ),
         action: SitePermissions.BLOCK,
         scope: SitePermissions.SCOPE_PERSISTENT,
       },
     ];
   },
 };
 
 PermissionUI.PersistentStoragePermissionPrompt = PersistentStoragePermissionPrompt;
@@ -924,18 +1008,19 @@ PermissionUI.PersistentStoragePermission
  *
  * @param request (nsIContentPermissionRequest)
  *        The request for a permission from content.
  */
 function MIDIPermissionPrompt(request) {
   this.request = request;
   let types = request.types.QueryInterface(Ci.nsIArray);
   let perm = types.queryElementAt(0, Ci.nsIContentPermissionType);
-  this.isSysexPerm = (perm.options.length > 0 &&
-                      perm.options.queryElementAt(0, Ci.nsISupportsString) == "sysex");
+  this.isSysexPerm =
+    perm.options.length > 0 &&
+    perm.options.queryElementAt(0, Ci.nsISupportsString) == "sysex";
   this.permName = "midi";
   if (this.isSysexPerm) {
     this.permName = "midi-sysex";
   }
 }
 
 MIDIPermissionPrompt.prototype = {
   __proto__: PermissionPromptForRequestPrototype,
@@ -956,17 +1041,19 @@ MIDIPermissionPrompt.prototype = {
     } else {
       // Don't offer "always remember" action in PB mode
       options.checkbox = {
         show: !PrivateBrowsingUtils.isWindowPrivate(this.browser.ownerGlobal),
       };
     }
 
     if (options.checkbox.show) {
-      options.checkbox.label = gBrowserBundle.GetStringFromName("midi.remember");
+      options.checkbox.label = gBrowserBundle.GetStringFromName(
+        "midi.remember"
+      );
     }
 
     return options;
   },
 
   get notificationID() {
     return "midi";
   },
@@ -974,53 +1061,69 @@ MIDIPermissionPrompt.prototype = {
   get anchorID() {
     return "midi-notification-icon";
   },
 
   get message() {
     let message;
     if (this.principal.URI.schemeIs("file")) {
       if (this.isSysexPerm) {
-        message = gBrowserBundle.formatStringFromName("midi.shareSysexWithFile.message");
+        message = gBrowserBundle.formatStringFromName(
+          "midi.shareSysexWithFile.message"
+        );
       } else {
-        message = gBrowserBundle.formatStringFromName("midi.shareWithFile.message");
+        message = gBrowserBundle.formatStringFromName(
+          "midi.shareWithFile.message"
+        );
       }
     } else if (this.isSysexPerm) {
-      message = gBrowserBundle.formatStringFromName("midi.shareSysexWithSite.message",
-                                                    ["<>"]);
+      message = gBrowserBundle.formatStringFromName(
+        "midi.shareSysexWithSite.message",
+        ["<>"]
+      );
     } else {
-      message = gBrowserBundle.formatStringFromName("midi.shareWithSite.message",
-                                                    ["<>"]);
+      message = gBrowserBundle.formatStringFromName(
+        "midi.shareWithSite.message",
+        ["<>"]
+      );
     }
     return message;
   },
 
   get promptActions() {
-    return [{
+    return [
+      {
         label: gBrowserBundle.GetStringFromName("midi.Allow.label"),
         accessKey: gBrowserBundle.GetStringFromName("midi.Allow.accesskey"),
         action: Ci.nsIPermissionManager.ALLOW_ACTION,
       },
       {
         label: gBrowserBundle.GetStringFromName("midi.DontAllow.label"),
         accessKey: gBrowserBundle.GetStringFromName("midi.DontAllow.accesskey"),
         action: Ci.nsIPermissionManager.DENY_ACTION,
-    }];
+      },
+    ];
   },
 };
 
 PermissionUI.MIDIPermissionPrompt = MIDIPermissionPrompt;
 
 function StorageAccessPermissionPrompt(request) {
   this.request = request;
 
-  XPCOMUtils.defineLazyPreferenceGetter(this, "_autoGrants",
-                                        "dom.storage_access.auto_grants");
-  XPCOMUtils.defineLazyPreferenceGetter(this, "_maxConcurrentAutoGrants",
-                                        "dom.storage_access.max_concurrent_auto_grants");
+  XPCOMUtils.defineLazyPreferenceGetter(
+    this,
+    "_autoGrants",
+    "dom.storage_access.auto_grants"
+  );
+  XPCOMUtils.defineLazyPreferenceGetter(
+    this,
+    "_maxConcurrentAutoGrants",
+    "dom.storage_access.max_concurrent_auto_grants"
+  );
 }
 
 StorageAccessPermissionPrompt.prototype = {
   __proto__: PermissionPromptForRequestPrototype,
 
   get usePermissionManager() {
     return false;
   },
@@ -1049,127 +1152,156 @@ StorageAccessPermissionPrompt.prototype 
       name: this.prettifyHostPort(this.principal.URI),
       secondName: this.prettifyHostPort(this.topLevelPrincipal.URI),
       escAction: "buttoncommand",
     };
   },
 
   onShown() {
     let document = this.browser.ownerDocument;
-    let label =
-      gBrowserBundle.formatStringFromName("storageAccess.description.label",
-                                          [this.prettifyHostPort(this.request.principal.URI), "<>"]);
+    let label = gBrowserBundle.formatStringFromName(
+      "storageAccess.description.label",
+      [this.prettifyHostPort(this.request.principal.URI), "<>"]
+    );
     let parts = label.split("<>");
     if (parts.length == 1) {
       parts.push("");
     }
     let map = {
       "storage-access-perm-label": parts[0],
-      "storage-access-perm-learnmore":
-        gBrowserBundle.GetStringFromName("storageAccess.description.learnmore"),
+      "storage-access-perm-learnmore": gBrowserBundle.GetStringFromName(
+        "storageAccess.description.learnmore"
+      ),
       "storage-access-perm-endlabel": parts[1],
     };
     for (let id in map) {
       let str = map[id];
       document.getElementById(id).textContent = str;
     }
     let learnMoreURL =
-      Services.urlFormatter.formatURLPref("app.support.baseURL") + "third-party-cookies";
-    document.getElementById("storage-access-perm-learnmore")
-            .href = learnMoreURL;
+      Services.urlFormatter.formatURLPref("app.support.baseURL") +
+      "third-party-cookies";
+    document.getElementById(
+      "storage-access-perm-learnmore"
+    ).href = learnMoreURL;
   },
 
   get notificationID() {
     return "storage-access";
   },
 
   get anchorID() {
     return "storage-access-notification-icon";
   },
 
   get message() {
-    return gBrowserBundle.formatStringFromName("storageAccess.message", ["<>", "<>"]);
+    return gBrowserBundle.formatStringFromName("storageAccess.message", [
+      "<>",
+      "<>",
+    ]);
   },
 
   get promptActions() {
     let self = this;
 
-    let storageAccessHistogram = Services.telemetry.getHistogramById("STORAGE_ACCESS_API_UI");
+    let storageAccessHistogram = Services.telemetry.getHistogramById(
+      "STORAGE_ACCESS_API_UI"
+    );
 
-    return [{
-        label: gBrowserBundle.GetStringFromName("storageAccess.DontAllow.label"),
-        accessKey: gBrowserBundle.GetStringFromName("storageAccess.DontAllow.accesskey"),
+    return [
+      {
+        label: gBrowserBundle.GetStringFromName(
+          "storageAccess.DontAllow.label"
+        ),
+        accessKey: gBrowserBundle.GetStringFromName(
+          "storageAccess.DontAllow.accesskey"
+        ),
         action: Ci.nsIPermissionManager.DENY_ACTION,
         callback(state) {
           storageAccessHistogram.add("Deny");
           self.cancel();
         },
       },
       {
         label: gBrowserBundle.GetStringFromName("storageAccess.Allow.label"),
-        accessKey: gBrowserBundle.GetStringFromName("storageAccess.Allow.accesskey"),
+        accessKey: gBrowserBundle.GetStringFromName(
+          "storageAccess.Allow.accesskey"
+        ),
         action: Ci.nsIPermissionManager.ALLOW_ACTION,
         callback(state) {
           storageAccessHistogram.add("Allow");
-          self.allow({"storage-access": "allow"});
+          self.allow({ "storage-access": "allow" });
         },
       },
       {
-        label: gBrowserBundle.GetStringFromName("storageAccess.AllowOnAnySite.label"),
-        accessKey: gBrowserBundle.GetStringFromName("storageAccess.AllowOnAnySite.accesskey"),
+        label: gBrowserBundle.GetStringFromName(
+          "storageAccess.AllowOnAnySite.label"
+        ),
+        accessKey: gBrowserBundle.GetStringFromName(
+          "storageAccess.AllowOnAnySite.accesskey"
+        ),
         action: Ci.nsIPermissionManager.ALLOW_ACTION,
         callback(state) {
           storageAccessHistogram.add("AllowOnAnySite");
-          self.allow({"storage-access": "allow-on-any-site"});
+          self.allow({ "storage-access": "allow-on-any-site" });
         },
-    }];
+      },
+    ];
   },
 
   get topLevelPrincipal() {
     return this.request.topLevelPrincipal;
   },
 
   get maxConcurrentAutomaticGrants() {
     // one percent of the number of top-levels origins visited in the current
     // session (but not to exceed 24 hours), or the value of the
     // dom.storage_access.max_concurrent_auto_grants preference, whichever is
     // higher.
-    return Math.max(Math.max(Math.floor(URICountListener.uniqueDomainsVisitedInPast24Hours / 100),
-                             this._maxConcurrentAutoGrants), 0);
+    return Math.max(
+      Math.max(
+        Math.floor(URICountListener.uniqueDomainsVisitedInPast24Hours / 100),
+        this._maxConcurrentAutoGrants
+      ),
+      0
+    );
   },
 
   getOriginsThirdPartyHasAccessTo(thirdPartyOrigin) {
     let prefix = `3rdPartyStorage^${thirdPartyOrigin}`;
     let perms = Services.perms.getAllWithTypePrefix(prefix);
     let origins = new Set();
     while (perms.length) {
       let perm = perms.shift();
       // Let's make sure that we're not looking at a permission for
       // https://exampletracker.company when we mean to look for the
       // permisison for https://exampletracker.com!
-      if (perm.type != prefix &&
-          !perm.type.startsWith(`${prefix}^`)) {
+      if (perm.type != prefix && !perm.type.startsWith(`${prefix}^`)) {
         continue;
       }
       origins.add(perm.principal.origin);
     }
     return origins.size;
   },
 
   onBeforeShow() {
-    let storageAccessHistogram = Services.telemetry.getHistogramById("STORAGE_ACCESS_API_UI");
+    let storageAccessHistogram = Services.telemetry.getHistogramById(
+      "STORAGE_ACCESS_API_UI"
+    );
 
     storageAccessHistogram.add("Request");
 
     let thirdPartyOrigin = this.request.principal.origin;
-    if (this._autoGrants &&
-        this.getOriginsThirdPartyHasAccessTo(thirdPartyOrigin) <
-          this.maxConcurrentAutomaticGrants) {
+    if (
+      this._autoGrants &&
+      this.getOriginsThirdPartyHasAccessTo(thirdPartyOrigin) <
+        this.maxConcurrentAutomaticGrants
+    ) {
       // Automatically accept the prompt
-      this.allow({"storage-access": "allow-auto-grant"});
+      this.allow({ "storage-access": "allow-auto-grant" });
 
       storageAccessHistogram.add("AllowAutomatically");
 
       return false;
     }
     return true;
   },
 };
--- a/browser/modules/PermissionUITelemetry.jsm
+++ b/browser/modules/PermissionUITelemetry.jsm
@@ -1,52 +1,62 @@
 /* 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/. */
 
 "use strict";
 
-var EXPORTED_SYMBOLS = [
-  "PermissionUITelemetry",
-];
+var EXPORTED_SYMBOLS = ["PermissionUITelemetry"];
 
-ChromeUtils.defineModuleGetter(this, "Services",
-  "resource://gre/modules/Services.jsm");
-ChromeUtils.defineModuleGetter(this, "CryptoUtils",
-  "resource://services-crypto/utils.js");
+ChromeUtils.defineModuleGetter(
+  this,
+  "Services",
+  "resource://gre/modules/Services.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "CryptoUtils",
+  "resource://services-crypto/utils.js"
+);
 
 const TELEMETRY_STAT_REMOVAL_LEAVE_PAGE = 6;
 
 var PermissionUITelemetry = {
   // Returns a hash of the host name in combination with a unique local user id.
   // This allows us to track duplicate prompts on sites while not revealing the user's
   // browsing history.
   _uniqueHostHash(host) {
     // Gets a unique user ID as salt, that needs to stay local to this profile and not be
     // sent to any server!
-    let salt = Services.prefs.getStringPref("permissions.eventTelemetry.salt", null);
+    let salt = Services.prefs.getStringPref(
+      "permissions.eventTelemetry.salt",
+      null
+    );
     if (!salt) {
-      salt = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator)
-               .generateUUID().toString();
+      salt = Cc["@mozilla.org/uuid-generator;1"]
+        .getService(Ci.nsIUUIDGenerator)
+        .generateUUID()
+        .toString();
       Services.prefs.setStringPref("permissions.eventTelemetry.salt", salt);
     }
 
     let domain;
     try {
       domain = Services.eTLD.getBaseDomainFromHost(host);
     } catch (e) {
       domain = host;
     }
 
     return CryptoUtils.sha256(domain + salt);
   },
 
   _previousVisitCount(host) {
-    let historyService = Cc["@mozilla.org/browser/nav-history-service;1"]
-                           .getService(Ci.nsINavHistoryService);
+    let historyService = Cc[
+      "@mozilla.org/browser/nav-history-service;1"
+    ].getService(Ci.nsINavHistoryService);
 
     let options = historyService.getNewQueryOptions();
     options.resultType = options.RESULTS_AS_VISIT;
 
     // Search for visits to this host before today
     let query = historyService.getNewQuery();
     query.endTimeReference = query.TIME_RELATIVE_TODAY;
     query.endTime = 0;
@@ -59,27 +69,36 @@ var PermissionUITelemetry = {
     return cc;
   },
 
   _collectExtraKeys(prompt) {
     let lastInteraction = 0;
     // "storageAccessAPI" is the name of the permission that tells us whether the
     // user has interacted with a particular site in the first-party context before.
     let interactionPermission = Services.perms.getPermissionObject(
-      prompt.principal, "storageAccessAPI", false);
+      prompt.principal,
+      "storageAccessAPI",
+      false
+    );
     if (interactionPermission) {
       lastInteraction = interactionPermission.modificationTime;
     }
 
     let allPermsDenied = 0;
     let allPermsGranted = 0;
     let thisPermDenied = 0;
     let thisPermGranted = 0;
 
-    let commonPermissions = ["geo", "desktop-notification", "camera", "microphone", "screen"];
+    let commonPermissions = [
+      "geo",
+      "desktop-notification",
+      "camera",
+      "microphone",
+      "screen",
+    ];
     for (let perm of Services.perms.enumerator) {
       if (!commonPermissions.includes(perm.type)) {
         continue;
       }
 
       if (perm.capability == Services.perms.ALLOW_ACTION) {
         allPermsGranted++;
         if (perm.type == prompt.permissionKey) {
@@ -94,17 +113,19 @@ var PermissionUITelemetry = {
         }
       }
     }
 
     let promptHost = prompt.principal.URI.host;
 
     return {
       previousVisits: this._previousVisitCount(promptHost).toString(),
-      timeOnPage: (Date.now() - prompt.documentDOMContentLoadedTimestamp).toString(),
+      timeOnPage: (
+        Date.now() - prompt.documentDOMContentLoadedTimestamp
+      ).toString(),
       hasUserInput: prompt.isHandlingUserInput.toString(),
       docHasUserInput: prompt.userHadInteractedWithDocument.toString(),
       lastInteraction: lastInteraction.toString(),
       allPermsDenied: allPermsDenied.toString(),
       allPermsGranted: allPermsGranted.toString(),
       thisPermDenied: thisPermDenied.toString(),
       thisPermGranted: thisPermGranted.toString(),
     };
@@ -113,18 +134,23 @@ var PermissionUITelemetry = {
   onShow(prompt) {
     let object = prompt.permissionTelemetryKey;
     if (!object) {
       return;
     }
 
     let extraKeys = this._collectExtraKeys(prompt);
     let hostHash = this._uniqueHostHash(prompt.principal.URI.host);
-    Services.telemetry.recordEvent("security.ui.permissionprompt",
-      "show", object, hostHash, extraKeys);
+    Services.telemetry.recordEvent(
+      "security.ui.permissionprompt",
+      "show",
+      object,
+      hostHash,
+      extraKeys
+    );
   },
 
   onRemoved(prompt, buttonAction, telemetryReason) {
     let object = prompt.permissionTelemetryKey;
     if (!object) {
       return;
     }
 
@@ -136,12 +162,17 @@ var PermissionUITelemetry = {
     } else if (buttonAction == "never") {
       method = "never";
     } else if (telemetryReason == TELEMETRY_STAT_REMOVAL_LEAVE_PAGE) {
       method = "leave";
     }
 
     let extraKeys = this._collectExtraKeys(prompt);
     let hostHash = this._uniqueHostHash(prompt.principal.URI.host);
-    Services.telemetry.recordEvent("security.ui.permissionprompt",
-      method, object, hostHash, extraKeys);
+    Services.telemetry.recordEvent(
+      "security.ui.permissionprompt",
+      method,
+      object,
+      hostHash,
+      extraKeys
+    );
   },
 };
--- a/browser/modules/PingCentre.jsm
+++ b/browser/modules/PingCentre.jsm
@@ -1,50 +1,186 @@
 /* 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/. */
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 XPCOMUtils.defineLazyGlobalGetters(this, ["fetch"]);
 
-ChromeUtils.defineModuleGetter(this, "AppConstants",
-  "resource://gre/modules/AppConstants.jsm");
-ChromeUtils.defineModuleGetter(this, "UpdateUtils",
-  "resource://gre/modules/UpdateUtils.jsm");
-ChromeUtils.defineModuleGetter(this, "ClientID",
-  "resource://gre/modules/ClientID.jsm");
-ChromeUtils.defineModuleGetter(this, "TelemetryEnvironment",
-  "resource://gre/modules/TelemetryEnvironment.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "AppConstants",
+  "resource://gre/modules/AppConstants.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "UpdateUtils",
+  "resource://gre/modules/UpdateUtils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "ClientID",
+  "resource://gre/modules/ClientID.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "TelemetryEnvironment",
+  "resource://gre/modules/TelemetryEnvironment.jsm"
+);
 
 const PREF_BRANCH = "browser.ping-centre.";
 
 const TELEMETRY_PREF = `${PREF_BRANCH}telemetry`;
 const LOGGING_PREF = `${PREF_BRANCH}log`;
 const PRODUCTION_ENDPOINT_PREF = `${PREF_BRANCH}production.endpoint`;
 
 const FHR_UPLOAD_ENABLED_PREF = "datareporting.healthreport.uploadEnabled";
 const BROWSER_SEARCH_REGION_PREF = "browser.search.region";
 
 // Only report region for following regions, to ensure that users in countries
 // with small user population (less than 10000) cannot be uniquely identified.
 // See bug 1421422 for more details.
 const REGION_WHITELIST = new Set([
-  "AE", "AF", "AL", "AM", "AR", "AT", "AU", "AZ", "BA", "BD", "BE", "BF",
-  "BG", "BJ", "BO", "BR", "BY", "CA", "CH", "CI", "CL", "CM", "CN", "CO",
-  "CR", "CU", "CY", "CZ", "DE", "DK", "DO", "DZ", "EC", "EE", "EG", "ES",
-  "ET", "FI", "FR", "GB", "GE", "GH", "GP", "GR", "GT", "HK", "HN", "HR",
-  "HU", "ID", "IE", "IL", "IN", "IQ", "IR", "IS", "IT", "JM", "JO", "JP",
-  "KE", "KH", "KR", "KW", "KZ", "LB", "LK", "LT", "LU", "LV", "LY", "MA",
-  "MD", "ME", "MG", "MK", "ML", "MM", "MN", "MQ", "MT", "MU", "MX", "MY",
-  "MZ", "NC", "NG", "NI", "NL", "NO", "NP", "NZ", "OM", "PA", "PE", "PH",
-  "PK", "PL", "PR", "PS", "PT", "PY", "QA", "RE", "RO", "RS", "RU", "RW",
-  "SA", "SD", "SE", "SG", "SI", "SK", "SN", "SV", "SY", "TG", "TH", "TN",
-  "TR", "TT", "TW", "TZ", "UA", "UG", "US", "UY", "UZ", "VE", "VN", "ZA",
-  "ZM", "ZW",
+  "AE",
+  "AF",
+  "AL",
+  "AM",
+  "AR",
+  "AT",
+  "AU",
+  "AZ",
+  "BA",
+  "BD",
+  "BE",
+  "BF",
+  "BG",
+  "BJ",
+  "BO",
+  "BR",
+  "BY",
+  "CA",
+  "CH",
+  "CI",
+  "CL",
+  "CM",
+  "CN",
+  "CO",
+  "CR",
+  "CU",
+  "CY",
+  "CZ",
+  "DE",
+  "DK",
+  "DO",
+  "DZ",
+  "EC",
+  "EE",
+  "EG",
+  "ES",
+  "ET",
+  "FI",
+  "FR",
+  "GB",
+  "GE",
+  "GH",
+  "GP",
+  "GR",
+  "GT",
+  "HK",
+  "HN",
+  "HR",
+  "HU",
+  "ID",
+  "IE",
+  "IL",
+  "IN",
+  "IQ",
+  "IR",
+  "IS",
+  "IT",
+  "JM",
+  "JO",
+  "JP",
+  "KE",
+  "KH",
+  "KR",
+  "KW",
+  "KZ",
+  "LB",
+  "LK",
+  "LT",
+  "LU",
+  "LV",
+  "LY",
+  "MA",
+  "MD",
+  "ME",
+  "MG",
+  "MK",
+  "ML",
+  "MM",
+  "MN",
+  "MQ",
+  "MT",
+  "MU",
+  "MX",
+  "MY",
+  "MZ",
+  "NC",
+  "NG",
+  "NI",
+  "NL",
+  "NO",
+  "NP",
+  "NZ",
+  "OM",
+  "PA",
+  "PE",
+  "PH",
+  "PK",
+  "PL",
+  "PR",
+  "PS",
+  "PT",
+  "PY",
+  "QA",
+  "RE",
+  "RO",
+  "RS",
+  "RU",
+  "RW",
+  "SA",
+  "SD",
+  "SE",
+  "SG",
+  "SI",
+  "SK",
+  "SN",
+  "SV",
+  "SY",
+  "TG",
+  "TH",
+  "TN",
+  "TR",
+  "TT",
+  "TW",
+  "TZ",
+  "UA",
+  "UG",
+  "US",
+  "UY",
+  "UZ",
+  "VE",
+  "VN",
+  "ZA",
+  "ZM",
+  "ZW",
 ]);
 
 /**
  * Observe various notifications and send them to a telemetry endpoint.
  *
  * @param {Object} options
  * @param {string} options.topic - a unique ID for users of PingCentre to distinguish
  *                  their data on the server side.
@@ -73,27 +209,29 @@ class PingCentre {
     this._onLoggingPrefChange = this._onLoggingPrefChange.bind(this);
     this._prefs.addObserver(LOGGING_PREF, this._onLoggingPrefChange);
   }
 
   /**
    * Lazily get the Telemetry id promise
    */
   get telemetryClientId() {
-    Object.defineProperty(this, "telemetryClientId", {value: ClientID.getClientID()});
+    Object.defineProperty(this, "telemetryClientId", {
+      value: ClientID.getClientID(),
+    });
     return this.telemetryClientId;
   }
 
   get enabled() {
     return this._enabled && this._fhrEnabled;
   }
 
   _setPingEndpoint(topic, overrideEndpointPref) {
-    const overrideValue = overrideEndpointPref &&
-      this._prefs.getStringPref(overrideEndpointPref);
+    const overrideValue =
+      overrideEndpointPref && this._prefs.getStringPref(overrideEndpointPref);
     if (overrideValue) {
       this._pingEndpoint = overrideValue;
     } else {
       this._pingEndpoint = this._prefs.getStringPref(PRODUCTION_ENDPOINT_PREF);
     }
   }
 
   _onLoggingPrefChange(aSubject, aTopic, prefKey) {
@@ -106,22 +244,26 @@ class PingCentre {
 
   _onFhrPrefChange(aSubject, aTopic, prefKey) {
     this._fhrEnabled = this._prefs.getBoolPref(prefKey);
   }
 
   _createExperimentsString(activeExperiments, filter) {
     let experimentsString = "";
     for (let experimentID in activeExperiments) {
-      if (!activeExperiments[experimentID] ||
-          !activeExperiments[experimentID].branch ||
-          (filter && !experimentID.includes(filter))) {
+      if (
+        !activeExperiments[experimentID] ||
+        !activeExperiments[experimentID].branch ||
+        (filter && !experimentID.includes(filter))
+      ) {
         continue;
       }
-      let expString = `${experimentID}:${activeExperiments[experimentID].branch}`;
+      let expString = `${experimentID}:${
+        activeExperiments[experimentID].branch
+      }`;
       experimentsString = experimentsString.concat(`${expString};`);
     }
     return experimentsString;
   }
 
   _getRegion() {
     let region = "UNSET";
 
@@ -136,51 +278,58 @@ class PingCentre {
     return region;
   }
 
   async _createPing(data, options) {
     let filter = options && options.filter;
     let experiments = TelemetryEnvironment.getActiveExperiments();
     let experimentsString = this._createExperimentsString(experiments, filter);
 
-    let clientID = data.client_id || await this.telemetryClientId;
+    let clientID = data.client_id || (await this.telemetryClientId);
     let locale = data.locale || Services.locale.appLocaleAsLangTag;
-    let profileCreationDate = TelemetryEnvironment.currentEnvironment.profile.resetDate ||
+    let profileCreationDate =
+      TelemetryEnvironment.currentEnvironment.profile.resetDate ||
       TelemetryEnvironment.currentEnvironment.profile.creationDate;
-    const payload = Object.assign({
-      locale,
-      topic: this._topic,
-      client_id: clientID,
-      version: AppConstants.MOZ_APP_VERSION,
-      release_channel: UpdateUtils.getUpdateChannel(false),
-    }, data);
+    const payload = Object.assign(
+      {
+        locale,
+        topic: this._topic,
+        client_id: clientID,
+        version: AppConstants.MOZ_APP_VERSION,
+        release_channel: UpdateUtils.getUpdateChannel(false),
+      },
+      data
+    );
     if (experimentsString) {
       payload.shield_id = experimentsString;
     }
     if (profileCreationDate) {
       payload.profile_creation_date = profileCreationDate;
     }
     payload.region = this._getRegion();
 
     return payload;
   }
 
   async _createStructuredIngestionPing(data, options) {
     let filter = options && options.filter;
     let experiments = TelemetryEnvironment.getActiveExperiments();
     let experimentsString = this._createExperimentsString(experiments, filter);
 
-    let clientID = data.client_id || await this.telemetryClientId;
+    let clientID = data.client_id || (await this.telemetryClientId);
     let locale = data.locale || Services.locale.appLocaleAsLangTag;
-    const payload = Object.assign({
-      locale,
-      client_id: clientID,
-      version: AppConstants.MOZ_APP_VERSION,
-      release_channel: UpdateUtils.getUpdateChannel(false),
-    }, data);
+    const payload = Object.assign(
+      {
+        locale,
+        client_id: clientID,
+        version: AppConstants.MOZ_APP_VERSION,
+        release_channel: UpdateUtils.getUpdateChannel(false),
+      },
+      data
+    );
     if (experimentsString) {
       payload.shield_id = experimentsString;
     }
 
     return payload;
   }
 
   async sendPing(data, options) {
@@ -188,31 +337,37 @@ class PingCentre {
       return Promise.resolve();
     }
 
     const payload = await this._createPing(data, options);
 
     if (this.logging) {
       // performance related pings cause a lot of logging, so we mute them
       if (data.action !== "activity_stream_performance") {
-        Services.console.logStringMessage(`TELEMETRY PING: ${JSON.stringify(payload)}\n`);
+        Services.console.logStringMessage(
+          `TELEMETRY PING: ${JSON.stringify(payload)}\n`
+        );
       }
     }
 
     return fetch(this._pingEndpoint, {
       method: "POST",
       body: JSON.stringify(payload),
       credentials: "omit",
-    }).then(response => {
-      if (!response.ok) {
-        Cu.reportError(`Ping failure with HTTP response code: ${response.status}`);
-      }
-    }).catch(e => {
-      Cu.reportError(`Ping failure with error: ${e}`);
-    });
+    })
+      .then(response => {
+        if (!response.ok) {
+          Cu.reportError(
+            `Ping failure with HTTP response code: ${response.status}`
+          );
+        }
+      })
+      .catch(e => {
+        Cu.reportError(`Ping failure with error: ${e}`);
+      });
   }
 
   /**
    * Sends a ping to the Structured Ingestion telemetry pipeline.
    *
    * @param {Object} data     The payload to be sent.
    * @param {String} endpoint The destination endpoint. Note that Structured Ingestion
    *                          requires a different endpoint for each ping. It's up to the
@@ -223,37 +378,48 @@ class PingCentre {
   async sendStructuredIngestionPing(data, endpoint, options) {
     if (!this.enabled) {
       return Promise.resolve();
     }
 
     const payload = await this._createStructuredIngestionPing(data, options);
 
     if (this.logging) {
-      Services.console.logStringMessage(`TELEMETRY PING (STRUCTURED INGESTION): ${JSON.stringify(payload)}\n`);
+      Services.console.logStringMessage(
+        `TELEMETRY PING (STRUCTURED INGESTION): ${JSON.stringify(payload)}\n`
+      );
     }
 
     return fetch(endpoint, {
       method: "POST",
       body: JSON.stringify(payload),
       credentials: "omit",
-    }).then(response => {
-      if (!response.ok) {
-        Cu.reportError(`Structured Ingestion ping failure with HTTP response code: ${response.status}`);
-      }
-    }).catch(e => {
-      Cu.reportError(`Structured Ingestion ping failure with error: ${e}`);
-    });
+    })
+      .then(response => {
+        if (!response.ok) {
+          Cu.reportError(
+            `Structured Ingestion ping failure with HTTP response code: ${
+              response.status
+            }`
+          );
+        }
+      })
+      .catch(e => {
+        Cu.reportError(`Structured Ingestion ping failure with error: ${e}`);
+      });
   }
 
   uninit() {
     try {
       this._prefs.removeObserver(TELEMETRY_PREF, this._onTelemetryPrefChange);
       this._prefs.removeObserver(LOGGING_PREF, this._onLoggingPrefChange);
-      this._prefs.removeObserver(FHR_UPLOAD_ENABLED_PREF, this._onFhrPrefChange);
+      this._prefs.removeObserver(
+        FHR_UPLOAD_ENABLED_PREF,
+        this._onFhrPrefChange
+      );
     } catch (e) {
       Cu.reportError(e);
     }
   }
 }
 
 this.PingCentre = PingCentre;
 this.PingCentreConstants = {
--- a/browser/modules/ProcessHangMonitor.jsm
+++ b/browser/modules/ProcessHangMonitor.jsm
@@ -2,18 +2,20 @@
 /* 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/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["ProcessHangMonitor"];
 
-const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { AppConstants } = ChromeUtils.import(
+  "resource://gre/modules/AppConstants.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /**
  * This JSM is responsible for observing content process hang reports
  * and asking the user what to do about them. See nsIHangReport for
  * the platform interface.
  */
 
 var ProcessHangMonitor = {
@@ -82,17 +84,19 @@ var ProcessHangMonitor = {
   debugScript(win) {
     this.handleUserInput(win, report => {
       function callback() {
         report.endStartingDebugger();
       }
 
       report.beginStartingDebugger();
 
-      let svc = Cc["@mozilla.org/dom/slow-script-debug;1"].getService(Ci.nsISlowScriptDebug);
+      let svc = Cc["@mozilla.org/dom/slow-script-debug;1"].getService(
+        Ci.nsISlowScriptDebug
+      );
       let handler = svc.remoteActivationHandler;
       handler.handleSlowScriptDebug(report.scriptBrowser, callback);
     });
   },
 
   /**
    * Terminate the plugin process associated with a hang being reported
    * for the selected browser in |win|. Will attempt to generate a combined
@@ -174,29 +178,33 @@ var ProcessHangMonitor = {
 
     // NOTE, we didn't call userCanceled on nsIHangReport here. This insures
     // we don't repeatedly generate and cache crash report data for this hang
     // in the process hang reporter. It already has one report for the browser
     // process we want it hold onto.
 
     // Create a new wait timer with notify callback
     let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
-    timer.initWithCallback(() => {
-      for (let [stashedReport, otherTimer] of this._pausedReports) {
-        if (otherTimer === timer) {
-          this.removePausedReport(stashedReport);
+    timer.initWithCallback(
+      () => {
+        for (let [stashedReport, otherTimer] of this._pausedReports) {
+          if (otherTimer === timer) {
+            this.removePausedReport(stashedReport);
 
-          // We're still hung, so move the report back to the active
-          // list and update the UI.
-          this._activeReports.add(report);
-          this.updateWindows();
-          break;
+            // We're still hung, so move the report back to the active
+            // list and update the UI.
+            this._activeReports.add(report);
+            this.updateWindows();
+            break;
+          }
         }
-      }
-    }, this.WAIT_EXPIRATION_TIME, timer.TYPE_ONE_SHOT);
+      },
+      this.WAIT_EXPIRATION_TIME,
+      timer.TYPE_ONE_SHOT
+    );
 
     this._pausedReports.set(report, timer);
 
     // remove the browser notification associated with this hang
     this.updateWindows();
   },
 
   /**
@@ -239,17 +247,17 @@ var ProcessHangMonitor = {
         this.clearHang(subject.QueryInterface(Ci.nsIHangReport));
         break;
       }
 
       case "domwindowopened": {
         // Install event listeners on the new window in case one of
         // its tabs is already hung.
         let win = subject.QueryInterface(Ci.nsIDOMWindow);
-        let listener = (ev) => {
+        let listener = ev => {
           win.removeEventListener("load", listener, true);
           this.updateWindows();
         };
         win.addEventListener("load", listener, true);
         break;
       }
 
       case "domwindowclosed": {
@@ -268,17 +276,17 @@ var ProcessHangMonitor = {
    */
   onQuitApplicationGranted() {
     this._shuttingDown = true;
     this.stopAllHangs();
     this.updateWindows();
   },
 
   onWindowClosed(win) {
-    let maybeStopHang = (report) => {
+    let maybeStopHang = report => {
       if (report.hangType == report.SLOW_SCRIPT) {
         let hungBrowserWindow = null;
         try {
           hungBrowserWindow = report.scriptBrowser.ownerGlobal;
         } catch (e) {
           // Ignore failures to get the script browser - we'll be
           // conservative, and assume that if we cannot access the
           // window that belongs to this report that we should stop
@@ -300,33 +308,33 @@ var ProcessHangMonitor = {
     // If there are any script hangs for browsers that are in this window
     // that is closing, we can stop them now.
     for (let report of this._activeReports) {
       if (maybeStopHang(report)) {
         this._activeReports.delete(report);
       }
     }
 
-    for (let [pausedReport ] of this._pausedReports) {
+    for (let [pausedReport] of this._pausedReports) {
       if (maybeStopHang(pausedReport)) {
         this.removePausedReport(pausedReport);
       }
     }
 
     this.updateWindows();
   },
 
   stopAllHangs() {
     for (let report of this._activeReports) {
       this.stopHang(report);
     }
 
     this._activeReports = new Set();
 
-    for (let [pausedReport ] of this._pausedReports) {
+    for (let [pausedReport] of this._pausedReports) {
       this.stopHang(pausedReport);
       this.removePausedReport(pausedReport);
     }
   },
 
   /**
    * Find a active hang report for the given <browser> element.
    */
@@ -340,17 +348,17 @@ var ProcessHangMonitor = {
     return null;
   },
 
   /**
    * Find a paused hang report for the given <browser> element.
    */
   findPausedReport(browser) {
     let frameLoader = browser.frameLoader;
-    for (let [report ] of this._pausedReports) {
+    for (let [report] of this._pausedReports) {
       if (report.isReportForBrowser(frameLoader)) {
         return report;
       }
     }
     return null;
   },
 
   /**
@@ -415,110 +423,136 @@ var ProcessHangMonitor = {
       this.hideNotification(win);
     }
   },
 
   /**
    * Show the notification for a hang.
    */
   showNotification(win, report) {
-    let notification =
-        win.gHighPriorityNotificationBox.getNotificationWithValue("process-hang");
+    let notification = win.gHighPriorityNotificationBox.getNotificationWithValue(
+      "process-hang"
+    );
     if (notification) {
       return;
     }
 
     let bundle = win.gNavigatorBundle;
 
-    let buttons = [{
+    let buttons = [
+      {
         label: bundle.getString("processHang.button_stop.label"),
         accessKey: bundle.getString("processHang.button_stop.accessKey"),
         callback() {
           ProcessHangMonitor.stopIt(win);
         },
       },
       {
         label: bundle.getString("processHang.button_wait.label"),
         accessKey: bundle.getString("processHang.button_wait.accessKey"),
         callback() {
           ProcessHangMonitor.waitLonger(win);
         },
-      }];
+      },
+    ];
 
     let message = bundle.getString("processHang.label");
     if (report.addonId) {
-      let aps = Cc["@mozilla.org/addons/policy-service;1"].getService(Ci.nsIAddonPolicyService);
+      let aps = Cc["@mozilla.org/addons/policy-service;1"].getService(
+        Ci.nsIAddonPolicyService
+      );
 
       let doc = win.document;
       let brandBundle = doc.getElementById("bundle_brand");
 
       let addonName = aps.getExtensionName(report.addonId);
 
-      let label = bundle.getFormattedString("processHang.add-on.label",
-                                            [addonName, brandBundle.getString("brandShortName")]);
+      let label = bundle.getFormattedString("processHang.add-on.label", [
+        addonName,
+        brandBundle.getString("brandShortName"),
+      ]);
 
       let linkText = bundle.getString("processHang.add-on.learn-more.text");
-      let linkURL = "https://support.mozilla.org/kb/warning-unresponsive-script#w_other-causes";
+      let linkURL =
+        "https://support.mozilla.org/kb/warning-unresponsive-script#w_other-causes";
 
-      let link = doc.createXULElement("label", {is: "text-link"});
+      let link = doc.createXULElement("label", { is: "text-link" });
       link.setAttribute("role", "link");
-      link.setAttribute("onclick", `openTrustedLinkIn(${JSON.stringify(linkURL)}, "tab")`);
+      link.setAttribute(
+        "onclick",
+        `openTrustedLinkIn(${JSON.stringify(linkURL)}, "tab")`
+      );
       link.setAttribute("value", linkText);
 
       message = doc.createDocumentFragment();
       message.appendChild(doc.createTextNode(label + " "));
       message.appendChild(link);
 
       buttons.unshift({
         label: bundle.getString("processHang.button_stop_sandbox.label"),
-        accessKey: bundle.getString("processHang.button_stop_sandbox.accessKey"),
+        accessKey: bundle.getString(
+          "processHang.button_stop_sandbox.accessKey"
+        ),
         callback() {
           ProcessHangMonitor.stopGlobal(win);
         },
       });
     }
 
     if (AppConstants.MOZ_DEV_EDITION && report.hangType == report.SLOW_SCRIPT) {
       buttons.push({
         label: bundle.getString("processHang.button_debug.label"),
         accessKey: bundle.getString("processHang.button_debug.accessKey"),
         callback() {
           ProcessHangMonitor.debugScript(win);
         },
       });
     }
 
-    win.gHighPriorityNotificationBox.appendNotification(message, "process-hang",
+    win.gHighPriorityNotificationBox.appendNotification(
+      message,
+      "process-hang",
       "chrome://browser/content/aboutRobots-icon.png",
-      win.gHighPriorityNotificationBox.PRIORITY_WARNING_HIGH, buttons);
+      win.gHighPriorityNotificationBox.PRIORITY_WARNING_HIGH,
+      buttons
+    );
   },
 
   /**
    * Ensure that no hang notifications are visible in |win|.
    */
   hideNotification(win) {
-    let notification =
-        win.gHighPriorityNotificationBox.getNotificationWithValue("process-hang");
+    let notification = win.gHighPriorityNotificationBox.getNotificationWithValue(
+      "process-hang"
+    );
     if (notification) {
       win.gHighPriorityNotificationBox.removeNotification(notification);
     }
   },
 
   /**
    * Install event handlers on |win| to watch for events that would
    * cause a different hang report to be displayed.
    */
   trackWindow(win) {
     win.gBrowser.tabContainer.addEventListener("TabSelect", this, true);
-    win.gBrowser.tabContainer.addEventListener("TabRemotenessChange", this, true);
+    win.gBrowser.tabContainer.addEventListener(
+      "TabRemotenessChange",
+      this,
+      true
+    );
   },
 
   untrackWindow(win) {
     win.gBrowser.tabContainer.removeEventListener("TabSelect", this, true);
-    win.gBrowser.tabContainer.removeEventListener("TabRemotenessChange", this, true);
+    win.gBrowser.tabContainer.removeEventListener(
+      "TabRemotenessChange",
+      this,
+      true
+    );
   },
 
   handleEvent(event) {
     let win = event.target.ownerGlobal;
 
     // If a new tab is selected or if a tab changes remoteness, then
     // we may need to show or hide a hang notification.
 
--- a/browser/modules/ReaderParent.jsm
+++ b/browser/modules/ReaderParent.jsm
@@ -1,44 +1,63 @@
 // -*- indent-tabs-mode: nil; js-indent-level: 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/. */
 
 "use strict";
 
-var EXPORTED_SYMBOLS = [ "ReaderParent" ];
+var EXPORTED_SYMBOLS = ["ReaderParent"];
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-ChromeUtils.defineModuleGetter(this, "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm");
-ChromeUtils.defineModuleGetter(this, "ReaderMode", "resource://gre/modules/ReaderMode.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "PlacesUtils",
+  "resource://gre/modules/PlacesUtils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "ReaderMode",
+  "resource://gre/modules/ReaderMode.jsm"
+);
 
-const gStringBundle = Services.strings.createBundle("chrome://global/locale/aboutReader.properties");
+const gStringBundle = Services.strings.createBundle(
+  "chrome://global/locale/aboutReader.properties"
+);
 
 var ReaderParent = {
   // Listeners are added in BrowserGlue.jsm
   receiveMessage(message) {
     switch (message.name) {
       case "Reader:FaviconRequest": {
         if (message.target.messageManager) {
           try {
             let preferredWidth = message.data.preferredWidth || 0;
             let uri = Services.io.newURI(message.data.url);
-            PlacesUtils.favicons.getFaviconURLForPage(uri, iconUri => {
-              if (iconUri) {
-                iconUri = PlacesUtils.favicons.getFaviconLinkForIcon(iconUri);
-                message.target.messageManager.sendAsyncMessage("Reader:FaviconReturn", {
-                  url: message.data.url,
-                  faviconUrl: iconUri.pathQueryRef.replace(/^favicon:/, ""),
-                });
-              }
-            }, preferredWidth);
+            PlacesUtils.favicons.getFaviconURLForPage(
+              uri,
+              iconUri => {
+                if (iconUri) {
+                  iconUri = PlacesUtils.favicons.getFaviconLinkForIcon(iconUri);
+                  message.target.messageManager.sendAsyncMessage(
+                    "Reader:FaviconReturn",
+                    {
+                      url: message.data.url,
+                      faviconUrl: iconUri.pathQueryRef.replace(/^favicon:/, ""),
+                    }
+                  );
+                }
+              },
+              preferredWidth
+            );
           } catch (ex) {
-            Cu.reportError("Error requesting favicon URL for about:reader content: " + ex);
+            Cu.reportError(
+              "Error requesting favicon URL for about:reader content: " + ex
+            );
           }
         }
         break;
       }
 
       case "Reader:UpdateReaderButton": {
         let browser = message.target;
         if (message.data && message.data.isArticle !== undefined) {
@@ -67,34 +86,38 @@ var ReaderParent = {
       let closeText = gStringBundle.GetStringFromName("readerView.close");
 
       button.setAttribute("readeractive", true);
       button.hidden = false;
       button.setAttribute("aria-label", closeText);
 
       menuitem.setAttribute("label", closeText);
       menuitem.setAttribute("hidden", false);
-      menuitem.setAttribute("accesskey",
-        gStringBundle.GetStringFromName("readerView.close.accesskey"));
+      menuitem.setAttribute(
+        "accesskey",
+        gStringBundle.GetStringFromName("readerView.close.accesskey")
+      );
 
       key.setAttribute("disabled", false);
 
       browser.setAttribute("aria-reader", "active");
       Services.obs.notifyObservers(null, "reader-mode-available");
     } else {
       let enterText = gStringBundle.GetStringFromName("readerView.enter");
 
       button.removeAttribute("readeractive");
       button.hidden = !browser.isArticle;
       button.setAttribute("aria-label", enterText);
 
       menuitem.setAttribute("label", enterText);
       menuitem.setAttribute("hidden", !browser.isArticle);
-      menuitem.setAttribute("accesskey",
-        gStringBundle.GetStringFromName("readerView.enter.accesskey"));
+      menuitem.setAttribute(
+        "accesskey",
+        gStringBundle.GetStringFromName("readerView.enter.accesskey")
+      );
 
       key.setAttribute("disabled", !browser.isArticle);
 
       if (browser.isArticle) {
         browser.setAttribute("aria-reader", "available");
         Services.obs.notifyObservers(null, "reader-mode-available");
       } else {
         browser.removeAttribute("aria-reader");
--- a/browser/modules/RemotePrompt.jsm
+++ b/browser/modules/RemotePrompt.jsm
@@ -1,34 +1,41 @@
 /* vim: set ts=2 sw=2 et tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
-var EXPORTED_SYMBOLS = [ "RemotePrompt" ];
+var EXPORTED_SYMBOLS = ["RemotePrompt"];
 
-ChromeUtils.defineModuleGetter(this, "PromptUtils",
-                               "resource://gre/modules/SharedPromptUtils.jsm");
-ChromeUtils.defineModuleGetter(this, "Services",
-                               "resource://gre/modules/Services.jsm");
+ChromeUtils.defineModuleGetter(
+  this,
+  "PromptUtils",
+  "resource://gre/modules/SharedPromptUtils.jsm"
+);
+ChromeUtils.defineModuleGetter(
+  this,
+  "Services",
+  "resource://gre/modules/Services.jsm"
+);
 
 var RemotePrompt = {
   // Listeners are added in BrowserGlue.jsm
   receiveMessage(message) {
     switch (message.name) {
       case "Prompt:Open":
         const COMMON_DIALOG = "chrome://global/content/commonDialog.xul";
         const SELECT_DIALOG = "chrome://global/content/selectDialog.xul";
 
         if (message.data.tabPrompt) {
           this.openTabPrompt(message.data, message.target);
         } else {
-          let uri = (message.data.promptType == "select") ? SELECT_DIALOG : COMMON_DIALOG;
+          let uri =
+            message.data.promptType == "select" ? SELECT_DIALOG : COMMON_DIALOG;
           this.openModalWindow(uri, message.data, message.target);
         }
         break;
     }
   },
 
   openTabPrompt(args, browser) {
     let window = browser.ownerGlobal;
@@ -37,45 +44,57 @@ var RemotePrompt = {
     let needRemove = false;
     let promptId = args._remoteId;
 
     function onPromptClose(forceCleanup) {
       // It's possible that we removed the prompt during the
       // appendPrompt call below. In that case, newPrompt will be
       // undefined. We set the needRemove flag to remember to remove
       // it right after we've finished adding it.
-      if (newPrompt)
+      if (newPrompt) {
         tabPrompt.removePrompt(newPrompt);
-      else
+      } else {
         needRemove = true;
+      }
 
       PromptUtils.fireDialogEvent(window, "DOMModalDialogClosed", browser);
       browser.messageManager.sendAsyncMessage("Prompt:Close", args);
     }
 
-    browser.messageManager.addMessageListener("Prompt:ForceClose", function listener(message) {
-      // If this was for another prompt in the same tab, ignore it.
-      if (message.data._remoteId !== promptId) {
-        return;
-      }
+    browser.messageManager.addMessageListener(
+      "Prompt:ForceClose",
+      function listener(message) {
+        // If this was for another prompt in the same tab, ignore it.
+        if (message.data._remoteId !== promptId) {
+          return;
+        }
 
-      browser.messageManager.removeMessageListener("Prompt:ForceClose", listener);
+        browser.messageManager.removeMessageListener(
+          "Prompt:ForceClose",
+          listener
+        );
 
-      if (newPrompt) {
-        newPrompt.abortPrompt();
+        if (newPrompt) {
+          newPrompt.abortPrompt();
+        }
       }
-    });
+    );
 
     try {
       let eventDetail = {
         tabPrompt: true,
         promptPrincipal: args.promptPrincipal,
         inPermitUnload: args.inPermitUnload,
       };
-      PromptUtils.fireDialogEvent(window, "DOMWillOpenModalDialog", browser, eventDetail);
+      PromptUtils.fireDialogEvent(
+        window,
+        "DOMWillOpenModalDialog",
+        browser,
+        eventDetail
+      );
 
       args.promptActive = true;
 
       newPrompt = tabPrompt.appendPrompt(args, onPromptClose);
 
       if (needRemove) {
         tabPrompt.removePrompt(newPrompt);
       }
@@ -90,18 +109,23 @@ var RemotePrompt = {
   },
 
   openModalWindow(uri, args, browser) {
     let window = browser.ownerGlobal;
     try {
       PromptUtils.fireDialogEvent(window, "DOMWillOpenModalDialog", browser);
       let bag = PromptUtils.objectToPropBag(args);
 
-      Services.ww.openWindow(window, uri, "_blank",
-                             "centerscreen,chrome,modal,titlebar", bag);
+      Services.ww.openWindow(
+        window,
+        uri,
+        "_blank",
+        "centerscreen,chrome,modal,titlebar",
+        bag
+      );
 
       PromptUtils.propBagToObject(bag, args);
     } finally {
       PromptUtils.fireDialogEvent(window, "DOMModalDialogClosed", browser);
       browser.messageManager.sendAsyncMessage("Prompt:Close", args);
     }
   },
 };
--- a/browser/modules/Sanitizer.jsm
+++ b/browser/modules/Sanitizer.jsm
@@ -1,31 +1,40 @@
 // -*- indent-tabs-mode: nil; js-indent-level: 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/. */
 
 var EXPORTED_SYMBOLS = ["Sanitizer"];
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   AppConstants: "resource://gre/modules/AppConstants.jsm",
   PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
   FormHistory: "resource://gre/modules/FormHistory.jsm",
-  ContextualIdentityService: "resource://gre/modules/ContextualIdentityService.jsm",
+  ContextualIdentityService:
+    "resource://gre/modules/ContextualIdentityService.jsm",
 });
 
-XPCOMUtils.defineLazyServiceGetter(this, "quotaManagerService",
-                                   "@mozilla.org/dom/quota-manager-service;1",
-                                   "nsIQuotaManagerService");
-XPCOMUtils.defineLazyServiceGetter(this, "serviceWorkerManager",
-                                   "@mozilla.org/serviceworkers/manager;1",
-                                   "nsIServiceWorkerManager");
+XPCOMUtils.defineLazyServiceGetter(
+  this,
+  "quotaManagerService",
+  "@mozilla.org/dom/quota-manager-service;1",
+  "nsIQuotaManagerService"
+);
+XPCOMUtils.defineLazyServiceGetter(
+  this,
+  "serviceWorkerManager",
+  "@mozilla.org/serviceworkers/manager;1",
+  "nsIServiceWorkerManager"
+);
 
 var logConsole;
 function log(msg) {
   if (!logConsole) {
     logConsole = console.createInstance({
       prefix: "** Sanitizer.jsm",
       maxLogLevelPref: "browser.sanitizer.loglevel",
     });
@@ -68,29 +77,30 @@ var Sanitizer = {
    * Sanitizer.getClearRange.
    */
   PREF_TIMESPAN: "privacy.sanitize.timeSpan",
 
   /**
    * Pref to newTab segregation. If true, on shutdown, the private container
    * used in about:newtab is cleaned up.  Exposed because used in tests.
    */
-  PREF_NEWTAB_SEGREGATION: "privacy.usercontext.about_newtab_segregation.enabled",
+  PREF_NEWTAB_SEGREGATION:
+    "privacy.usercontext.about_newtab_segregation.enabled",
 
   /**
    * Time span constants corresponding to values of the privacy.sanitize.timeSpan
    * pref.  Used to determine how much history to clear, for various items
    */
   TIMESPAN_EVERYTHING: 0,
-  TIMESPAN_HOUR:       1,
-  TIMESPAN_2HOURS:     2,
-  TIMESPAN_4HOURS:     3,
-  TIMESPAN_TODAY:      4,
-  TIMESPAN_5MIN:       5,
-  TIMESPAN_24HOURS:    6,
+  TIMESPAN_HOUR: 1,
+  TIMESPAN_2HOURS: 2,
+  TIMESPAN_4HOURS: 3,
+  TIMESPAN_TODAY: 4,
+  TIMESPAN_5MIN: 5,
+  TIMESPAN_24HOURS: 6,
 
   /**
    * Whether we should sanitize on shutdown.
    * When this is set, a pending sanitization should also be added and removed
    * when shutdown sanitization is complete. This allows to retry incomplete
    * sanitizations on startup.
    */
   shouldSanitizeOnShutdown: false,
@@ -102,81 +112,97 @@ var Sanitizer = {
 
   /**
    * Shows a sanitization dialog to the user.
    *
    * @param [optional] parentWindow the window to use as
    *                   parent for the created dialog.
    */
   showUI(parentWindow) {
-    let win = AppConstants.platform == "macosx" ?
-      null : // make this an app-modal window on Mac
-      parentWindow;
-    Services.ww.openWindow(win,
-                           "chrome://browser/content/sanitize.xul",
-                           "Sanitize",
-                           "chrome,titlebar,dialog,centerscreen,modal",
-                           null);
+    let win =
+      AppConstants.platform == "macosx"
+        ? null // make this an app-modal window on Mac
+        : parentWindow;
+    Services.ww.openWindow(
+      win,
+      "chrome://browser/content/sanitize.xul",
+      "Sanitize",
+      "chrome,titlebar,dialog,centerscreen,modal",
+      null
+    );
   },
 
   /**
    * Performs startup tasks:
    *  - Checks if sanitizations were not completed during the last session.
    *  - Registers sanitize-on-shutdown.
    */
   async onStartup() {
     // First, collect pending sanitizations from the last session, before we
     // add pending sanitizations for this session.
     let pendingSanitizations = getAndClearPendingSanitizations();
 
     // Check if we should sanitize on shutdown.
-    this.shouldSanitizeOnShutdown =
-      Services.prefs.getBoolPref(Sanitizer.PREF_SANITIZE_ON_SHUTDOWN, false);
+    this.shouldSanitizeOnShutdown = Services.prefs.getBoolPref(
+      Sanitizer.PREF_SANITIZE_ON_SHUTDOWN,
+      false
+    );
     Services.prefs.addObserver(Sanitizer.PREF_SANITIZE_ON_SHUTDOWN, this, true);
     // Add a pending shutdown sanitization, if necessary.
     if (this.shouldSanitizeOnShutdown) {
-      let itemsToClear = getItemsToClearFromPrefBranch(Sanitizer.PREF_SHUTDOWN_BRANCH);
+      let itemsToClear = getItemsToClearFromPrefBranch(
+        Sanitizer.PREF_SHUTDOWN_BRANCH
+      );
       addPendingSanitization("shutdown", itemsToClear, {});
     }
     // Shutdown sanitization is always pending, but the user may change the
     // sanitize on shutdown prefs during the session. Then the pending
     // sanitization would become stale and must be updated.
     Services.prefs.addObserver(Sanitizer.PREF_SHUTDOWN_BRANCH, this, true);
 
     // Make sure that we are triggered during shutdown.
     let shutdownClient = PlacesUtils.history.shutdownClient.jsclient;
     // We need to pass to sanitize() (through sanitizeOnShutdown) a state object
     // that tracks the status of the shutdown blocker. This `progress` object
     // will be updated during sanitization and reported with the crash in case of
     // a shutdown timeout.
     // We use the `options` argument to pass the `progress` object to sanitize().
     let progress = { isShutdown: true };
-    shutdownClient.addBlocker("sanitize.js: Sanitize on shutdown",
+    shutdownClient.addBlocker(
+      "sanitize.js: Sanitize on shutdown",
       () => sanitizeOnShutdown(progress),
-      {fetchState: () => ({ progress })}
+      { fetchState: () => ({ progress }) }
     );
 
-    this.shouldSanitizeNewTabContainer = Services.prefs.getBoolPref(this.PREF_NEWTAB_SEGREGATION, false);
+    this.shouldSanitizeNewTabContainer = Services.prefs.getBoolPref(
+      this.PREF_NEWTAB_SEGREGATION,
+      false
+    );
     if (this.shouldSanitizeNewTabContainer) {
       addPendingSanitization("newtab-container", [], {});
     }
 
     let i = pendingSanitizations.findIndex(s => s.id == "newtab-container");
     if (i != -1) {
       pendingSanitizations.splice(i, 1);
       sanitizeNewTabSegregation();
     }
 
     // Finally, run the sanitizations that were left pending, because we crashed
     // before completing them.
-    for (let {itemsToClear, options} of pendingSanitizations) {
+    for (let { itemsToClear, options } of pendingSanitizations) {
       try {
         await this.sanitize(itemsToClear, options);
       } catch (ex) {
-        Cu.reportError("A previously pending sanitization failed: " + itemsToClear + "\n" + ex);
+        Cu.reportError(
+          "A previously pending sanitization failed: " +
+            itemsToClear +
+            "\n" +
+            ex
+        );
       }
     }
   },
 
   /**
    * Returns a 2 element array representing the start and end times,
    * in the uSec-since-epoch format that PRTime likes. If we should
    * clear everything, this function returns null.
@@ -186,45 +212,47 @@ var Sanitizer = {
    *                      if this argument is omitted.
    *                      If this argument is provided, it has to be one of the
    *                      Sanitizer.TIMESPAN_* constants. This function will
    *                      throw an error otherwise.
    *
    * @return {Array} a 2-element Array containing the start and end times.
    */
   getClearRange(ts) {
-    if (ts === undefined)
+    if (ts === undefined) {
       ts = Services.prefs.getIntPref(Sanitizer.PREF_TIMESPAN);
-    if (ts === Sanitizer.TIMESPAN_EVERYTHING)
+    }
+    if (ts === Sanitizer.TIMESPAN_EVERYTHING) {
       return null;
+    }
 
     // PRTime is microseconds while JS time is milliseconds
     var endDate = Date.now() * 1000;
     switch (ts) {
-      case Sanitizer.TIMESPAN_5MIN :
+      case Sanitizer.TIMESPAN_5MIN:
         var startDate = endDate - 300000000; // 5*60*1000000
         break;
-      case Sanitizer.TIMESPAN_HOUR :
+      case Sanitizer.TIMESPAN_HOUR:
         startDate = endDate - 3600000000; // 1*60*60*1000000
         break;
-      case Sanitizer.TIMESPAN_2HOURS :
+      case Sanitizer.TIMESPAN_2HOURS:
         startDate = endDate - 7200000000; // 2*60*60*1000000
         break;
-      case Sanitizer.TIMESPAN_4HOURS :
+      case Sanitizer.TIMESPAN_4HOURS:
         startDate = endDate - 14400000000; // 4*60*60*1000000
         break;
-      case Sanitizer.TIMESPAN_TODAY :
+      case Sanitizer.TIMESPAN_TODAY:
         var d = new Date(); // Start with today
         d.setHours(0); // zero us back to midnight...
         d.setMinutes(0);
         d.setSeconds(0);
         d.setMilliseconds(0);
         startDate = d.valueOf() * 1000; // convert to epoch usec
         break;
-      case Sanitizer.TIMESPAN_24HOURS :
+      case Sanitizer.TIMESPAN_24HOURS:
         startDate = endDate - 86400000000; // 24*60*60*1000000
         break;
       default:
         throw new Error("Invalid time span for clear private data: " + ts);
     }
     return [startDate, endDate];
   },
 
@@ -246,60 +274,69 @@ var Sanitizer = {
    *           If timespan is not ignored, and range is not set, sanitize() will
    *           use the value of the timespan pref to determine a range.
    *         - range (default: null)
    *         - privateStateForNewWindow (default: "non-private"): when clearing
    *           open windows, defines the private state for the newly opened window.
    */
   async sanitize(itemsToClear = null, options = {}) {
     let progress = options.progress || {};
-    if (!itemsToClear)
+    if (!itemsToClear) {
       itemsToClear = getItemsToClearFromPrefBranch(this.PREF_CPD_BRANCH);
+    }
     let promise = sanitizeInternal(this.items, itemsToClear, progress, options);
 
     // Depending on preferences, the sanitizer may perform asynchronous
     // work before it starts cleaning up the Places database (e.g. closing
     // windows). We need to make sure that the connection to that database
     // hasn't been closed by the time we use it.
     // Though, if this is a sanitize on shutdown, we already have a blocker.
     if (!progress.isShutdown) {
       let shutdownClient = PlacesUtils.history.shutdownClient.jsclient;
-      shutdownClient.addBlocker("sanitize.js: Sanitize",
-        promise,
-        {
-          fetchState: () => ({ progress }),
-        }
-      );
+      shutdownClient.addBlocker("sanitize.js: Sanitize", promise, {
+        fetchState: () => ({ progress }),
+      });
     }
 
     try {
       await promise;
     } finally {
       Services.obs.notifyObservers(null, "sanitizer-sanitization-complete");
     }
   },
 
   observe(subject, topic, data) {
     if (topic == "nsPref:changed") {
-      if (data.startsWith(this.PREF_SHUTDOWN_BRANCH) &&
-          this.shouldSanitizeOnShutdown) {
+      if (
+        data.startsWith(this.PREF_SHUTDOWN_BRANCH) &&
+        this.shouldSanitizeOnShutdown
+      ) {
         // Update the pending shutdown sanitization.
         removePendingSanitization("shutdown");
-        let itemsToClear = getItemsToClearFromPrefBranch(Sanitizer.PREF_SHUTDOWN_BRANCH);
+        let itemsToClear = getItemsToClearFromPrefBranch(
+          Sanitizer.PREF_SHUTDOWN_BRANCH
+        );
         addPendingSanitization("shutdown", itemsToClear, {});
       } else if (data == this.PREF_SANITIZE_ON_SHUTDOWN) {
-        this.shouldSanitizeOnShutdown =
-          Services.prefs.getBoolPref(Sanitizer.PREF_SANITIZE_ON_SHUTDOWN, false);
+        this.shouldSanitizeOnShutdown = Services.prefs.getBoolPref(
+          Sanitizer.PREF_SANITIZE_ON_SHUTDOWN,
+          false
+        );
         removePendingSanitization("shutdown");
         if (this.shouldSanitizeOnShutdown) {
-          let itemsToClear = getItemsToClearFromPrefBranch(Sanitizer.PREF_SHUTDOWN_BRANCH);
+          let itemsToClear = getItemsToClearFromPrefBranch(
+            Sanitizer.PREF_SHUTDOWN_BRANCH
+          );
           addPendingSanitization("shutdown", itemsToClear, {});
         }
       } else if (data == this.PREF_NEWTAB_SEGREGATION) {
-        this.shouldSanitizeNewTabContainer = Services.prefs.getBoolPref(this.PREF_NEWTAB_SEGREGATION, false);
+        this.shouldSanitizeNewTabContainer = Services.prefs.getBoolPref(
+          this.PREF_NEWTAB_SEGREGATION,
+          false
+        );
         removePendingSanitization("newtab-container");
         if (this.shouldSanitizeNewTabContainer) {
           addPendingSanitization("newtab-container", [], {});
         }
       }
     }
   },
 
@@ -326,87 +363,99 @@ var Sanitizer = {
         TelemetryStopwatch.finish("FX_SANITIZE_CACHE", refObj);
       },
     },
 
     cookies: {
       async clear(range) {
         let refObj = {};
         TelemetryStopwatch.start("FX_SANITIZE_COOKIES_2", refObj);
-        await clearData(range, Ci.nsIClearDataService.CLEAR_COOKIES |
-                               Ci.nsIClearDataService.CLEAR_PLUGIN_DATA |
-                               Ci.nsIClearDataService.CLEAR_MEDIA_DEVICES);
+        await clearData(
+          range,
+          Ci.nsIClearDataService.CLEAR_COOKIES |
+            Ci.nsIClearDataService.CLEAR_PLUGIN_DATA |
+            Ci.nsIClearDataService.CLEAR_MEDIA_DEVICES
+        );
         TelemetryStopwatch.finish("FX_SANITIZE_COOKIES_2", refObj);
       },
     },
 
     offlineApps: {
       async clear(range) {
         await clearData(range, Ci.nsIClearDataService.CLEAR_DOM_STORAGES);
       },
     },
 
     history: {
       async clear(range) {
         let refObj = {};
         TelemetryStopwatch.start("FX_SANITIZE_HISTORY", refObj);
-        await clearData(range, Ci.nsIClearDataService.CLEAR_HISTORY |
-                               Ci.nsIClearDataService.CLEAR_SESSION_HISTORY |
-                               Ci.nsIClearDataService.CLEAR_STORAGE_ACCESS |
-                               Ci.nsIClearDataService.CLEAR_CONTENT_BLOCKING_RECORDS);
+        await clearData(
+          range,
+          Ci.nsIClearDataService.CLEAR_HISTORY |
+            Ci.nsIClearDataService.CLEAR_SESSION_HISTORY |
+            Ci.nsIClearDataService.CLEAR_STORAGE_ACCESS |
+            Ci.nsIClearDataService.CLEAR_CONTENT_BLOCKING_RECORDS
+        );
         TelemetryStopwatch.finish("FX_SANITIZE_HISTORY", refObj);
       },
     },
 
     formdata: {
       async clear(range) {
         let seenException;
         let refObj = {};
         TelemetryStopwatch.start("FX_SANITIZE_FORMDATA", refObj);
         try {
           // Clear undo history of all search bars.
-          for (let currentWindow of Services.wm.getEnumerator("navigator:browser")) {
+          for (let currentWindow of Services.wm.getEnumerator(
+            "navigator:browser"
+          )) {
             let currentDocument = currentWindow.document;
 
             // searchBar.textbox may not exist due to the search bar binding
             // not having been constructed yet if the search bar is in the
             // overflow or menu panel. It won't have a value or edit history in
             // that case.
             let searchBar = currentDocument.getElementById("searchbar");
-            if (searchBar && searchBar.textbox)
+            if (searchBar && searchBar.textbox) {
               searchBar.textbox.reset();
+            }
 
             let tabBrowser = currentWindow.gBrowser;
             if (!tabBrowser) {
               // No tab browser? This means that it's too early during startup (typically,
               // Session Restore hasn't completed yet). Since we don't have find
               // bars at that stage and since Session Restore will not restore
               // find bars further down during startup, we have nothing to clear.
               continue;
             }
             for (let tab of tabBrowser.tabs) {
-              if (tabBrowser.isFindBarInitialized(tab))
+              if (tabBrowser.isFindBarInitialized(tab)) {
                 tabBrowser.getCachedFindBar(tab).clear();
+              }
             }
             // Clear any saved find value
             tabBrowser._lastFindValue = "";
           }
         } catch (ex) {
           seenException = ex;
         }
 
         try {
           let change = { op: "remove" };
           if (range) {
-            [ change.firstUsedStart, change.firstUsedEnd ] = range;
+            [change.firstUsedStart, change.firstUsedEnd] = range;
           }
           await new Promise(resolve => {
             FormHistory.update(change, {
               handleError(e) {
-                seenException = new Error("Error " + e.result + ": " + e.message);
+                seenException = new Error(
+                  "Error " + e.result + ": " + e.message
+                );
               },
               handleCompletion() {
                 resolve();
               },
             });
           });
         } catch (ex) {
           seenException = ex;
@@ -427,31 +476,37 @@ var Sanitizer = {
         TelemetryStopwatch.finish("FX_SANITIZE_DOWNLOADS", refObj);
       },
     },
 
     sessions: {
       async clear(range) {
         let refObj = {};
         TelemetryStopwatch.start("FX_SANITIZE_SESSIONS", refObj);
-        await clearData(range, Ci.nsIClearDataService.CLEAR_AUTH_TOKENS |
-                               Ci.nsIClearDataService.CLEAR_AUTH_CACHE);
+        await clearData(
+          range,
+          Ci.nsIClearDataService.CLEAR_AUTH_TOKENS |
+            Ci.nsIClearDataService.CLEAR_AUTH_CACHE
+        );
         TelemetryStopwatch.finish("FX_SANITIZE_SESSIONS", refObj);
       },
     },
 
     siteSettings: {
       async clear(range) {
         let refObj = {};
         TelemetryStopwatch.start("FX_SANITIZE_SITESETTINGS", refObj);
-        await clearData(range, Ci.nsIClearDataService.CLEAR_PERMISSIONS |
-                               Ci.nsIClearDataService.CLEAR_CONTENT_PREFERENCES |
-                               Ci.nsIClearDataService.CLEAR_DOM_PUSH_NOTIFICATIONS |
-                               Ci.nsIClearDataService.CLEAR_SECURITY_SETTINGS |
-                               Ci.nsIClearDataService.CLEAR_CERT_EXCEPTIONS);
+        await clearData(
+          range,
+          Ci.nsIClearDataService.CLEAR_PERMISSIONS |
+            Ci.nsIClearDataService.CLEAR_CONTENT_PREFERENCES |
+            Ci.nsIClearDataService.CLEAR_DOM_PUSH_NOTIFICATIONS |
+            Ci.nsIClearDataService.CLEAR_SECURITY_SETTINGS |
+            Ci.nsIClearDataService.CLEAR_CERT_EXCEPTIONS
+        );
         TelemetryStopwatch.finish("FX_SANITIZE_SITESETTINGS", refObj);
       },
     },
 
     openWindows: {
       _canCloseWindow(win) {
         if (win.CanCloseWindow()) {
           // We already showed PermitUnload for the window, so let's
@@ -477,45 +532,53 @@ var Sanitizer = {
 
         // First check if all these windows are OK with being closed:
         let windowList = [];
         for (let someWin of Services.wm.getEnumerator("navigator:browser")) {
           windowList.push(someWin);
           // If someone says "no" to a beforeunload prompt, we abort here:
           if (!this._canCloseWindow(someWin)) {
             this._resetAllWindowClosures(windowList);
-            throw new Error("Sanitize could not close windows: cancelled by user");
+            throw new Error(
+              "Sanitize could not close windows: cancelled by user"
+            );
           }
 
           // ...however, beforeunload prompts spin the event loop, and so the code here won't get
           // hit until the prompt has been dismissed. If more than 1 minute has elapsed since we
           // started prompting, stop, because the user might not even remember initiating the
           // 'forget', and the timespans will be all wrong by now anyway:
-          if (Date.now() > (startDate + 60 * 1000)) {
+          if (Date.now() > startDate + 60 * 1000) {
             this._resetAllWindowClosures(windowList);
             throw new Error("Sanitize could not close windows: timeout");
           }
         }
 
         if (windowList.length == 0) {
           return;
         }
 
         // If/once we get here, we should actually be able to close all windows.
 
         let refObj = {};
         TelemetryStopwatch.start("FX_SANITIZE_OPENWINDOWS", refObj);
 
         // First create a new window. We do this first so that on non-mac, we don't
         // accidentally close the app by closing all the windows.
-        let handler = Cc["@mozilla.org/browser/clh;1"].getService(Ci.nsIBrowserHandler);
+        let handler = Cc["@mozilla.org/browser/clh;1"].getService(
+          Ci.nsIBrowserHandler
+        );
         let defaultArgs = handler.defaultArgs;
         let features = "chrome,all,dialog=no," + privateStateForNewWindow;
-        let newWindow = windowList[0].openDialog(AppConstants.BROWSER_CHROME_URL, "_blank",
-                                                 features, defaultArgs);
+        let newWindow = windowList[0].openDialog(
+          AppConstants.BROWSER_CHROME_URL,
+          "_blank",
+          features,
+          defaultArgs
+        );
 
         let onFullScreen = null;
         if (AppConstants.platform == "macosx") {
           onFullScreen = function(e) {
             newWindow.removeEventListener("fullscreen", onFullScreen);
             let docEl = newWindow.document.documentElement;
             let sizemode = docEl.getAttribute("sizemode");
             if (!newWindow.fullScreen && sizemode == "fullscreen") {
@@ -533,44 +596,54 @@ var Sanitizer = {
           // Window creation and destruction is asynchronous. We need to wait
           // until all existing windows are fully closed, and the new window is
           // fully open, before continuing. Otherwise the rest of the sanitizer
           // could run too early (and miss new cookies being set when a page
           // closes) and/or run too late (and not have a fully-formed window yet
           // in existence). See bug 1088137.
           let newWindowOpened = false;
           let onWindowOpened = function(subject, topic, data) {
-            if (subject != newWindow)
+            if (subject != newWindow) {
               return;
+            }
 
-            Services.obs.removeObserver(onWindowOpened, "browser-delayed-startup-finished");
+            Services.obs.removeObserver(
+              onWindowOpened,
+              "browser-delayed-startup-finished"
+            );
             if (AppConstants.platform == "macosx") {
               newWindow.removeEventListener("fullscreen", onFullScreen);
             }
             newWindowOpened = true;
             // If we're the last thing to happen, invoke callback.
             if (numWindowsClosing == 0) {
               TelemetryStopwatch.finish("FX_SANITIZE_OPENWINDOWS", refObj);
               resolve();
             }
           };
 
           let numWindowsClosing = windowList.length;
           let onWindowClosed = function() {
             numWindowsClosing--;
             if (numWindowsClosing == 0) {
-              Services.obs.removeObserver(onWindowClosed, "xul-window-destroyed");
+              Services.obs.removeObserver(
+                onWindowClosed,
+                "xul-window-destroyed"
+              );
               // If we're the last thing to happen, invoke callback.
               if (newWindowOpened) {
                 TelemetryStopwatch.finish("FX_SANITIZE_OPENWINDOWS", refObj);
                 resolve();
               }
             }
           };
-          Services.obs.addObserver(onWindowOpened, "browser-delayed-startup-finished");
+          Services.obs.addObserver(
+            onWindowOpened,
+            "browser-delayed-startup-finished"
+          );
           Services.obs.addObserver(onWindowClosed, "xul-window-destroyed");
         });
 
         // Start the process of closing windows
         while (windowList.length) {
           windowList.pop().close();
         }
         newWindow.focus();
@@ -585,26 +658,28 @@ var Sanitizer = {
     },
   },
 };
 
 async function sanitizeInternal(items, aItemsToClear, progress, options = {}) {
   let { ignoreTimespan = true, range } = options;
   let seenError = false;
   // Shallow copy the array, as we are going to modify it in place later.
-  if (!Array.isArray(aItemsToClear))
+  if (!Array.isArray(aItemsToClear)) {
     throw new Error("Must pass an array of items to clear.");
+  }
   let itemsToClear = [...aItemsToClear];
 
   // Store the list of items to clear, in case we are killed before we
   // get a chance to complete.
   let uid = gPendingSanitizationSerial++;
   // Shutdown sanitization is managed outside.
-  if (!progress.isShutdown)
+  if (!progress.isShutdown) {
     addPendingSanitization(uid, itemsToClear, options);
+  }
 
   // Store the list of items to clear, for debugging/forensics purposes
   for (let k of itemsToClear) {
     progress[k] = "ready";
   }
 
   // Ensure open windows get cleared first, if they're in our list, so that
   // they don't stick around in the recently closed windows list, and so we
@@ -641,34 +716,39 @@ async function sanitizeInternal(items, a
   // Array of objects in form { name, promise }.
   // `name` is the item's name and `promise` may be a promise, if the
   // sanitization is asynchronous, or the function return value, otherwise.
   let handles = [];
   for (let name of itemsToClear) {
     let item = items[name];
     try {
       // Catch errors here, so later we can just loop through these.
-      handles.push({ name,
-                     promise: item.clear(range, options)
-                                  .then(() => progress[name] = "cleared",
-                                        ex => annotateError(name, ex)),
-                   });
+      handles.push({
+        name,
+        promise: item
+          .clear(range, options)
+          .then(
+            () => (progress[name] = "cleared"),
+            ex => annotateError(name, ex)
+          ),
+      });
     } catch (ex) {
       annotateError(name, ex);
     }
   }
   for (let handle of handles) {
     progress[handle.name] = "blocking";
     await handle.promise;
   }
 
   // Sanitization is complete.
   TelemetryStopwatch.finish("FX_SANITIZE_TOTAL", refObj);
-  if (!progress.isShutdown)
+  if (!progress.isShutdown) {
     removePendingSanitization(uid);
+  }
   progress = {};
   if (seenError) {
     throw new Error("Error sanitizing");
   }
 }
 
 // This is an helper that retrieves the principals with site data just once
 // and only when needed.
@@ -695,17 +775,19 @@ class PrincipalsCollector {
           // We are probably shutting down. We don't want to propagate the
           // error, rejecting the promise.
           resolve([]);
           return;
         }
 
         let list = [];
         for (let item of request.result) {
-          let principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(item.origin);
+          let principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(
+            item.origin
+          );
           let uri = principal.URI;
           if (isSupportedURI(uri)) {
             list.push(principal);
           }
         }
 
         progress.step = "principals-quota-manager-completed";
         resolve(list);
@@ -713,50 +795,61 @@ class PrincipalsCollector {
     }).catch(ex => {
       Cu.reportError("QuotaManagerService promise failed: " + ex);
       return [];
     });
 
     progress.step = "principals-service-workers";
     let serviceWorkers = serviceWorkerManager.getAllRegistrations();
     for (let i = 0; i < serviceWorkers.length; i++) {
-      let sw = serviceWorkers.queryElementAt(i, Ci.nsIServiceWorkerRegistrationInfo);
+      let sw = serviceWorkers.queryElementAt(
+        i,
+        Ci.nsIServiceWorkerRegistrationInfo
+      );
       // We don't need to check the scheme. SW are just exposed to http/https URLs.
       principals.push(sw.principal);
     }
 
     // Let's take the list of unique hosts+OA from cookies.
     progress.step = "principals-cookies";
     let enumerator = Services.cookies.enumerator;
     let hosts = new Set();
     for (let cookie of enumerator) {
-      hosts.add(cookie.rawHost + ChromeUtils.originAttributesToSuffix(cookie.originAttributes));
+      hosts.add(
+        cookie.rawHost +
+          ChromeUtils.originAttributesToSuffix(cookie.originAttributes)
+      );
     }
 
     progress.step = "principals-host-cookie";
     hosts.forEach(host => {
       // Cookies and permissions are handled by origin/host. Doesn't matter if we
       // use http: or https: schema here.
       principals.push(
-        Services.scriptSecurityManager.createCodebasePrincipalFromOrigin("https://" + host));
+        Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(
+          "https://" + host
+        )
+      );
     });
 
     progress.step = "total-principals:" + principals.length;
     return principals;
   }
 }
 
 async function sanitizeOnShutdown(progress) {
   log("Sanitizing on shutdown");
 
   let needsSyncSavePrefs = false;
   if (Sanitizer.shouldSanitizeOnShutdown) {
     // Need to sanitize upon shutdown
     progress.advancement = "shutdown-cleaner";
-    let itemsToClear = getItemsToClearFromPrefBranch(Sanitizer.PREF_SHUTDOWN_BRANCH);
+    let itemsToClear = getItemsToClearFromPrefBranch(
+      Sanitizer.PREF_SHUTDOWN_BRANCH
+    );
     await Sanitizer.sanitize(itemsToClear, { progress });
 
     // We didn't crash during shutdown sanitization, so annotate it to avoid
     // sanitizing again on startup.
     removePendingSanitization("shutdown");
     needsSyncSavePrefs = true;
   }
 
@@ -790,47 +883,59 @@ async function sanitizeOnShutdown(progre
   //
   // We can think of there being two groups that might need to be wiped.
   // First, when the default is set to ACCEPT_SESSION, then all origins that
   // use QuotaManager storage but don't have a specific permission set to
   // ACCEPT_NORMALLY need to be wiped.  Second, the set of origins that have
   // the permission explicitly set to ACCEPT_SESSION need to be wiped.  There
   // are also other ways to think about and accomplish this, but this is what
   // the logic below currently does!
-  if (Services.prefs.getIntPref(PREF_COOKIE_LIFETIME,
-                                Ci.nsICookieService.ACCEPT_NORMALLY) == Ci.nsICookieService.ACCEPT_SESSION) {
+  if (
+    Services.prefs.getIntPref(
+      PREF_COOKIE_LIFETIME,
+      Ci.nsICookieService.ACCEPT_NORMALLY
+    ) == Ci.nsICookieService.ACCEPT_SESSION
+  ) {
     log("Session-only configuration detected");
     progress.advancement = "session-only";
 
     let principals = await principalsCollector.getAllPrincipals(progress);
     await maybeSanitizeSessionPrincipals(progress, principals);
 
     progress.advancement = "done";
     return;
   }
 
   progress.advancement = "session-permission";
 
   // Let's see if we have to forget some particular site.
   for (let permission of Services.perms.enumerator) {
-    if (permission.type != "cookie" ||
-        permission.capability != Ci.nsICookiePermission.ACCESS_SESSION) {
+    if (
+      permission.type != "cookie" ||
+      permission.capability != Ci.nsICookiePermission.ACCESS_SESSION
+    ) {
       continue;
     }
 
     // We consider just permissions set for http, https and file URLs.
     if (!isSupportedURI(permission.principal.URI)) {
       continue;
     }
 
-    log("Custom session cookie permission detected for: " + permission.principal.URI.spec);
+    log(
+      "Custom session cookie permission detected for: " +
+        permission.principal.URI.spec
+    );
 
     // We use just the URI here, because permissions ignore OriginAttributes.
     let principals = await principalsCollector.getAllPrincipals(progress);
-    let selectedPrincipals = extractMatchingPrincipals(principals, permission.principal.URI);
+    let selectedPrincipals = extractMatchingPrincipals(
+      principals,
+      permission.principal.URI
+    );
     await maybeSanitizeSessionPrincipals(progress, selectedPrincipals);
   }
 
   progress.advancement = "done";
 }
 
 // Extracts the principals matching matchUri as root domain.
 function extractMatchingPrincipals(principals, matchUri) {
@@ -867,18 +972,20 @@ function cookiesAllowedForDomainOrSubDom
   // If we have the 'cookie' permission for this principal, let's return
   // immediately.
   let p = Services.perms.testPermissionFromPrincipal(principal, "cookie");
   if (p == Ci.nsICookiePermission.ACCESS_ALLOW) {
     log("Cookie allowed!");
     return true;
   }
 
-  if (p == Ci.nsICookiePermission.ACCESS_DENY ||
-      p == Ci.nsICookiePermission.ACCESS_SESSION) {
+  if (
+    p == Ci.nsICookiePermission.ACCESS_DENY ||
+    p == Ci.nsICookiePermission.ACCESS_SESSION
+  ) {
     log("Cookie denied or session!");
     return false;
   }
 
   // This is an old profile with unsupported permission values
   if (p != Ci.nsICookiePermission.ACCESS_DEFAULT) {
     log("Not supported cookie permission: " + p);
     return false;
@@ -890,48 +997,56 @@ function cookiesAllowedForDomainOrSubDom
     }
 
     // We consider just permissions set for http, https and file URLs.
     if (!isSupportedURI(perm.principal.URI)) {
       continue;
     }
 
     // We don't care about scheme, port, and anything else.
-    if (Services.eTLD.hasRootDomain(perm.principal.URI.host,
-                                    principal.URI.host)) {
+    if (
+      Services.eTLD.hasRootDomain(perm.principal.URI.host, principal.URI.host)
+    ) {
       log("Recursive cookie check on principal: " + perm.principal.URI.spec);
       return cookiesAllowedForDomainOrSubDomain(perm.principal);
     }
   }
 
   log("Cookie not allowed.");
   return false;
 }
 
 async function sanitizeSessionPrincipal(progress, principal) {
   log("Sanitizing principal: " + principal.URI.spec);
 
   await new Promise(resolve => {
     progress.sanitizePrincipal = "started";
-    Services.clearData.deleteDataFromPrincipal(principal, true /* user request */,
-                                               Ci.nsIClearDataService.CLEAR_ALL_CACHES |
-                                               Ci.nsIClearDataService.CLEAR_COOKIES |
-                                               Ci.nsIClearDataService.CLEAR_DOM_STORAGES |
-                                               Ci.nsIClearDataService.CLEAR_SECURITY_SETTINGS |
-                                               Ci.nsIClearDataService.CLEAR_EME |
-                                               Ci.nsIClearDataService.CLEAR_PLUGIN_DATA,
-                                               resolve);
+    Services.clearData.deleteDataFromPrincipal(
+      principal,
+      true /* user request */,
+      Ci.nsIClearDataService.CLEAR_ALL_CACHES |
+        Ci.nsIClearDataService.CLEAR_COOKIES |
+        Ci.nsIClearDataService.CLEAR_DOM_STORAGES |
+        Ci.nsIClearDataService.CLEAR_SECURITY_SETTINGS |
+        Ci.nsIClearDataService.CLEAR_EME |
+        Ci.nsIClearDataService.CLEAR_PLUGIN_DATA,
+      resolve
+    );
   });
   progress.sanitizePrincipal = "completed";
 }
 
 function sanitizeNewTabSegregation() {
-  let identity = ContextualIdentityService.getPrivateIdentity("userContextIdInternal.thumbnail");
+  let identity = ContextualIdentityService.getPrivateIdentity(
+    "userContextIdInternal.thumbnail"
+  );
   if (identity) {
-    Services.clearData.deleteDataFromOriginAttributesPattern({ userContextId: identity.userContextId });
+    Services.clearData.deleteDataFromOriginAttributesPattern({
+      userContextId: identity.userContextId,
+    });
   }
 }
 
 /**
  * Gets an array of items to clear from the given pref branch.
  * @param branch The pref branch to fetch.
  * @return Array of items to clear
  */
@@ -950,57 +1065,66 @@ function getItemsToClearFromPrefBranch(b
  * These functions are used to track pending sanitization on the next startup
  * in case of a crash before a sanitization could happen.
  * @param id A unique id identifying the sanitization
  * @param itemsToClear The items to clear
  * @param options The Sanitize options
  */
 function addPendingSanitization(id, itemsToClear, options) {
   let pendingSanitizations = safeGetPendingSanitizations();
-  pendingSanitizations.push({id, itemsToClear, options});
-  Services.prefs.setStringPref(Sanitizer.PREF_PENDING_SANITIZATIONS,
-                               JSON.stringify(pendingSanitizations));
+  pendingSanitizations.push({ id, itemsToClear, options });
+  Services.prefs.setStringPref(
+    Sanitizer.PREF_PENDING_SANITIZATIONS,
+    JSON.stringify(pendingSanitizations)
+  );
 }
 
 function removePendingSanitization(id) {
   let pendingSanitizations = safeGetPendingSanitizations();
   let i = pendingSanitizations.findIndex(s => s.id == id);
   let [s] = pendingSanitizations.splice(i, 1);
-  Services.prefs.setStringPref(Sanitizer.PREF_PENDING_SANITIZATIONS,
-    JSON.stringify(pendingSanitizations));
+  Services.prefs.setStringPref(
+    Sanitizer.PREF_PENDING_SANITIZATIONS,
+    JSON.stringify(pendingSanitizations)
+  );
   return s;
 }
 
 function getAndClearPendingSanitizations() {
   let pendingSanitizations = safeGetPendingSanitizations();
-  if (pendingSanitizations.length)
+  if (pendingSanitizations.length) {
     Services.prefs.clearUserPref(Sanitizer.PREF_PENDING_SANITIZATIONS);
+  }
   return pendingSanitizations;
 }
 
 function safeGetPendingSanitizations() {
   try {
     return JSON.parse(
-      Services.prefs.getStringPref(Sanitizer.PREF_PENDING_SANITIZATIONS, "[]"));
+      Services.prefs.getStringPref(Sanitizer.PREF_PENDING_SANITIZATIONS, "[]")
+    );
   } catch (ex) {
     Cu.reportError("Invalid JSON value for pending sanitizations: " + ex);
     return [];
   }
 }
 
 async function clearData(range, flags) {
   if (range) {
     await new Promise(resolve => {
-      Services.clearData.deleteDataInTimeRange(range[0], range[1], true /* user request */,
-                                               flags, resolve);
+      Services.clearData.deleteDataInTimeRange(
+        range[0],
+        range[1],
+        true /* user request */,
+        flags,
+        resolve
+      );
     });
   } else {
     await new Promise(resolve => {
       Services.clearData.deleteData(flags, resolve);
     });
   }
 }
 
 function isSupportedURI(uri) {
-  return uri.scheme == "http" ||
-         uri.scheme == "https" ||
-         uri.scheme == "file";
+  return uri.scheme == "http" || uri.scheme == "https" || uri.scheme == "file";
 }
--- a/browser/modules/SiteDataManager.jsm
+++ b/browser/modules/SiteDataManager.jsm
@@ -1,30 +1,35 @@
 "use strict";
 
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-var EXPORTED_SYMBOLS = [
-  "SiteDataManager",
-];
+var EXPORTED_SYMBOLS = ["SiteDataManager"];
 
 XPCOMUtils.defineLazyGetter(this, "gStringBundle", function() {
-  return Services.strings.createBundle("chrome://browser/locale/siteData.properties");
+  return Services.strings.createBundle(
+    "chrome://browser/locale/siteData.properties"
+  );
 });
 
 XPCOMUtils.defineLazyGetter(this, "gBrandBundle", function() {
-  return Services.strings.createBundle("chrome://branding/locale/brand.properties");
+  return Services.strings.createBundle(
+    "chrome://branding/locale/brand.properties"
+  );
 });
 
 var SiteDataManager = {
-
   _qms: Services.qms,
 
-  _appCache: Cc["@mozilla.org/network/application-cache-service;1"].getService(Ci.nsIApplicationCacheService),
+  _appCache: Cc["@mozilla.org/network/application-cache-service;1"].getService(
+    Ci.nsIApplicationCacheService
+  ),
 
   // A Map of sites and their disk usage according to Quota Manager and appcache
   // Key is host (group sites based on host across scheme, port, origin atttributes).
   // Value is one object holding:
   //   - principals: instances of nsIPrincipal (only when the site has
   //     quota storage or AppCache).
   //   - persisted: the persistent-storage status.
   //   - quotaUsage: the usage of indexedDB and localStorage.
@@ -49,18 +54,20 @@ var SiteDataManager = {
     Services.obs.notifyObservers(null, "sitedatamanager:sites-updated");
   },
 
   getBaseDomainFromHost(host) {
     let result = host;
     try {
       result = Services.eTLD.getBaseDomainFromHost(host);
     } catch (e) {
-      if (e.result == Cr.NS_ERROR_HOST_IS_IP_ADDRESS ||
-          e.result == Cr.NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS) {
+      if (
+        e.result == Cr.NS_ERROR_HOST_IS_IP_ADDRESS ||
+        e.result == Cr.NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS
+      ) {
         // For these 2 expected errors, just take the host as the result.
         // - NS_ERROR_HOST_IS_IP_ADDRESS: the host is in ipv4/ipv6.
         // - NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS: not enough domain parts to extract.
         result = host;
       } else {
         throw e;
       }
     }
@@ -130,18 +137,19 @@ var SiteDataManager = {
       let onUsageResult = request => {
         if (request.resultCode == Cr.NS_OK) {
           let items = request.result;
           for (let item of items) {
             if (!item.persisted && item.usage <= 0) {
               // An non-persistent-storage site with 0 byte quota usage is redundant for us so skip it.
               continue;
             }
-            let principal =
-              Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(item.origin);
+            let principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(
+              item.origin
+            );
             let uri = principal.URI;
             if (uri.scheme == "http" || uri.scheme == "https") {
               let site = this._getOrInsertSite(uri.host);
               // Assume 3 sites:
               //   - Site A (not persisted): https://www.foo.com
               //   - Site B (not persisted): https://www.foo.com^userContextId=2
               //   - Site C (persisted):     https://www.foo.com:1234
               // Although only C is persisted, grouping by host, as a result,
@@ -199,17 +207,19 @@ var SiteDataManager = {
     }
 
     for (let group of groups) {
       let cache = this._appCache.getActiveCache(group);
       if (cache.usage <= 0) {
         // A site with 0 byte appcache usage is redundant for us so skip it.
         continue;
       }
-      let principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(group);
+      let principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(
+        group
+      );
       let uri = principal.URI;
       let site = this._getOrInsertSite(uri.host);
       if (!site.principals.some(p => p.origin == principal.origin)) {
         site.principals.push(principal);
       }
       site.appCacheList.push(cache);
     }
   },
@@ -290,51 +300,67 @@ var SiteDataManager = {
       if (removals.has(originNoSuffix)) {
         // In case of encountering
         //   - https://www.foo.com
         //   - https://www.foo.com^userContextId=2
         // below we have already removed across OAs so skip the same origin without suffix
         continue;
       }
       removals.add(originNoSuffix);
-      promises.push(new Promise(resolve => {
-        // We are clearing *All* across OAs so need to ensure a principal without suffix here,
-        // or the call of `clearStoragesForPrincipal` would fail.
-        principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(originNoSuffix);
-        let request = this._qms.clearStoragesForPrincipal(principal, null, null, true);
-        request.callback = resolve;
-      }));
+      promises.push(
+        new Promise(resolve => {
+          // We are clearing *All* across OAs so need to ensure a principal without suffix here,
+          // or the call of `clearStoragesForPrincipal` would fail.
+          principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(
+            originNoSuffix
+          );
+          let request = this._qms.clearStoragesForPrincipal(
+            principal,
+            null,
+            null,
+            true
+          );
+          request.callback = resolve;
+        })
+      );
     }
     return Promise.all(promises);
   },
 
   _removeAppCache(site) {
     for (let cache of site.appCacheList) {
       cache.discard();
     }
   },
 
   _removeCookies(site) {
     for (let cookie of site.cookies) {
       Services.cookies.remove(
-        cookie.host, cookie.name, cookie.path, false, cookie.originAttributes);
+        cookie.host,
+        cookie.name,
+        cookie.path,
+        false,
+        cookie.originAttributes
+      );
     }
     site.cookies = [];
   },
 
   // Returns a list of permissions from the permission manager that
   // we consider part of "site data and cookies".
   _getDeletablePermissions() {
     let perms = [];
     let enumerator = Services.perms.enumerator;
 
     while (enumerator.hasMoreElements()) {
       let permission = enumerator.getNext().QueryInterface(Ci.nsIPermission);
-      if (permission.type == "persistent-storage" ||
-          permission.type == "storage-access") {
+      if (
+        permission.type == "persistent-storage" ||
+        permission.type == "storage-access"
+      ) {
         perms.push(permission);
       }
     }
 
     return perms;
   },
 
   /**
@@ -343,25 +369,31 @@ var SiteDataManager = {
    * @param {Array} a list of hosts to match for removal.
    * @returns a Promise that resolves when data is removed and the site data
    *          manager has been updated.
    */
   async remove(hosts) {
     let perms = this._getDeletablePermissions();
     let promises = [];
     for (let host of hosts) {
-      promises.push(new Promise(function(resolve) {
-        Services.clearData.deleteDataFromHost(host, true,
-          Ci.nsIClearDataService.CLEAR_COOKIES |
-          Ci.nsIClearDataService.CLEAR_DOM_STORAGES |
-          Ci.nsIClearDataService.CLEAR_SECURITY_SETTINGS |
-          Ci.nsIClearDataService.CLEAR_PLUGIN_DATA |
-          Ci.nsIClearDataService.CLEAR_EME |
-          Ci.nsIClearDataService.CLEAR_ALL_CACHES, resolve);
-      }));
+      promises.push(
+        new Promise(function(resolve) {
+          Services.clearData.deleteDataFromHost(
+            host,
+            true,
+            Ci.nsIClearDataService.CLEAR_COOKIES |
+              Ci.nsIClearDataService.CLEAR_DOM_STORAGES |
+              Ci.nsIClearDataService.CLEAR_SECURITY_SETTINGS |
+              Ci.nsIClearDataService.CLEAR_PLUGIN_DATA |
+              Ci.nsIClearDataService.CLEAR_EME |
+              Ci.nsIClearDataService.CLEAR_ALL_CACHES,
+            resolve
+          );
+        })
+      );
 
       for (let perm of perms) {
         if (Services.eTLD.hasRootDomain(perm.principal.URI.host, host)) {
           Services.perms.removePermission(perm);
         }
       }
     }
 
@@ -381,31 +413,47 @@ var SiteDataManager = {
    */
   promptSiteDataRemoval(win, removals) {
     if (removals) {
       let args = {
         hosts: removals,
         allowed: false,
       };
       let features = "centerscreen,chrome,modal,resizable=no";
-      win.openDialog("chrome://browser/content/preferences/siteDataRemoveSelected.xul", "", features, args);
+      win.openDialog(
+        "chrome://browser/content/preferences/siteDataRemoveSelected.xul",
+        "",
+        features,
+        args
+      );
       return args.allowed;
     }
 
     let brandName = gBrandBundle.GetStringFromName("brandShortName");
     let flags =
       Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0 +
       Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1 +
       Services.prompt.BUTTON_POS_0_DEFAULT;
     let title = gStringBundle.GetStringFromName("clearSiteDataPromptTitle");
-    let text = gStringBundle.formatStringFromName("clearSiteDataPromptText", [brandName]);
+    let text = gStringBundle.formatStringFromName("clearSiteDataPromptText", [
+      brandName,
+    ]);
     let btn0Label = gStringBundle.GetStringFromName("clearSiteDataNow");
 
     let result = Services.prompt.confirmEx(
-      win, title, text, flags, btn0Label, null, null, null, {});
+      win,
+      title,
+      text,
+      flags,
+      btn0Label,
+      null,
+      null,
+      null,
+      {}
+    );
     return result == 0;
   },
 
   /**
    * Clears all site data and cache
    *
    * @returns a Promise that resolves when the data is cleared.
    */
@@ -416,34 +464,39 @@ var SiteDataManager = {
 
   /**
    * Clears all caches.
    *
    * @returns a Promise that resolves when the data is cleared.
    */
   removeCache() {
     return new Promise(function(resolve) {
-      Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL_CACHES, resolve);
+      Services.clearData.deleteData(
+        Ci.nsIClearDataService.CLEAR_ALL_CACHES,
+        resolve
+      );
     });
   },
 
   /**
    * Clears all site data, but not cache, because the UI offers
    * that functionality separately.
    *
    * @returns a Promise that resolves when the data is cleared.
    */
   async removeSiteData() {
     await new Promise(function(resolve) {
       Services.clearData.deleteData(
         Ci.nsIClearDataService.CLEAR_COOKIES |
-        Ci.nsIClearDataService.CLEAR_DOM_STORAGES |
-        Ci.nsIClearDataService.CLEAR_SECURITY_SETTINGS |
-        Ci.nsIClearDataService.CLEAR_EME |
-        Ci.nsIClearDataService.CLEAR_PLUGIN_DATA, resolve);
+          Ci.nsIClearDataService.CLEAR_DOM_STORAGES |
+          Ci.nsIClearDataService.CLEAR_SECURITY_SETTINGS |
+          Ci.nsIClearDataService.CLEAR_EME |
+          Ci.nsIClearDataService.CLEAR_PLUGIN_DATA,
+        resolve
+      );
     });
 
     for (let permission of this._getDeletablePermissions()) {
       Services.perms.removePermission(permission);
     }
 
     return this.updateSites();
   },
--- a/browser/modules/SitePermissions.jsm
+++ b/browser/modules/SitePermissions.jsm
@@ -1,19 +1,22 @@
 /* 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/. */
 
-var EXPORTED_SYMBOLS = [ "SitePermissions" ];
+var EXPORTED_SYMBOLS = ["SitePermissions"];
 
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import(
+  "resource://gre/modules/XPCOMUtils.jsm"
+);
 
-var gStringBundle =
-  Services.strings.createBundle("chrome://browser/locale/sitePermissions.properties");
+var gStringBundle = Services.strings.createBundle(
+  "chrome://browser/locale/sitePermissions.properties"
+);
 
 /**
  * A helper module to manage temporary permissions.
  *
  * Permissions are keyed by browser, so methods take a Browser
  * element to identify the corresponding permission set.
  *
  * This uses a WeakMap to key browsers, so that entries are
@@ -38,30 +41,39 @@ const TemporaryPermissions = {
 
   // Private helper method that bundles some shared behavior for
   // get() and getAll(), e.g. deleting permissions when they have expired.
   _get(entry, baseDomain, id, permission) {
     if (permission == null || permission.timeStamp == null) {
       delete entry[baseDomain][id];
       return null;
     }
-    if (permission.timeStamp + SitePermissions.temporaryPermissionExpireTime < Date.now()) {
+    if (
+      permission.timeStamp + SitePermissions.temporaryPermissionExpireTime <
+      Date.now()
+    ) {
       delete entry[baseDomain][id];
       return null;
     }
-    return {id, state: permission.state, scope: SitePermissions.SCOPE_TEMPORARY};
+    return {
+      id,
+      state: permission.state,
+      scope: SitePermissions.SCOPE_TEMPORARY,
+    };
   },
 
   // Extract baseDomain from uri. Fallback to hostname on conversion error.