Merge mozilla-central to inbound. a=merge CLOSED TREE
authorOana Pop Rus <opoprus@mozilla.com>
Thu, 24 Jan 2019 19:10:46 +0200
changeset 515313 82d47da67b4dfe32998f5e443d16530adc1daf0e
parent 515306 a68a2da104f324b649563af809965d87e8db7791 (current diff)
parent 515310 2c5eb9d8b8e2680e7ff3d8fe2714bfd78ef0c7d0 (diff)
child 515343 8efe83c7c8610872bd64f020fad8fc663fb54c2b
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge mozilla-central to inbound. a=merge CLOSED TREE
browser/components/urlbar/UrlbarMatch.jsm
browser/components/urlbar/tests/browser/browser_page_action_menu_add_search_engine.js
browser/components/urlbar/tests/browser/browser_page_action_menu_clipboard.js
browser/components/urlbar/tests/browser/browser_page_action_menu_share_mac.js
browser/components/urlbar/tests/browser/browser_page_action_menu_share_win.html
browser/components/urlbar/tests/browser/browser_page_action_menu_share_win.js
browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_0.xml
browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_1.xml
browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_2.xml
browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_many.html
browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_one.html
browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_same_names.html
browser/components/urlbar/tests/legacy/browser_page_action_menu.js
js/src/jsapi.cpp
testing/web-platform/meta/css/CSS2/abspos/abspos-containing-block-initial-001.xht.ini
testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--auto--percent-width-nonpercent-height-viewbox.html.ini
testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--auto-32px--nonpercent-width-omitted-height.html.ini
testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--auto-32px--nonpercent-width-percent-height-viewbox.html.ini
testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--auto-32px--omitted-width-nonpercent-height.html.ini
testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--auto-32px--percent-width-nonpercent-height.html.ini
testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--contain--height.html.ini
testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--cover--nonpercent-width-nonpercent-height--crisp.html.ini
testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--cover--nonpercent-width-percent-height-viewbox.html.ini
testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--cover--omitted-width-omitted-height.html.ini
testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--cover--omitted-width-percent-height-viewbox.html.ini
testing/web-platform/meta/css/css-color/t421-rgb-values-meaning-b.xht.ini
testing/web-platform/meta/css/css-grid/grid-definition/grid-template-columns-fit-content-001.html.ini
testing/web-platform/meta/css/css-grid/grid-definition/grid-template-rows-fit-content-001.html.ini
testing/web-platform/meta/css/css-position/position-sticky-flexbox.html.ini
testing/web-platform/meta/css/css-text-decor/text-decoration-line.html.ini
testing/web-platform/meta/css/css-text/line-break/line-break-strict-011.xht.ini
testing/web-platform/meta/css/css-text/text-transform/text-transform-capitalize-001.html.ini
testing/web-platform/meta/css/css-text/text-transform/text-transform-capitalize-003.html.ini
testing/web-platform/meta/css/css-text/text-transform/text-transform-capitalize-005.html.ini
testing/web-platform/meta/css/css-text/text-transform/text-transform-capitalize-007.html.ini
testing/web-platform/meta/css/css-text/text-transform/text-transform-capitalize-010.html.ini
testing/web-platform/meta/css/css-text/text-transform/text-transform-upperlower-001.html.ini
testing/web-platform/meta/css/css-text/text-transform/text-transform-upperlower-003.html.ini
testing/web-platform/meta/css/css-ui/box-sizing-007.html.ini
testing/web-platform/meta/css/css-ui/box-sizing-009.html.ini
testing/web-platform/meta/css/css-ui/text-overflow-021.html.ini
testing/web-platform/meta/css/css-writing-modes/sizing-orthog-prct-vlr-in-htb-001.xht.ini
testing/web-platform/meta/css/css-writing-modes/sizing-orthog-vrl-in-htb-008.xht.ini
testing/web-platform/meta/css/css-writing-modes/sizing-orthog-vrl-in-htb-013.xht.ini
testing/web-platform/meta/css/css-writing-modes/svg-aliasing-001.html.ini
testing/web-platform/meta/css/cssom-view/scrollTop-display-change.html.ini
testing/web-platform/meta/css/selectors/selectors-empty-001.xml.ini
testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-attachment-fixed-inside-transform-1.html.ini
testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/break3/moz-block-fragmentation-001.html.ini
testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/contain/contain-layout-overflow-001.html.ini
testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/contain/contain-layout-overflow-002.html.ini
testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/contain/contain-paint-clip-003.html.ini
testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001a.xhtml.ini
testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-justify-content-horiz-003.xhtml.ini
testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-justify-content-horiz-004.xhtml.ini
testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/images3/color-stop-currentcolor.html.ini
testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/multicol-height-002.xht.ini
testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-orientation-upright-directionality-001.html.ini
testing/web-platform/meta/html/dom/elements/global-attributes/dir_auto-contained-L.html.ini
testing/web-platform/meta/html/dom/elements/global-attributes/dir_auto-contained-R.html.ini
testing/web-platform/meta/html/dom/elements/global-attributes/dir_auto-contained-dir-L.html.ini
testing/web-platform/meta/html/rendering/non-replaced-elements/the-page/body-margin-2a.html.ini
testing/web-platform/meta/html/rendering/non-replaced-elements/the-page/body-margin-2b.html.ini
testing/web-platform/meta/html/rendering/non-replaced-elements/the-page/body-margin-2h.html.ini
testing/web-platform/meta/html/rendering/non-replaced-elements/the-page/body-margin-2k.html.ini
testing/web-platform/meta/html/rendering/non-replaced-elements/the-page/body-margin-2l.html.ini
testing/web-platform/meta/html/semantics/forms/the-textarea-element/textarea-newline-bidi.html.ini
testing/web-platform/meta/html/semantics/forms/the-textarea-element/wrap-reflect-1a.html.ini
testing/web-platform/meta/html/semantics/forms/the-textarea-element/wrap-reflect-1b.html.ini
--- a/browser/base/content/moz.build
+++ b/browser/base/content/moz.build
@@ -35,16 +35,19 @@ with Files("test/forms/**"):
     BUG_COMPONENT = ("Core", "Layout: Form Controls")
 
 with Files("test/historySwipeAnimation/**"):
     BUG_COMPONENT = ("Core", "Widget: Cocoa")
 
 with Files("test/keyboard/**"):
     BUG_COMPONENT = ("Firefox", "Keyboard Navigation")
 
+with Files("test/pageActions/**"):
+    BUG_COMPONENT = ("Firefox", "Toolbars and Customization")
+
 with Files("test/pageinfo/**"):
     BUG_COMPONENT = ("Firefox", "Page Info Window")
 
 with Files("test/performance/**"):
     BUG_COMPONENT = ("Firefox", "General")
 
 with Files("test/performance/browser_appmenu.js"):
     BUG_COMPONENT = ("Firefox", "Menus")
@@ -125,16 +128,19 @@ with Files("browser-fullZoom.js"):
     BUG_COMPONENT = ("Firefox", "Tabbed Browsing")
 
 with Files("browser-gestureSupport.js"):
     BUG_COMPONENT = ("Core", "Widget: Cocoa")
 
 with Files("browser-media.js"):
     BUG_COMPONENT = ("Core", "Audio/Video: Playback")
 
+with Files("browser-pageActions.js"):
+    BUG_COMPONENT = ("Firefox", "Toolbars and Customization")
+
 with Files("browser-places.js"):
     BUG_COMPONENT = ("Firefox", "Bookmarks & History")
 
 with Files("browser-plugins.js"):
     BUG_COMPONENT = ("Core", "Plug-ins")
 
 with Files("browser-safebrowsing.js"):
     BUG_COMPONENT = ("Toolkit", "Safe Browsing")
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/pageActions/.eslintrc.js
@@ -0,0 +1,7 @@
+"use strict";
+
+module.exports = {
+  "extends": [
+    "plugin:mozilla/browser-test",
+  ]
+};
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/pageActions/browser.ini
@@ -0,0 +1,21 @@
+[DEFAULT]
+support-files =
+  head.js
+
+[browser_page_action_menu_add_search_engine.js]
+support-files =
+  page_action_menu_add_search_engine_one.html
+  page_action_menu_add_search_engine_many.html
+  page_action_menu_add_search_engine_same_names.html
+  page_action_menu_add_search_engine_0.xml
+  page_action_menu_add_search_engine_1.xml
+  page_action_menu_add_search_engine_2.xml
+[browser_page_action_menu_clipboard.js]
+subsuite = clipboard
+[browser_page_action_menu_share_mac.js]
+skip-if = os != "mac" # Mac only feature
+[browser_page_action_menu_share_win.js]
+support-files =
+  browser_page_action_menu_share_win.html
+skip-if = os != "win" # Windows only feature
+[browser_page_action_menu.js]
rename from browser/components/urlbar/tests/legacy/browser_page_action_menu.js
rename to browser/base/content/test/pageActions/browser_page_action_menu.js
rename from browser/components/urlbar/tests/browser/browser_page_action_menu_add_search_engine.js
rename to browser/base/content/test/pageActions/browser_page_action_menu_add_search_engine.js
rename from browser/components/urlbar/tests/browser/browser_page_action_menu_clipboard.js
rename to browser/base/content/test/pageActions/browser_page_action_menu_clipboard.js
rename from browser/components/urlbar/tests/browser/browser_page_action_menu_share_mac.js
rename to browser/base/content/test/pageActions/browser_page_action_menu_share_mac.js
rename from browser/components/urlbar/tests/browser/browser_page_action_menu_share_win.html
rename to browser/base/content/test/pageActions/browser_page_action_menu_share_win.html
rename from browser/components/urlbar/tests/browser/browser_page_action_menu_share_win.js
rename to browser/base/content/test/pageActions/browser_page_action_menu_share_win.js
copy from browser/components/urlbar/tests/browser/head-common.js
copy to browser/base/content/test/pageActions/head.js
--- a/browser/components/urlbar/tests/browser/head-common.js
+++ b/browser/base/content/test/pageActions/head.js
@@ -1,65 +1,12 @@
-/* eslint-env mozilla/frame-script */
-
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetters(this, {
-  HttpServer: "resource://testing-common/httpd.js",
-  PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
-  PlacesTestUtils: "resource://testing-common/PlacesTestUtils.jsm",
-  Preferences: "resource://gre/modules/Preferences.jsm",
-  SearchTestUtils: "resource://testing-common/SearchTestUtils.jsm",
-  UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
-  UrlbarTokenizer: "resource:///modules/UrlbarTokenizer.jsm",
-});
-
-SearchTestUtils.init(Assert, registerCleanupFunction);
-
-function is_element_visible(element, msg) {
-  isnot(element, null, "Element should not be null, when checking visibility");
-  ok(BrowserTestUtils.is_visible(element), msg || "Element should be visible");
-}
-
-function is_element_hidden(element, msg) {
-  isnot(element, null, "Element should not be null, when checking visibility");
-  ok(BrowserTestUtils.is_hidden(element), msg || "Element should be hidden");
-}
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-function runHttpServer(scheme, host, port = -1) {
-  let httpserver = new HttpServer();
-  try {
-    httpserver.start(port);
-    port = httpserver.identity.primaryPort;
-    httpserver.identity.setPrimary(scheme, host, port);
-  } catch (ex) {
-    info("We can't launch our http server successfully.");
-  }
-  is(httpserver.identity.has(scheme, host, port), true, `${scheme}://${host}:${port} is listening.`);
-  return httpserver;
-}
-
-function promisePopupShown(popup) {
-  return BrowserTestUtils.waitForPopupEvent(popup, "shown");
-}
-
-function promisePopupHidden(popup) {
-  return BrowserTestUtils.waitForPopupEvent(popup, "hidden");
-}
-
-function promiseSearchComplete(win = window, dontAnimate = false) {
-  return UrlbarTestUtils.promiseSearchComplete(win, dontAnimate);
-}
-
-function promiseAutocompleteResultPopup(inputText,
-                                        win = window,
-                                        fireInputEvent = false) {
-  return UrlbarTestUtils.promiseAutocompleteResultPopup(inputText,
-    win, waitForFocus, fireInputEvent);
-}
+const {PlacesTestUtils} = ChromeUtils.import("resource://testing-common/PlacesTestUtils.jsm", null);
 
 function promisePageActionPanelOpen() {
   let dwu = window.windowUtils;
   return BrowserTestUtils.waitForCondition(() => {
     // Wait for the main page action button to become visible.  It's hidden for
     // some URIs, so depending on when this is called, it may not yet be quite
     // visible.  It's up to the caller to make sure it will be visible.
     info("Waiting for main page action button to have non-0 size");
@@ -168,24 +115,8 @@ function promiseNodeVisible(node) {
     let bounds = dwu.getBoundsWithoutFlushing(node);
     if (bounds.width > 0 && bounds.height > 0) {
       info(`promiseNodeVisible OK, node.id=${node.id} node.localeName=${node.localName}\n`);
       return true;
     }
     return false;
   });
 }
-
-function promiseSpeculativeConnection(httpserver) {
-  return UrlbarTestUtils.promiseSpeculativeConnection(httpserver);
-}
-
-async function waitForAutocompleteResultAt(index) {
-  return UrlbarTestUtils.waitForAutocompleteResultAt(window, index);
-}
-
-function promiseSuggestionsPresent(msg = "") {
-  return UrlbarTestUtils.promiseSuggestionsPresent(window, msg);
-}
-
-function suggestionsPresent() {
-  return UrlbarTestUtils.suggestionsPresent(window);
-}
rename from browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_0.xml
rename to browser/base/content/test/pageActions/page_action_menu_add_search_engine_0.xml
rename from browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_1.xml
rename to browser/base/content/test/pageActions/page_action_menu_add_search_engine_1.xml
rename from browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_2.xml
rename to browser/base/content/test/pageActions/page_action_menu_add_search_engine_2.xml
rename from browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_many.html
rename to browser/base/content/test/pageActions/page_action_menu_add_search_engine_many.html
--- a/browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_many.html
+++ b/browser/base/content/test/pageActions/page_action_menu_add_search_engine_many.html
@@ -1,10 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="UTF-8">
-<link rel="search" type="application/opensearchdescription+xml" title="page_action_menu_add_search_engine_0" href="http://mochi.test:8888/browser/browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_0.xml">
-<link rel="search" type="application/opensearchdescription+xml" title="page_action_menu_add_search_engine_1" href="http://mochi.test:8888/browser/browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_1.xml">
-<link rel="search" type="application/opensearchdescription+xml" title="page_action_menu_add_search_engine_2" href="http://mochi.test:8888/browser/browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_2.xml">
+<link rel="search" type="application/opensearchdescription+xml" title="page_action_menu_add_search_engine_0" href="http://mochi.test:8888/browser/browser/base/content/test/pageActions/page_action_menu_add_search_engine_0.xml">
+<link rel="search" type="application/opensearchdescription+xml" title="page_action_menu_add_search_engine_1" href="http://mochi.test:8888/browser/browser/base/content/test/pageActions/page_action_menu_add_search_engine_1.xml">
+<link rel="search" type="application/opensearchdescription+xml" title="page_action_menu_add_search_engine_2" href="http://mochi.test:8888/browser/browser/base/content/test/pageActions/page_action_menu_add_search_engine_2.xml">
 </head>
 <body></body>
 </html>
rename from browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_one.html
rename to browser/base/content/test/pageActions/page_action_menu_add_search_engine_one.html
--- a/browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_one.html
+++ b/browser/base/content/test/pageActions/page_action_menu_add_search_engine_one.html
@@ -1,8 +1,8 @@
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="UTF-8">
-<link rel="search" type="application/opensearchdescription+xml" title="page_action_menu_add_search_engine_0" href="http://mochi.test:8888/browser/browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_0.xml">
+<link rel="search" type="application/opensearchdescription+xml" title="page_action_menu_add_search_engine_0" href="http://mochi.test:8888/browser/browser/base/content/test/pageActions/page_action_menu_add_search_engine_0.xml">
 </head>
 <body></body>
 </html>
rename from browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_same_names.html
rename to browser/base/content/test/pageActions/page_action_menu_add_search_engine_same_names.html
--- a/browser/components/urlbar/tests/browser/page_action_menu_add_search_engine_same_names.html
+++ b/browser/base/content/test/pageActions/page_action_menu_add_search_engine_same_names.html
@@ -1,9 +1,9 @@
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="UTF-8">
-<link rel="search" type="application/opensearchdescription+xml" title="page_action_menu_add_search_engine_0" href="http://mochi.test:8888/browser/browser/base/content/test/urlbar/page_action_menu_add_search_engine_0.xml">
-<link rel="search" type="application/opensearchdescription+xml" title="page_action_menu_add_search_engine_1" href="http://mochi.test:8888/browser/browser/base/content/test/urlbar/page_action_menu_add_search_engine_0.xml">
+<link rel="search" type="application/opensearchdescription+xml" title="page_action_menu_add_search_engine_0" href="http://mochi.test:8888/browser/browser/base/content/test/pageActions/page_action_menu_add_search_engine_0.xml">
+<link rel="search" type="application/opensearchdescription+xml" title="page_action_menu_add_search_engine_1" href="http://mochi.test:8888/browser/browser/base/content/test/pageActions/page_action_menu_add_search_engine_0.xml">
 </head>
 <body></body>
 </html>
--- a/browser/base/moz.build
+++ b/browser/base/moz.build
@@ -27,16 +27,17 @@ BROWSER_CHROME_MANIFESTS += [
     'content/test/captivePortal/browser.ini',
     'content/test/contextMenu/browser.ini',
     'content/test/favicons/browser.ini',
     'content/test/forms/browser.ini',
     'content/test/general/browser.ini',
     'content/test/historySwipeAnimation/browser.ini',
     'content/test/keyboard/browser.ini',
     'content/test/metaTags/browser.ini',
+    'content/test/pageActions/browser.ini',
     'content/test/pageinfo/browser.ini',
     'content/test/performance/browser.ini',
     'content/test/performance/hidpi/browser.ini',
     'content/test/performance/lowdpi/browser.ini',
     'content/test/permissions/browser.ini',
     'content/test/plugins/browser.ini',
     'content/test/plugins/xbl/browser.ini',
     'content/test/popupNotifications/browser.ini',
--- a/browser/components/urlbar/UrlbarInput.jsm
+++ b/browser/components/urlbar/UrlbarInput.jsm
@@ -220,17 +220,17 @@ class UrlbarInput {
     // Use the selected result if we have one; this should always be the case
     // when the view is open.
     let result = this.view.selectedResult;
     if (result) {
       this.pickResult(event, result);
       return;
     }
 
-    // Use the current value if we don't have a UrlbarMatch e.g. because the
+    // Use the current value if we don't have a UrlbarResult e.g. because the
     // view is closed.
     let url = this.value;
     if (!url) {
       return;
     }
 
     let where = openWhere || this._whereToOpen(event);
 
@@ -271,17 +271,17 @@ class UrlbarInput {
       this.select();
     }
   }
 
   /**
    * Called by the view when a result is picked.
    *
    * @param {Event} event The event that picked the result.
-   * @param {UrlbarMatch} result The result that was picked.
+   * @param {UrlbarResult} result The result that was picked.
    */
   pickResult(event, result) {
     this.setValueFromResult(result);
 
     this.view.close();
 
     // TODO: Work out how we get the user selection behavior, probably via passing
     // it in, since we don't have the old autocomplete controller to work with.
@@ -345,17 +345,17 @@ class UrlbarInput {
     }
 
     this._loadURL(url, where, openParams);
   }
 
   /**
    * Called by the view when moving through results with the keyboard.
    *
-   * @param {UrlbarMatch} result The result that was selected.
+   * @param {UrlbarResult} result The result that was selected.
    */
   setValueFromResult(result) {
     let val;
 
     switch (result.type) {
       case UrlbarUtils.MATCH_TYPE.SEARCH:
         val = result.payload.suggestion || result.payload.query;
         break;
--- a/browser/components/urlbar/UrlbarProviderOpenTabs.jsm
+++ b/browser/components/urlbar/UrlbarProviderOpenTabs.jsm
@@ -10,19 +10,19 @@
  */
 
 var EXPORTED_SYMBOLS = ["UrlbarProviderOpenTabs"];
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 XPCOMUtils.defineLazyModuleGetters(this, {
   Log: "resource://gre/modules/Log.jsm",
   PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
-  UrlbarMatch: "resource:///modules/UrlbarMatch.jsm",
   UrlbarProvider: "resource:///modules/UrlbarUtils.jsm",
   UrlbarProvidersManager: "resource:///modules/UrlbarProvidersManager.jsm",
+  UrlbarResult: "resource:///modules/UrlbarResult.jsm",
   UrlbarUtils: "resource:///modules/UrlbarUtils.jsm",
 });
 
 XPCOMUtils.defineLazyGetter(this, "logger",
   () => Log.repository.getLogger("Places.Urlbar.Provider.OpenTabs"));
 
 /**
  * Class used to create the provider.
@@ -157,18 +157,18 @@ class ProviderOpenTabs extends UrlbarPro
     await conn.executeCached(`
       SELECT url, userContextId
       FROM moz_openpages_temp
     `, {}, (row, cancel) => {
       if (!this.queries.has(queryContext)) {
         cancel();
         return;
       }
-      addCallback(this, new UrlbarMatch(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
-                                        UrlbarUtils.MATCH_SOURCE.TABS, {
+      addCallback(this, new UrlbarResult(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
+                                         UrlbarUtils.MATCH_SOURCE.TABS, {
         url: row.getResultByName("url"),
         userContextId: row.getResultByName("userContextId"),
       }));
     });
     // We are done.
     this.queries.delete(queryContext);
   }
 
--- a/browser/components/urlbar/UrlbarProviderUnifiedComplete.jsm
+++ b/browser/components/urlbar/UrlbarProviderUnifiedComplete.jsm
@@ -11,18 +11,18 @@
  */
 
 var EXPORTED_SYMBOLS = ["UrlbarProviderUnifiedComplete"];
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 XPCOMUtils.defineLazyModuleGetters(this, {
   Log: "resource://gre/modules/Log.jsm",
   PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
-  UrlbarMatch: "resource:///modules/UrlbarMatch.jsm",
   UrlbarProvider: "resource:///modules/UrlbarUtils.jsm",
+  UrlbarResult: "resource:///modules/UrlbarResult.jsm",
   UrlbarUtils: "resource:///modules/UrlbarUtils.jsm",
   PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
 });
 
 XPCOMUtils.defineLazyServiceGetter(this, "unifiedComplete",
   "@mozilla.org/autocomplete/search;1?name=unifiedcomplete",
   "nsIAutoCompleteSearch");
 
@@ -181,17 +181,17 @@ function convertResultToMatches(context,
     // wrong order here, but that's a task for the UrlbarMuxer.
     let url = result.getFinalCompleteValueAt(i);
     if (urls.has(url)) {
       continue;
     }
     urls.add(url);
     // Not used yet: result.getLabelAt(i)
     let style = result.getStyleAt(i);
-    let match = makeUrlbarMatch(context.tokens, {
+    let match = makeUrlbarResult(context.tokens, {
       url,
       icon: result.getImageAt(i),
       style,
       comment: result.getCommentAt(i),
       firstToken: context.tokens[0],
     });
     // Should not happen, but better safe than sorry.
     if (!match) {
@@ -207,102 +207,102 @@ function convertResultToMatches(context,
         context.preselected = true;
       }
     }
   }
   return {matches, done};
 }
 
 /**
- * Creates a new UrlbarMatch from the provided data.
+ * Creates a new UrlbarResult from the provided data.
  * @param {array} tokens the search tokens.
  * @param {object} info includes properties from the legacy match.
- * @returns {object} an UrlbarMatch
+ * @returns {object} an UrlbarResult
  */
-function makeUrlbarMatch(tokens, info) {
+function makeUrlbarResult(tokens, info) {
   let action = PlacesUtils.parseActionUrl(info.url);
   if (action) {
     switch (action.type) {
       case "searchengine":
-        return new UrlbarMatch(
+        return new UrlbarResult(
           UrlbarUtils.MATCH_TYPE.SEARCH,
           UrlbarUtils.MATCH_SOURCE.SEARCH,
-          ...UrlbarMatch.payloadAndSimpleHighlights(tokens, {
+          ...UrlbarResult.payloadAndSimpleHighlights(tokens, {
             engine: [action.params.engineName, true],
             suggestion: [action.params.searchSuggestion, true],
             keyword: [action.params.alias, true],
             query: [action.params.searchQuery, true],
             icon: [info.icon, false],
           })
         );
       case "keyword":
-        return new UrlbarMatch(
+        return new UrlbarResult(
           UrlbarUtils.MATCH_TYPE.KEYWORD,
           UrlbarUtils.MATCH_SOURCE.BOOKMARKS,
-          ...UrlbarMatch.payloadAndSimpleHighlights(tokens, {
+          ...UrlbarResult.payloadAndSimpleHighlights(tokens, {
             url: [action.params.url, true],
             keyword: [info.firstToken, true],
             postData: [action.params.postData, false],
             icon: [info.icon, false],
           })
         );
       case "extension":
-        return new UrlbarMatch(
+        return new UrlbarResult(
           UrlbarUtils.MATCH_TYPE.OMNIBOX,
           UrlbarUtils.MATCH_SOURCE.OTHER_NETWORK,
-          ...UrlbarMatch.payloadAndSimpleHighlights(tokens, {
+          ...UrlbarResult.payloadAndSimpleHighlights(tokens, {
             title: [info.comment, true],
             content: [action.params.content, true],
             keyword: [action.params.keyword, true],
             icon: [info.icon, false],
           })
         );
       case "remotetab":
-        return new UrlbarMatch(
+        return new UrlbarResult(
           UrlbarUtils.MATCH_TYPE.REMOTE_TAB,
           UrlbarUtils.MATCH_SOURCE.TABS,
-          ...UrlbarMatch.payloadAndSimpleHighlights(tokens, {
+          ...UrlbarResult.payloadAndSimpleHighlights(tokens, {
             url: [action.params.url, true],
             title: [info.comment, true],
             device: [action.params.deviceName, true],
             icon: [info.icon, false],
           })
         );
       case "switchtab":
-        return new UrlbarMatch(
+        return new UrlbarResult(
           UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
           UrlbarUtils.MATCH_SOURCE.TABS,
-          ...UrlbarMatch.payloadAndSimpleHighlights(tokens, {
+          ...UrlbarResult.payloadAndSimpleHighlights(tokens, {
             url: [action.params.url, true],
             title: [info.comment, true],
             device: [action.params.deviceName, true],
             icon: [info.icon, false],
           })
         );
       case "visiturl":
-        return new UrlbarMatch(
+        return new UrlbarResult(
           UrlbarUtils.MATCH_TYPE.URL,
           UrlbarUtils.MATCH_SOURCE.OTHER_LOCAL,
-          ...UrlbarMatch.payloadAndSimpleHighlights(tokens, {
+          ...UrlbarResult.payloadAndSimpleHighlights(tokens, {
             title: [info.comment, true],
             url: [action.params.url, true],
             icon: [info.icon, false],
           })
         );
       default:
         Cu.reportError(`Unexpected action type: ${action.type}`);
         return null;
     }
   }
 
   if (info.style.includes("priority-search")) {
-    return new UrlbarMatch(
+    return new UrlbarResult(
       UrlbarUtils.MATCH_TYPE.SEARCH,
       UrlbarUtils.MATCH_SOURCE.SEARCH,
-      ...UrlbarMatch.payloadAndSimpleHighlights(tokens, {
+      ...UrlbarResult.payloadAndSimpleHighlights(tokens, {
         engine: [info.comment, true],
         icon: [info.icon, false],
       })
     );
   }
 
   // This is a normal url/title tuple.
   let source;
@@ -316,19 +316,19 @@ function makeUrlbarMatch(tokens, info) {
       [comment, tags] = info.comment.split(TITLE_TAGS_SEPARATOR);
       tags = tags.split(",").map(t => t.trim());
     }
   } else if (info.style.includes("preloaded-top-sites")) {
     source = UrlbarUtils.MATCH_SOURCE.OTHER_LOCAL;
   } else {
     source = UrlbarUtils.MATCH_SOURCE.HISTORY;
   }
-  return new UrlbarMatch(
+  return new UrlbarResult(
     UrlbarUtils.MATCH_TYPE.URL,
     source,
-    ...UrlbarMatch.payloadAndSimpleHighlights(tokens, {
+    ...UrlbarResult.payloadAndSimpleHighlights(tokens, {
       url: [info.url, true],
       icon: [info.icon, false],
       title: [comment, true],
       tags: [tags, true],
     })
   );
 }
rename from browser/components/urlbar/UrlbarMatch.jsm
rename to browser/components/urlbar/UrlbarResult.jsm
--- a/browser/components/urlbar/UrlbarMatch.jsm
+++ b/browser/components/urlbar/UrlbarResult.jsm
@@ -1,35 +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";
 
 /**
- * This module exports a urlbar match class, each representing a single match.
- * A match is a single search result found by a provider, that can be passed
- * from the model to the view, through the controller. It is mainly defined by
- * a type of the match, and a payload, containing the data. A few getters allow
- * to retrieve information common to all the match types.
+ * This module exports a urlbar result class, each representing a single result
+ * found by a provider that can be passed from the model to the view through
+ * the controller. It is mainly defined by a match type, and a payload,
+ * containing the data. A few getters allow to retrieve information common to all
+ * the match types.
  */
 
-var EXPORTED_SYMBOLS = ["UrlbarMatch"];
+var EXPORTED_SYMBOLS = ["UrlbarResult"];
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 XPCOMUtils.defineLazyModuleGetters(this, {
   UrlbarUtils: "resource:///modules/UrlbarUtils.jsm",
 });
 
 /**
- * Class used to create a match.
+ * Class used to create a single result.
  */
-class UrlbarMatch {
+class UrlbarResult {
   /**
-   * Creates a match.
+   * Creates a result.
    * @param {integer} matchType one of UrlbarUtils.MATCH_TYPE.* values
    * @param {integer} matchSource one of UrlbarUtils.MATCH_SOURCE.* values
    * @param {object} payload data for this match. A payload should always
    *        contain a way to extract a final url to visit. The url getter
    *        should have a case for each of the types.
    * @param {object} [payloadHighlights] payload highlights, if any. Each
    *        property in the payload may have a corresponding property in this
    *        object. The value of each property should be an array of [index,
@@ -120,17 +120,17 @@ class UrlbarMatch {
   }
 
   /**
    * A convenience function that takes a payload annotated with should-highlight
    * bools and returns the payload and the payload's highlights.  Use this
    * function when the highlighting required by your payload is based on simple
    * substring matching, as done by UrlbarUtils.getTokenMatches().  Pass the
    * return values as the `payload` and `payloadHighlights` params of the
-   * UrlbarMatch constructor.
+   * UrlbarResult constructor.
    *
    * @param {array} tokens The tokens that should be highlighted in each of the
    *        payload properties.
    * @param {object} payloadInfo An object that looks like this:
    *        {
    *          payloadPropertyName: [payloadPropertyValue, shouldHighlight],
    *          ...
    *        }
--- a/browser/components/urlbar/UrlbarUtils.jsm
+++ b/browser/components/urlbar/UrlbarUtils.jsm
@@ -61,17 +61,17 @@ var UrlbarUtils = {
     // Can be delayed, contains results coming from the session or the profile.
     PROFILE: 2,
     // Can be delayed, contains results coming from the network.
     NETWORK: 3,
     // Can be delayed, contains results coming from unknown sources.
     EXTENSION: 4,
   },
 
-  // Defines UrlbarMatch types.
+  // Defines UrlbarResult types.
   MATCH_TYPE: {
     // An open tab.
     // Payload: { icon, url, userContextId }
     TAB_SWITCH: 1,
     // A search suggestion or engine.
     // Payload: { icon, suggestion, keyword, query }
     SEARCH: 2,
     // A common url/title tuple, may be a bookmark with tags.
@@ -346,19 +346,19 @@ class UrlbarProvider {
    */
   get sources() {
     throw new Error("Trying to access the base class, must be overridden");
   }
   /**
    * Starts querying.
    * @param {UrlbarQueryContext} queryContext The query context object
    * @param {function} addCallback Callback invoked by the provider to add a new
-   *        match. A UrlbarMatch should be passed to it.
+   *        result. A UrlbarResult should be passed to it.
    * @note Extended classes should return a Promise resolved when the provider
-   *       is done searching AND returning matches.
+   *       is done searching AND returning results.
    * @abstract
    */
   startQuery(queryContext, addCallback) {
     throw new Error("Trying to access the base class, must be overridden");
   }
   /**
    * Cancels a running query,
    * @param {UrlbarQueryContext} queryContext the query context object to cancel
--- a/browser/components/urlbar/UrlbarView.jsm
+++ b/browser/components/urlbar/UrlbarView.jsm
@@ -55,17 +55,17 @@ class UrlbarView {
    * @returns {boolean}
    *   Whether the panel is open.
    */
   get isOpen() {
     return this.panel.state == "open" || this.panel.state == "showing";
   }
 
   /**
-   * @returns {UrlbarMatch}
+   * @returns {UrlbarResult}
    *   The currently selected result.
    */
   get selectedResult() {
     if (!this.isOpen) {
       return null;
     }
 
     let resultIndex = this._selected.getAttribute("resultIndex");
--- a/browser/components/urlbar/moz.build
+++ b/browser/components/urlbar/moz.build
@@ -3,22 +3,22 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 with Files("**"):
     BUG_COMPONENT = ("Firefox", "Address Bar")
 
 EXTRA_JS_MODULES += [
     'UrlbarController.jsm',
     'UrlbarInput.jsm',
-    'UrlbarMatch.jsm',
     'UrlbarMuxerUnifiedComplete.jsm',
     'UrlbarPrefs.jsm',
     'UrlbarProviderOpenTabs.jsm',
     'UrlbarProvidersManager.jsm',
     'UrlbarProviderUnifiedComplete.jsm',
+    'UrlbarResult.jsm',
     'UrlbarTokenizer.jsm',
     'UrlbarUtils.jsm',
     'UrlbarValueFormatter.jsm',
     'UrlbarView.jsm',
 ]
 
 TESTING_JS_MODULES += [
     'tests/UrlbarTestUtils.jsm',
--- a/browser/components/urlbar/tests/browser/browser.ini
+++ b/browser/components/urlbar/tests/browser/browser.ini
@@ -15,32 +15,16 @@ support-files = file_bug562649.html
 support-files =
   redirect_bug623155.sjs
 [browser_bug783614.js]
 skip-if = true # Bug 1521490
 [browser_bug1025195_switchToTabHavingURI_aOpenParams.js]
 [browser_locationBarExternalLoad.js]
 skip-if = true # Bug 1521490
 [browser_moz_action_link.js]
-[browser_page_action_menu_add_search_engine.js]
-support-files =
-  page_action_menu_add_search_engine_one.html
-  page_action_menu_add_search_engine_many.html
-  page_action_menu_add_search_engine_same_names.html
-  page_action_menu_add_search_engine_0.xml
-  page_action_menu_add_search_engine_1.xml
-  page_action_menu_add_search_engine_2.xml
-[browser_page_action_menu_clipboard.js]
-subsuite = clipboard
-[browser_page_action_menu_share_mac.js]
-skip-if = os != "mac" # Mac only feature
-[browser_page_action_menu_share_win.js]
-support-files =
-  browser_page_action_menu_share_win.html
-skip-if = os != "win" # Windows only feature
 [browser_populateAfterPushState.js]
 [browser_urlbar_blanking.js]
 support-files =
   file_blank_but_not_blank.html
 [browser_urlbar_content_opener.js]
 [browser_urlbar_locationchange_urlbar_edit_dos.js]
 support-files =
   file_urlbar_edit_dos.html
--- a/browser/components/urlbar/tests/browser/head-common.js
+++ b/browser/components/urlbar/tests/browser/head-common.js
@@ -51,134 +51,16 @@ function promiseSearchComplete(win = win
 
 function promiseAutocompleteResultPopup(inputText,
                                         win = window,
                                         fireInputEvent = false) {
   return UrlbarTestUtils.promiseAutocompleteResultPopup(inputText,
     win, waitForFocus, fireInputEvent);
 }
 
-function promisePageActionPanelOpen() {
-  let dwu = window.windowUtils;
-  return BrowserTestUtils.waitForCondition(() => {
-    // Wait for the main page action button to become visible.  It's hidden for
-    // some URIs, so depending on when this is called, it may not yet be quite
-    // visible.  It's up to the caller to make sure it will be visible.
-    info("Waiting for main page action button to have non-0 size");
-    let bounds = dwu.getBoundsWithoutFlushing(BrowserPageActions.mainButtonNode);
-    return bounds.width > 0 && bounds.height > 0;
-  }).then(() => {
-    // Wait for the panel to become open, by clicking the button if necessary.
-    info("Waiting for main page action panel to be open");
-    if (BrowserPageActions.panelNode.state == "open") {
-      return Promise.resolve();
-    }
-    let shownPromise = promisePageActionPanelShown();
-    EventUtils.synthesizeMouseAtCenter(BrowserPageActions.mainButtonNode, {});
-    return shownPromise;
-  }).then(() => {
-    // Wait for items in the panel to become visible.
-    return promisePageActionViewChildrenVisible(BrowserPageActions.mainViewNode);
-  });
-}
-
-async function waitForActivatedActionPanel() {
-  if (!BrowserPageActions.activatedActionPanelNode) {
-    info("Waiting for activated-action panel to be added to mainPopupSet");
-    await new Promise(resolve => {
-      let observer = new MutationObserver(mutations => {
-        if (BrowserPageActions.activatedActionPanelNode) {
-          observer.disconnect();
-          resolve();
-        }
-      });
-      let popupSet = document.getElementById("mainPopupSet");
-      observer.observe(popupSet, { childList: true });
-    });
-    info("Activated-action panel added to mainPopupSet");
-  }
-  if (!BrowserPageActions.activatedActionPanelNode.state == "open") {
-    info("Waiting for activated-action panel popupshown");
-    await promisePanelShown(BrowserPageActions.activatedActionPanelNode);
-    info("Got activated-action panel popupshown");
-  }
-  let panelView =
-    BrowserPageActions.activatedActionPanelNode.querySelector("panelview");
-  if (panelView) {
-    await BrowserTestUtils.waitForEvent(
-      BrowserPageActions.activatedActionPanelNode,
-      "ViewShown"
-    );
-    await promisePageActionViewChildrenVisible(panelView);
-  }
-  return panelView;
-}
-
-function promisePageActionPanelShown() {
-  return promisePanelShown(BrowserPageActions.panelNode);
-}
-
-function promisePageActionPanelHidden() {
-  return promisePanelHidden(BrowserPageActions.panelNode);
-}
-
-function promisePanelShown(panelIDOrNode) {
-  return promisePanelEvent(panelIDOrNode, "popupshown");
-}
-
-function promisePanelHidden(panelIDOrNode) {
-  return promisePanelEvent(panelIDOrNode, "popuphidden");
-}
-
-function promisePanelEvent(panelIDOrNode, eventType) {
-  return new Promise(resolve => {
-    let panel = panelIDOrNode;
-    if (typeof panel == "string") {
-      panel = document.getElementById(panelIDOrNode);
-      if (!panel) {
-        throw new Error(`Panel with ID "${panelIDOrNode}" does not exist.`);
-      }
-    }
-    if ((eventType == "popupshown" && panel.state == "open") ||
-        (eventType == "popuphidden" && panel.state == "closed")) {
-      executeSoon(resolve);
-      return;
-    }
-    panel.addEventListener(eventType, () => {
-      executeSoon(resolve);
-    }, { once: true });
-  });
-}
-
-function promisePageActionViewShown() {
-  info("promisePageActionViewShown waiting for ViewShown");
-  return BrowserTestUtils.waitForEvent(BrowserPageActions.panelNode, "ViewShown").then(async event => {
-    let panelViewNode = event.originalTarget;
-    await promisePageActionViewChildrenVisible(panelViewNode);
-    return panelViewNode;
-  });
-}
-
-function promisePageActionViewChildrenVisible(panelViewNode) {
-  return promiseNodeVisible(panelViewNode.firstElementChild.firstElementChild);
-}
-
-function promiseNodeVisible(node) {
-  info(`promiseNodeVisible waiting, node.id=${node.id} node.localeName=${node.localName}\n`);
-  let dwu = window.windowUtils;
-  return BrowserTestUtils.waitForCondition(() => {
-    let bounds = dwu.getBoundsWithoutFlushing(node);
-    if (bounds.width > 0 && bounds.height > 0) {
-      info(`promiseNodeVisible OK, node.id=${node.id} node.localeName=${node.localName}\n`);
-      return true;
-    }
-    return false;
-  });
-}
-
 function promiseSpeculativeConnection(httpserver) {
   return UrlbarTestUtils.promiseSpeculativeConnection(httpserver);
 }
 
 async function waitForAutocompleteResultAt(index) {
   return UrlbarTestUtils.waitForAutocompleteResultAt(window, index);
 }
 
--- a/browser/components/urlbar/tests/browser/head.js
+++ b/browser/components/urlbar/tests/browser/head.js
@@ -9,17 +9,17 @@
 
 let sandbox;
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 XPCOMUtils.defineLazyModuleGetters(this, {
   PromiseUtils: "resource://gre/modules/PromiseUtils.jsm",
   Services: "resource://gre/modules/Services.jsm",
   UrlbarController: "resource:///modules/UrlbarController.jsm",
-  UrlbarMatch: "resource:///modules/UrlbarMatch.jsm",
+  UrlbarResult: "resource:///modules/UrlbarResult.jsm",
   UrlbarQueryContext: "resource:///modules/UrlbarUtils.jsm",
   UrlbarUtils: "resource:///modules/UrlbarUtils.jsm",
 });
 
 /* import-globals-from head-common.js */
 Services.scriptloader.loadSubScript(
   "chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/head-common.js",
   this);
--- a/browser/components/urlbar/tests/legacy/browser.ini
+++ b/browser/components/urlbar/tests/legacy/browser.ini
@@ -37,18 +37,16 @@ skip-if = (verify && debug && (os == 'wi
 [browser_bug1225194-remotetab.js]
 [browser_bug304198.js]
 [browser_bug556061.js]
 subsuite = clipboard
 [browser_canonizeURL.js]
 [browser_dragdropURL.js]
 [browser_locationBarCommand.js]
 [browser_new_tab_urlbar_reset.js]
-[browser_page_action_menu.js]
-skip-if = os != "win" # Windows only feature
 [browser_pasteAndGo.js]
 subsuite = clipboard
 [../browser/browser_populateAfterPushState.js]
 [browser_removeUnsafeProtocolsFromURLBarPaste.js]
 subsuite = clipboard
 [browser_search_favicon.js]
 [browser_tabMatchesInAwesomebar.js]
 support-files =
@@ -127,31 +125,16 @@ skip-if = (os == "linux" || os == "mac")
 [../browser/browser_bug562649.js]
 support-files = ../browser/file_bug562649.html
 [../browser/browser_bug623155.js]
 support-files =
   ../browser/redirect_bug623155.sjs
 [../browser/browser_bug783614.js]
 [../browser/browser_locationBarExternalLoad.js]
 [../browser/browser_moz_action_link.js]
-[../browser/browser_page_action_menu_add_search_engine.js]
-support-files =
-  ../browser/page_action_menu_add_search_engine_one.html
-  ../browser/page_action_menu_add_search_engine_many.html
-  ../browser/page_action_menu_add_search_engine_same_names.html
-  ../browser/page_action_menu_add_search_engine_0.xml
-  ../browser/page_action_menu_add_search_engine_1.xml
-  ../browser/page_action_menu_add_search_engine_2.xml
-[../browser/browser_page_action_menu_clipboard.js]
-subsuite = clipboard
-[../browser/browser_page_action_menu_share_mac.js]
-skip-if = os != "mac" # Mac only feature
-[../browser/browser_page_action_menu_share_win.js]
-support-files =
-  ../browser/browser_page_action_menu_share_win.html
 [../browser/browser_urlbarCopying.js]
 subsuite = clipboard
 support-files =
   ../browser/authenticate.sjs
 [../browser/browser_urlbar_blanking.js]
 support-files =
   ../browser/file_blank_but_not_blank.html
 [../browser/browser_urlbar_content_opener.js]
--- a/browser/components/urlbar/tests/legacy/browser_urlbarDecode.js
+++ b/browser/components/urlbar/tests/legacy/browser_urlbarDecode.js
@@ -1,17 +1,17 @@
 "use strict";
 
 // This test makes sure (1) you can't break the urlbar by typing particular JSON
 // or JS fragments into it, (2) urlbar.textValue shows URLs unescaped, and (3)
 // the urlbar also shows the URLs embedded in action URIs unescaped.  See bug
 // 1233672.
 
 XPCOMUtils.defineLazyModuleGetters(this, {
-  UrlbarMatch: "resource:///modules/UrlbarMatch.jsm",
+  UrlbarResult: "resource:///modules/UrlbarResult.jsm",
   UrlbarUtils: "resource:///modules/UrlbarUtils.jsm",
 });
 
 add_task(async function injectJSON() {
   let inputStrs = [
     'http://example.com/ ", "url": "bar',
     "http://example.com/\\",
     'http://example.com/"',
@@ -28,19 +28,19 @@ add_task(async function injectJSON() {
   gURLBar.handleRevert();
   gURLBar.blur();
 });
 
 add_task(function losslessDecode() {
   let urlNoScheme = "example.com/\u30a2\u30a4\u30a6\u30a8\u30aa";
   let url = "http://" + urlNoScheme;
   if (Services.prefs.getBoolPref("browser.urlbar.quantumbar", true)) {
-    const result = new UrlbarMatch(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
-                                   UrlbarUtils.MATCH_SOURCE.TABS,
-                                   { url });
+    const result = new UrlbarResult(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
+                                    UrlbarUtils.MATCH_SOURCE.TABS,
+                                    { url });
     gURLBar.setValueFromResult(result);
   } else {
     gURLBar.textValue = url;
   }
   // Since this is directly setting textValue, it is expected to be trimmed.
   Assert.equal(gURLBar.inputField.value, urlNoScheme,
                "The string displayed in the textbox should not be escaped");
   gURLBar.value = "";
--- a/browser/components/urlbar/tests/unit/head.js
+++ b/browser/components/urlbar/tests/unit/head.js
@@ -14,20 +14,20 @@ if (commonFile) {
 // Put any other stuff relative to this test folder below.
 ChromeUtils.import("resource:///modules/UrlbarUtils.jsm");
 XPCOMUtils.defineLazyModuleGetters(this, {
   HttpServer: "resource://testing-common/httpd.js",
   PlacesTestUtils: "resource://testing-common/PlacesTestUtils.jsm",
   PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
   UrlbarController: "resource:///modules/UrlbarController.jsm",
   UrlbarInput: "resource:///modules/UrlbarInput.jsm",
-  UrlbarMatch: "resource:///modules/UrlbarMatch.jsm",
   UrlbarPrefs: "resource:///modules/UrlbarPrefs.jsm",
   UrlbarProviderOpenTabs: "resource:///modules/UrlbarProviderOpenTabs.jsm",
   UrlbarProvidersManager: "resource:///modules/UrlbarProvidersManager.jsm",
+  UrlbarResult: "resource:///modules/UrlbarResult.jsm",
   UrlbarTokenizer: "resource:///modules/UrlbarTokenizer.jsm",
 });
 
 // ================================================
 // Load mocking/stubbing library, sinon
 // docs: http://sinonjs.org/releases/v2.3.2/
 // Sinon needs Timer.jsm for setTimeout etc.
 ChromeUtils.import("resource://gre/modules/Timer.jsm");
--- a/browser/components/urlbar/tests/unit/test_UrlbarController_integration.js
+++ b/browser/components/urlbar/tests/unit/test_UrlbarController_integration.js
@@ -5,19 +5,19 @@
  * These tests test the UrlbarController in association with the model.
  */
 
 "use strict";
 
 ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
 
 const TEST_URL = "http://example.com";
-const match = new UrlbarMatch(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
-                              UrlbarUtils.MATCH_SOURCE.TABS,
-                              { url: TEST_URL });
+const match = new UrlbarResult(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
+                               UrlbarUtils.MATCH_SOURCE.TABS,
+                               { url: TEST_URL });
 let controller;
 
 /**
  * Asserts that the query context has the expected values.
  *
  * @param {UrlbarQueryContext} context
  * @param {object} expectedValues The expected values for the UrlbarQueryContext.
  */
--- a/browser/components/urlbar/tests/unit/test_UrlbarController_telemetry.js
+++ b/browser/components/urlbar/tests/unit/test_UrlbarController_telemetry.js
@@ -4,19 +4,19 @@
 /**
  * These tests unit test the functionality of UrlbarController by stubbing out the
  * model and providing stubs to be called.
  */
 
 "use strict";
 
 const TEST_URL = "http://example.com";
-const MATCH = new UrlbarMatch(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
-                              UrlbarUtils.MATCH_SOURCE.TABS,
-                              { url: TEST_URL });
+const MATCH = new UrlbarResult(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
+                               UrlbarUtils.MATCH_SOURCE.TABS,
+                               { url: TEST_URL });
 const TELEMETRY_1ST_RESULT = "PLACES_AUTOCOMPLETE_1ST_RESULT_TIME_MS";
 const TELEMETRY_6_FIRST_RESULTS = "PLACES_AUTOCOMPLETE_6_FIRST_RESULTS_TIME_MS";
 
 let controller;
 let firstHistogram;
 let sixthHistogram;
 
 /**
@@ -151,19 +151,19 @@ add_task(async function test_n_autocompl
     "Should have recorded one time for the first result");
   Assert.equal(getHistogramReportsCount(first6Results), 0,
     "Should not have recorded any times (first 6 results)");
 
   // Now add 5 more results, so that the first 6 results is triggered.
   for (let i = 0; i < 5; i++) {
     resultsPromise = promiseControllerNotification(controller, "onQueryResults");
     provider.addResults([
-      new UrlbarMatch(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
-                      UrlbarUtils.MATCH_SOURCE.TABS,
-                      { url: TEST_URL + "/i" }),
+      new UrlbarResult(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
+                       UrlbarUtils.MATCH_SOURCE.TABS,
+                       { url: TEST_URL + "/i" }),
     ]);
     await resultsPromise;
   }
 
   Assert.ok(!TelemetryStopwatch.running(TELEMETRY_1ST_RESULT, context),
     "Should have stopped the first stopwatch");
   Assert.ok(!TelemetryStopwatch.running(TELEMETRY_6_FIRST_RESULTS, context),
     "Should have stopped the first 6 results stopwatch");
@@ -173,19 +173,19 @@ add_task(async function test_n_autocompl
   Assert.deepEqual(updatedResults, firstResults,
     "Should not have changed the histogram for the first result");
   Assert.equal(getHistogramReportsCount(updated6Results), 1,
     "Should have recorded one time for the first 6 results");
 
   // Add one more, to check neither are updated.
   resultsPromise = promiseControllerNotification(controller, "onQueryResults");
   provider.addResults([
-    new UrlbarMatch(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
-                    UrlbarUtils.MATCH_SOURCE.TABS,
-                    { url: TEST_URL + "/6" }),
+    new UrlbarResult(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
+                     UrlbarUtils.MATCH_SOURCE.TABS,
+                     { url: TEST_URL + "/6" }),
   ]);
   await resultsPromise;
 
   let secondUpdateResults = firstHistogram.snapshot();
   let secondUpdate6Results = sixthHistogram.snapshot();
   Assert.deepEqual(secondUpdateResults, firstResults,
     "Should not have changed the histogram for the first result");
   Assert.equal(getHistogramReportsCount(secondUpdate6Results), 1,
--- a/browser/components/urlbar/tests/unit/test_muxer.js
+++ b/browser/components/urlbar/tests/unit/test_muxer.js
@@ -18,25 +18,25 @@ add_task(async function test_muxer() {
   Assert.throws(() => UrlbarProvidersManager.registerMuxer({
                   name: "test",
                   sort: "no",
                 }),
                 /invalid muxer/,
                 "Should throw with invalid sort");
 
   let matches = [
-    new UrlbarMatch(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
-                    UrlbarUtils.MATCH_SOURCE.TABS,
-                    { url: "http://mozilla.org/tab/" }),
-    new UrlbarMatch(UrlbarUtils.MATCH_TYPE.URL,
-                    UrlbarUtils.MATCH_SOURCE.BOOKMARKS,
-                    { url: "http://mozilla.org/bookmark/" }),
-    new UrlbarMatch(UrlbarUtils.MATCH_TYPE.URL,
-                    UrlbarUtils.MATCH_SOURCE.HISTORY,
-                    { url: "http://mozilla.org/history/" }),
+    new UrlbarResult(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
+                     UrlbarUtils.MATCH_SOURCE.TABS,
+                     { url: "http://mozilla.org/tab/" }),
+    new UrlbarResult(UrlbarUtils.MATCH_TYPE.URL,
+                     UrlbarUtils.MATCH_SOURCE.BOOKMARKS,
+                     { url: "http://mozilla.org/bookmark/" }),
+    new UrlbarResult(UrlbarUtils.MATCH_TYPE.URL,
+                     UrlbarUtils.MATCH_SOURCE.HISTORY,
+                     { url: "http://mozilla.org/history/" }),
   ];
 
   let providerName = registerBasicTestProvider(matches);
   let context = createContext(undefined, {providers: [providerName]});
   let controller = new UrlbarController({
     browserWindow: {
       location: {
         href: AppConstants.BROWSER_CHROME_URL,
--- a/browser/components/urlbar/tests/unit/test_providersManager.js
+++ b/browser/components/urlbar/tests/unit/test_providersManager.js
@@ -24,19 +24,19 @@ add_task(async function test_providers()
   Assert.throws(() => UrlbarProvidersManager.registerProvider({
                   name: "test",
                   startQuery: () => {},
                   cancelQuery: "no",
                 }),
                 /invalid provider/,
                 "Should throw with invalid cancelQuery");
 
-  let match = new UrlbarMatch(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
-                              UrlbarUtils.MATCH_SOURCE.TABS,
-                              { url: "http://mozilla.org/foo/" });
+  let match = new UrlbarResult(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
+                               UrlbarUtils.MATCH_SOURCE.TABS,
+                               { url: "http://mozilla.org/foo/" });
 
   let providerName = registerBasicTestProvider([match]);
   let context = createContext(undefined, {providers: [providerName]});
   let controller = new UrlbarController({
     browserWindow: {
       location: {
         href: AppConstants.BROWSER_CHROME_URL,
       },
--- a/browser/components/urlbar/tests/unit/test_providersManager_filtering.js
+++ b/browser/components/urlbar/tests/unit/test_providersManager_filtering.js
@@ -1,17 +1,17 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 add_task(async function test_filtering() {
-  let match = new UrlbarMatch(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
-                              UrlbarUtils.MATCH_SOURCE.TABS,
-                              { url: "http://mozilla.org/foo/" });
+  let match = new UrlbarResult(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
+                               UrlbarUtils.MATCH_SOURCE.TABS,
+                               { url: "http://mozilla.org/foo/" });
   let providerName = registerBasicTestProvider([match]);
   let context = createContext(undefined, {providers: [providerName]});
   let controller = new UrlbarController({
     browserWindow: {
       location: {
         href: AppConstants.BROWSER_CHROME_URL,
       },
     },
@@ -24,19 +24,19 @@ add_task(async function test_filtering()
     promiseControllerNotification(controller, "onQueryFinished"),
   ]);
   await controller.startQuery(context);
   await promise;
   Services.prefs.clearUserPref("browser.urlbar.suggest.openpage");
 
   let matches = [
     match,
-    new UrlbarMatch(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
-                    UrlbarUtils.MATCH_SOURCE.HISTORY,
-                    { url: "http://mozilla.org/foo/" }),
+    new UrlbarResult(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
+                     UrlbarUtils.MATCH_SOURCE.HISTORY,
+                     { url: "http://mozilla.org/foo/" }),
   ];
   providerName = registerBasicTestProvider(matches);
   context = createContext(undefined, {providers: [providerName]});
 
   info("Disable one of the sources, should get a single match");
   Services.prefs.setBoolPref("browser.urlbar.suggest.history", false);
   promise = Promise.all([
     promiseControllerNotification(controller, "onQueryResults"),
@@ -62,22 +62,22 @@ add_task(async function test_filtering()
 add_task(async function test_filter_javascript() {
   let controller = new UrlbarController({
     browserWindow: {
       location: {
         href: AppConstants.BROWSER_CHROME_URL,
       },
     },
   });
-  let match = new UrlbarMatch(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
-                              UrlbarUtils.MATCH_SOURCE.TABS,
-                              { url: "http://mozilla.org/foo/" });
-  let jsMatch = new UrlbarMatch(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
-                                UrlbarUtils.MATCH_SOURCE.HISTORY,
-                                { url: "javascript:foo" });
+  let match = new UrlbarResult(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
+                               UrlbarUtils.MATCH_SOURCE.TABS,
+                               { url: "http://mozilla.org/foo/" });
+  let jsMatch = new UrlbarResult(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
+                                 UrlbarUtils.MATCH_SOURCE.HISTORY,
+                                 { url: "javascript:foo" });
   let providerName = registerBasicTestProvider([match, jsMatch]);
   let context = createContext(undefined, {providers: [providerName]});
 
   info("By default javascript should be filtered out");
   let promise = promiseControllerNotification(controller, "onQueryResults");
   await controller.startQuery(context, controller);
   await promise;
   Assert.deepEqual(context.results, [match]);
@@ -105,22 +105,22 @@ add_task(async function test_filter_sour
     browserWindow: {
       location: {
         href: AppConstants.BROWSER_CHROME_URL,
       },
     },
   });
 
   let goodMatches = [
-    new UrlbarMatch(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
-                    UrlbarUtils.MATCH_SOURCE.TABS,
-                    { url: "http://mozilla.org/foo/" }),
-    new UrlbarMatch(UrlbarUtils.MATCH_TYPE.URL,
-                    UrlbarUtils.MATCH_SOURCE.HISTORY,
-                    { url: "http://mozilla.org/foo/" }),
+    new UrlbarResult(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
+                     UrlbarUtils.MATCH_SOURCE.TABS,
+                     { url: "http://mozilla.org/foo/" }),
+    new UrlbarResult(UrlbarUtils.MATCH_TYPE.URL,
+                     UrlbarUtils.MATCH_SOURCE.HISTORY,
+                     { url: "http://mozilla.org/foo/" }),
   ];
   /**
    * A test provider that should be invoked.
    */
   class TestProvider extends UrlbarProvider {
     get name() {
       return "GoodProvider";
     }
@@ -139,19 +139,19 @@ add_task(async function test_filter_sour
         add(this, match);
       }
     }
     cancelQuery(context) {}
   }
   UrlbarProvidersManager.registerProvider(new TestProvider());
 
   let badMatches = [
-    new UrlbarMatch(UrlbarUtils.MATCH_TYPE.URL,
-                    UrlbarUtils.MATCH_SOURCE.BOOKMARKS,
-                    { url: "http://mozilla.org/foo/" }),
+    new UrlbarResult(UrlbarUtils.MATCH_TYPE.URL,
+                     UrlbarUtils.MATCH_SOURCE.BOOKMARKS,
+                     { url: "http://mozilla.org/foo/" }),
   ];
 
   /**
    * A test provider that should not be invoked.
    */
   class NoInvokeProvider extends UrlbarProvider {
     get name() {
       return "BadProvider";
--- a/browser/components/urlbar/tests/unit/test_providersManager_maxResults.js
+++ b/browser/components/urlbar/tests/unit/test_providersManager_maxResults.js
@@ -2,19 +2,19 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 add_task(async function test_maxResults() {
   const MATCHES_LENGTH = 20;
   let matches = [];
   for (let i = 0; i < MATCHES_LENGTH; i++) {
-    matches.push(new UrlbarMatch(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
-                                 UrlbarUtils.MATCH_SOURCE.TABS,
-                                 { url: `http://mozilla.org/foo/${i}` }));
+    matches.push(new UrlbarResult(UrlbarUtils.MATCH_TYPE.TAB_SWITCH,
+                                  UrlbarUtils.MATCH_SOURCE.TABS,
+                                  { url: `http://mozilla.org/foo/${i}` }));
   }
   let providerName = registerBasicTestProvider(matches);
   let context = createContext(undefined, {providers: [providerName]});
   let controller = new UrlbarController({
     browserWindow: {
       location: {
         href: AppConstants.BROWSER_CHROME_URL,
       },
--- a/browser/docs/AddressBar.rst
+++ b/browser/docs/AddressBar.rst
@@ -33,17 +33,17 @@ Global Architecture Overview
 The *Address Bar* is implemented as a *Model-View-Controller* (MVC) system. One of
 the scopes of this architecture is to allow easy replacement of its components,
 for easier experimentation.
 
 Each search is represented by a unique object, the *UrlbarQueryContext*. This
 object, created by the *View*, describes the search and is passed through all of
 the components, along the way it gets augmented with additional information.
 The *UrlbarQueryContext* is passed to the *Controller*, and finally to the
-*Model*.  The model appends matches to a property of *UrlbarQueryContext* in
+*Model*.  The model appends results to a property of *UrlbarQueryContext* in
 chunks, it sorts them through a *Muxer* and then notifies the *Controller*.
 
 See the specific components below, for additional details about each one's tasks
 and responsibilities.
 
 
 The UrlbarQueryContext
 ================
@@ -72,18 +72,18 @@ It is augmented as it progresses through
     providers; // {array} List of registered provider names. Providers can be
                // registered through the UrlbarProvidersManager.
     sources; // {array} If provided is the list of sources, as defined by
              // MATCH_SOURCE.*, that can be returned by the model.
 
     // Properties added by the Model.
     autofillValue; // {string} the text value that should be autofilled in the
                    // input, if any.
-    preselected; // {boolean} whether the first match should be preselected.
-    results; // {array} list of UrlbarMatch objects.
+    preselected; // {boolean} whether the first result should be preselected.
+    results; // {array} list of UrlbarResult objects.
     tokens; // {array} tokens extracted from the searchString, each token is an
             // object in the form {type, value}.
   }
 
 
 The Model
 =========
 
@@ -95,28 +95,28 @@ across them.
 
 The *UrlbarProvidersManager* is a singleton, it registers internal providers on
 startup and can register/unregister providers on the fly.
 It can manage multiple concurrent queries, and tracks them internally as
 separate *Query* objects.
 
 The *Controller* starts and stops queries through the *UrlbarProvidersManager*.
 It's possible to wait for the promise returned by *startQuery* to know when no
-more matches will be returned, it is not mandatory though.
+more results will be returned, it is not mandatory though.
 Queries can be canceled.
 
 .. note::
 
   Canceling a query will issue an interrupt() on the database connection,
   terminating any running and future SQL query, unless a query is running inside
   a *runInCriticalSection* task.
 
 The *searchString* gets tokenized by the `UrlbarTokenizer <https://dxr.mozilla.org/mozilla-central/source/browser/components/urlbar/UrlbarTokenizer.jsm>`_
 component into tokens, some of these tokens have a special meaning and can be
-used by the user to restrict the search to specific type of matches (See the
+used by the user to restrict the search to specific match type (See the
 *UrlbarTokenizer::TYPE* enum).
 
 .. caution::
 
   The tokenizer uses heuristics to determine each token's type, as such the
   consumer may want to check the value before applying filters.
 
 .. highlight:: JavaScript
@@ -131,17 +131,17 @@ used by the user to restrict the search 
     cancelQuery(queryContext);
     // Can be used by providers to run uninterruptible queries.
     runInCriticalSection(taskFn);
   }
 
 UrlbarProvider
 --------------
 
-A provider is specialized into searching and returning matches from different
+A provider is specialized into searching and returning results from different
 information sources. Internal providers are usually implemented in separate
 *jsm* modules with a *UrlbarProvider* name prefix. External providers can be
 registered as *Objects* through the *UrlbarProvidersManager*.
 Each provider is independent and must satisfy a base API, while internal
 implementation details may vary deeply among different providers.
 
 .. important::
 
@@ -179,19 +179,19 @@ class UrlbarProvider {
    */
   get sources() {
     throw new Error("Trying to access the base class, must be overridden");
   }
   /**
    * Starts querying.
    * @param {UrlbarQueryContext} queryContext The query context object
    * @param {function} addCallback Callback invoked by the provider to add a new
-   *        match. A UrlbarMatch should be passed to it.
+   *        result. A UrlbarResult should be passed to it.
    * @note Extended classes should return a Promise resolved when the provider
-   *       is done searching AND returning matches.
+   *       is done searching AND returning results.
    * @abstract
    */
   startQuery(queryContext, addCallback) {
     throw new Error("Trying to access the base class, must be overridden");
   }
   /**
    * Cancels a running query,
    * @param {UrlbarQueryContext} queryContext The query context object to cancel
@@ -201,40 +201,40 @@ class UrlbarProvider {
   cancelQuery(queryContext) {
     throw new Error("Trying to access the base class, must be overridden");
   }
 }
 
 UrlbarMuxer
 -----------
 
-The *Muxer* is responsible for sorting matches based on their importance and
+The *Muxer* is responsible for sorting results based on their importance and
 additional rules that depend on the UrlbarQueryContext. The muxer to use is
 indicated by the UrlbarQueryContext.muxer property.
 
 .. caution::
 
   The Muxer is a replaceable component, as such what is described here is a
   reference for the default View, but may not be valid for other implementations.
 
 .. highlight:: JavaScript
 .. code::
 
 class UrlbarMuxer {
   /**
-   * Unique name for the muxer, used by the context to sort matches.
+   * Unique name for the muxer, used by the context to sort results.
    * Not using a unique name will cause the newest registration to win.
    * @abstract
    */
   get name() {
     return "UrlbarMuxerBase";
   }
   /**
-   * Sorts UrlbarQueryContext matches in-place.
-   * @param {UrlbarQueryContext} queryContext the context to sort matches for.
+   * Sorts UrlbarQueryContext results in-place.
+   * @param {UrlbarQueryContext} queryContext the context to sort results for.
    * @abstract
    */
   sort(queryContext) {
     throw new Error("Trying to access the base class, must be overridden");
   }
 }
 
 
@@ -251,19 +251,19 @@ View (e.g. showing/hiding a panel). It i
   Each *View* has a different *Controller* instance.
 
 .. highlight:: JavaScript
 .. code::
 
   UrlbarController {
     async startQuery(queryContext);
     cancelQuery(queryContext);
-    // Invoked by the ProvidersManager when matches are available.
+    // Invoked by the ProvidersManager when results are available.
     receiveResults(queryContext);
-    // Used by the View to listen for matches.
+    // Used by the View to listen for results.
     addQueryListener(listener);
     removeQueryListener(listener);
     // Used to indicate the View context changed, as such any cached information
     // should be reset.
     tabContextChanged();
   }
 
 
@@ -338,41 +338,41 @@ Represents the base *View* implementatio
 .. code::
 
   UrlbarView {
     // Manage View visibility.
     open();
     close();
     // Invoked when the query starts.
     onQueryStarted(queryContext);
-    // Invoked when new matches are available.
+    // Invoked when new results are available.
     onQueryResults(queryContext);
     // Invoked when the query has been canceled.
     onQueryCancelled(queryContext);
     // Invoked when the query is done.
     onQueryFinished(queryContext);
   }
 
-UrlbarMatch
+UrlbarResult
 ===========
 
-An `UrlbarMatch <https://dxr.mozilla.org/mozilla-central/source/browser/components/urlbar/UrlbarMatch.jsm>`_
-instance represents a single match (search result) with a match type, that
+An `UrlbarResult <https://dxr.mozilla.org/mozilla-central/source/browser/components/urlbar/UrlbarResult.jsm>`_
+instance represents a single search result with a match type, that
 identifies specific kind of results.
 Each kind has its own properties, that the *View* may support, and a few common
-properties, supported by all of the matches.
+properties, supported by all of the results.
 
 .. note::
 
   Match types are also enumerated by *UrlbarUtils.MATCH_TYPE*.
 
 .. highlight:: JavaScript
 .. code::
 
-  UrlbarMatch {
+  UrlbarResult {
     constructor(matchType, payload);
 
     type: {integer} One of UrlbarUtils.MATCH_TYPE.
     source: {integer} One of UrlbarUtils.MATCH_SOURCE.
     title: {string} A title that may be used as a label for this match.
     icon: {string} Url of an icon for this match.
     payload: {object} Object containing properties for the specific MATCH_TYPE.
   }
--- a/devtools/client/inspector/markup/test/browser.ini
+++ b/devtools/client/inspector/markup/test/browser.ini
@@ -9,16 +9,17 @@ support-files =
   doc_markup_dragdrop_autoscroll_01.html
   doc_markup_dragdrop_autoscroll_02.html
   doc_markup_edit.html
   doc_markup_events_01.html
   doc_markup_events_02.html
   doc_markup_events_03.html
   doc_markup_events_04.html
   doc_markup_events_jquery.html
+  doc_markup_events_object_listener.html
   doc_markup_events-overflow.html
   doc_markup_events_react_development_15.4.1.html
   doc_markup_events_react_development_15.4.1_jsx.html
   doc_markup_events_react_production_15.3.1.html
   doc_markup_events_react_production_15.3.1_jsx.html
   doc_markup_events_react_production_16.2.0.html
   doc_markup_events_react_production_16.2.0_jsx.html
   doc_markup_events-source_map.html
@@ -119,16 +120,17 @@ skip-if = (os == 'linux' && bits == 32 &
 [browser_markup_events_jquery_1.1.js]
 [browser_markup_events_jquery_1.2.js]
 [browser_markup_events_jquery_1.3.js]
 [browser_markup_events_jquery_1.4.js]
 [browser_markup_events_jquery_1.6.js]
 [browser_markup_events_jquery_1.7.js]
 [browser_markup_events_jquery_1.11.1.js]
 [browser_markup_events_jquery_2.1.1.js]
+[browser_markup_events_object_listener.js]
 [browser_markup_events-overflow.js]
 skip-if = true # Bug 1177550
 [browser_markup_events_react_development_15.4.1.js]
 [browser_markup_events_react_development_15.4.1_jsx.js]
 [browser_markup_events_react_production_15.3.1.js]
 [browser_markup_events_react_production_15.3.1_jsx.js]
 [browser_markup_events_react_production_16.2.0.js]
 [browser_markup_events_react_production_16.2.0_jsx.js]
new file mode 100644
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_object_listener.js
@@ -0,0 +1,53 @@
+/* vim: set ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+
+"use strict";
+
+// Test that markup view event bubbles show the correct event info for object
+// style event listeners and that no bubbles are shown for objects without any
+// handleEvent method.
+
+const TEST_URL = URL_ROOT + "doc_markup_events_object_listener.html";
+
+loadHelperScript("helper_events_test_runner.js");
+
+const TEST_DATA = [ // eslint-disable-line
+  {
+    selector: "#valid-object-listener",
+    expected: [
+      {
+        type: "click",
+        filename: TEST_URL + ":17",
+        attributes: [
+          "Bubbling",
+          "DOM2",
+        ],
+        handler: `() => {\n` +
+                 `  console.log("handleEvent");\n` +
+                 `}`,
+      },
+    ],
+  },
+  {
+    selector: "#valid-invalid-object-listeners",
+    expected: [
+      {
+        type: "click",
+        filename: TEST_URL + ":24",
+        attributes: [
+          "Bubbling",
+          "DOM2",
+        ],
+        handler: `() => {\n` +
+                 `  console.log("handleEvent");\n` +
+                 `}`,
+      },
+    ],
+  },
+];
+
+add_task(async function() {
+  await runEventPopupTests(TEST_URL, TEST_DATA);
+});
new file mode 100644
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events_object_listener.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <style>
+      div {
+        border: 1px solid #000;
+      }
+    </style>
+    <script>
+      function init() {
+        const valid = document.querySelector("#valid-object-listener");
+        const validInvalid = document.querySelector("#valid-invalid-object-listeners");
+
+        // Add a valid event to #valid.
+        valid.addEventListener('click', {
+          handleEvent: () => {
+            console.log("handleEvent");
+          }
+        });
+
+        // Add valid and invalid events to #validInvalid.
+        validInvalid.addEventListener('click', {
+          handleEvent: () => {
+            console.log("handleEvent");
+          }
+        });
+        validInvalid.addEventListener('dblclick', {});
+      }
+    </script>
+  </head>
+  <body onload="init();">
+    <h1>Events test with event object listeners</h1>
+    <div id="valid-object-listener">Valid object listener</div>
+    <div id="valid-invalid-object-listeners">Valid and invalid object listeners</div>
+  </body>
+</html>
--- a/devtools/server/actors/inspector/event-parsers.js
+++ b/devtools/server/actors/inspector/event-parsers.js
@@ -2,24 +2,79 @@
  * 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 file contains event parsers that are then used by developer tools in
 // order to find information about events affecting an HTML element.
 
 "use strict";
 
+const { Cu } = require("chrome");
 const Services = require("Services");
 
 // eslint-disable-next-line
 const JQUERY_LIVE_REGEX = /return typeof \w+.*.event\.triggered[\s\S]*\.event\.(dispatch|handle).*arguments/;
 
 var parsers = [
   {
     id: "jQuery events",
+    hasListeners: function(node) {
+      const global = node.ownerGlobal.wrappedJSObject;
+      const hasJQuery = global.jQuery && global.jQuery.fn && global.jQuery.fn.jquery;
+
+      if (!hasJQuery) {
+        return false;
+      }
+
+      const jQuery = global.jQuery;
+      const handlers = [];
+
+      // jQuery 1.2+
+      const data = jQuery._data || jQuery.data;
+      if (data) {
+        const eventsObj = data(node, "events");
+        for (const type in eventsObj) {
+          const events = eventsObj[type];
+          for (const key in events) {
+            const event = events[key];
+
+            if (node.wrappedJSObject == global.document && event.selector) {
+              continue;
+            }
+
+            if (typeof event === "object" || typeof event === "function") {
+              return true;
+            }
+          }
+        }
+      }
+
+      // JQuery 1.0 & 1.1
+      const entry = jQuery(node)[0];
+      if (!entry) {
+        return handlers;
+      }
+
+      for (const type in entry.events) {
+        const events = entry.events[type];
+        for (const key in events) {
+          const event = events[key];
+
+          if (node.wrappedJSObject == global.document && event.selector) {
+            continue;
+          }
+
+          if (typeof events[key] === "function") {
+            return true;
+          }
+        }
+      }
+
+      return false;
+    },
     getListeners: function(node) {
       const global = node.ownerGlobal.wrappedJSObject;
       const hasJQuery = global.jQuery && global.jQuery.fn && global.jQuery.fn.jquery;
 
       if (!hasJQuery) {
         return undefined;
       }
 
@@ -172,52 +227,76 @@ var parsers = [
           Services.els.getListenerInfoFor(node.parentNode) || [];
 
         listeners = [...winListeners, ...docElementListeners, ...docListeners];
       } else {
         listeners = Services.els.getListenerInfoFor(node) || [];
       }
 
       for (const listener of listeners) {
-        if (listener.listenerObject && listener.type) {
+        if (isValidDOMListener(listener)) {
           return true;
         }
       }
 
       return false;
     },
     getListeners: function(node) {
       const handlers = [];
       const listeners = Services.els.getListenerInfoFor(node);
 
       // The Node actor's getEventListenerInfo knows that when an html tag has
       // been passed we need the window object so we don't need to account for
       // event hoisting here as we did in hasListeners.
 
-      for (const listenerObj of listeners) {
-        const listener = listenerObj.listenerObject;
+      for (const listener of listeners) {
+        if (!isValidDOMListener(listener)) {
+          continue;
+        }
+
+        // Get the listener object, either a Function or an Object.
+        let obj = listener.listenerObject;
+
+        // Unwrap the listener in order to see content objects.
+        if (Cu.isXrayWrapper(obj)) {
+          obj = listener.listenerObject.wrappedJSObject;
+        }
+
+        let handler = null;
 
-        // If there is no JS event listener skip this.
-        if (!listener || JQUERY_LIVE_REGEX.test(listener.toString())) {
+        // An object without a valid handleEvent is not a valid listener.
+        if (typeof obj === "object") {
+          const unwrapped = Cu.isXrayWrapper(obj) ? obj.wrappedJSObject : obj;
+          if (typeof unwrapped.handleEvent === "function") {
+            handler = Cu.unwaiveXrays(unwrapped.handleEvent);
+          }
+        } else if (typeof obj === "function") {
+          // Ignore DOM events used to trigger jQuery events as they are only
+          // useful to the developers of the jQuery library.
+          if (JQUERY_LIVE_REGEX.test(obj.toString())) {
+            continue;
+          }
+          // Otherwise, the other valid listener type is function.
+          handler = obj;
+        } else {
           continue;
         }
 
         const eventInfo = {
-          capturing: listenerObj.capturing,
-          type: listenerObj.type,
-          handler: listener,
+          capturing: listener.capturing,
+          type: listener.type,
+          handler: handler,
         };
 
         handlers.push(eventInfo);
       }
 
       return handlers;
     },
   },
-
   {
     id: "React events",
     hasListeners: function(node) {
       return reactGetListeners(node, true);
     },
 
     getListeners: function(node) {
       return reactGetListeners(node, false);
@@ -394,16 +473,53 @@ function jQueryLiveGetListeners(node, bo
   }
 
   if (boolOnEventFound) {
     return false;
   }
   return handlers;
 }
 
+function isValidDOMListener(listener) {
+  // Ignore listeners without a type, e.g.
+  // node.addEventListener("", function() {})
+  if (!listener.type) {
+    return false;
+  }
+
+  // Get the listener object, either a Function or an Object.
+  let obj = listener.listenerObject;
+
+  // Ignore listeners without any listener, e.g.
+  // node.addEventListener("mouseover", null);
+  if (!obj) {
+    return false;
+  }
+
+  // Unwrap the listener in order to see content objects.
+  if (Cu.isXrayWrapper(obj)) {
+    obj = listener.listenerObject.wrappedJSObject;
+  }
+
+  // An object without a valid handleEvent is not a valid listener.
+  if (typeof obj === "object") {
+    const unwrapped = Cu.isXrayWrapper(obj) ? obj.wrappedJSObject : obj;
+    if (typeof unwrapped.handleEvent === "function") {
+      return Cu.unwaiveXrays(unwrapped.handleEvent);
+    }
+    return false;
+  } else if (typeof obj === "function") {
+    if (JQUERY_LIVE_REGEX.test(obj.toString())) {
+      return false;
+    }
+    return obj;
+  }
+  return false;
+}
+
 this.EventParsers = function EventParsers() {
   if (this._eventParsers.size === 0) {
     for (const parserObj of parsers) {
       this.registerEventParser(parserObj);
     }
   }
 };
 
--- a/devtools/server/tests/unit/test_objectgrips-17.js
+++ b/devtools/server/tests/unit/test_objectgrips-17.js
@@ -1,14 +1,20 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 /* eslint-disable no-shadow, max-nested-callbacks */
 
 "use strict";
 
+Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
+
+registerCleanupFunction(() => {
+  Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
+});
+
 async function testPrincipal(options, globalPrincipal, debuggeeHasXrays) {
   const { debuggee } = options;
   let global, subsumes, isOpaque, globalIsInvisible;
   // Create a global object with the specified security principal.
   // If none is specified, use the debuggee.
   if (globalPrincipal === undefined) {
     global = debuggee;
     subsumes = true;
--- a/devtools/server/tests/unit/test_objectgrips-21.js
+++ b/devtools/server/tests/unit/test_objectgrips-21.js
@@ -1,14 +1,20 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 /* eslint-disable no-shadow, max-nested-callbacks */
 
 "use strict";
 
+Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
+
+registerCleanupFunction(() => {
+  Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
+});
+
 // Run test_unsafe_grips twice, one against a system principal debuggee
 // and another time with a null principal debuggee
 
 // The following tests work like this:
 // - The specified code is evaluated in a system principal.
 //   `Cu`, `systemPrincipal` and `Services` are provided as global variables.
 // - The resulting object is debugged in a system or null principal debuggee,
 //   depending on in which list the test is placed.
--- a/devtools/server/tests/unit/test_safe-getter.js
+++ b/devtools/server/tests/unit/test_safe-getter.js
@@ -1,10 +1,14 @@
 /* eslint-disable strict */
 function run_test() {
+  Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
+  registerCleanupFunction(() => {
+    Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
+  });
   ChromeUtils.import("resource://gre/modules/jsdebugger.jsm");
   addDebuggerToGlobal(this);
   const g = testGlobal("test");
   const dbg = new Debugger();
   const gw = dbg.addDebuggee(g);
 
   g.eval(`
     // This is not a CCW.
--- a/devtools/server/tests/unit/test_stepping-05.js
+++ b/devtools/server/tests/unit/test_stepping-05.js
@@ -1,14 +1,20 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 /* eslint-disable no-shadow, max-nested-callbacks */
 
 "use strict";
 
+Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
+
+registerCleanupFunction(() => {
+  Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
+});
+
 /**
  * Make sure that stepping in the last statement of the last frame doesn't
  * cause an unexpected pause, when another JS frame is pushed on the stack
  * (bug 785689).
  */
 
 add_task(threadClientTest(async ({ threadClient, debuggee, client }) => {
   dumpn("Evaluating test code and waiting for first debugger statement");
--- a/devtools/server/tests/unit/test_wasm_source-01.js
+++ b/devtools/server/tests/unit/test_wasm_source-01.js
@@ -8,16 +8,22 @@
 /**
  * Verify if client can receive binary wasm if 'wasmBinarySource' is set.
  */
 
 var gDebuggee;
 var gClient;
 var gThreadClient;
 
+Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
+
+registerCleanupFunction(() => {
+  Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
+});
+
 function run_test() {
   if (typeof WebAssembly == "undefined") {
     // wasm is not enabled for this platform
     return;
   }
 
   initTestDebuggerServer();
   gDebuggee = addTestGlobal("test-wasm-source");
--- a/devtools/shared/heapsnapshot/tests/unit/head_heapsnapshot.js
+++ b/devtools/shared/heapsnapshot/tests/unit/head_heapsnapshot.js
@@ -26,18 +26,20 @@ const CensusUtils = require("devtools/sh
 const DominatorTreeNode = require("devtools/shared/heapsnapshot/DominatorTreeNode");
 const { deduplicatePaths } = require("devtools/shared/heapsnapshot/shortest-paths");
 const { LabelAndShallowSizeVisitor } = DominatorTreeNode;
 
 // Always log packets when running tests. runxpcshelltests.py will throw
 // the output away anyway, unless you give it the --verbose flag.
 if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_DEFAULT) {
   Services.prefs.setBoolPref("devtools.debugger.log", true);
+  Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
   registerCleanupFunction(() => {
     Services.prefs.clearUserPref("devtools.debugger.log");
+    Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
   });
 }
 
 const SYSTEM_PRINCIPAL = Cc["@mozilla.org/systemprincipal;1"]
   .createInstance(Ci.nsIPrincipal);
 
 function dumpn(msg) {
   dump("HEAPSNAPSHOT-TEST: " + msg + "\n");
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -10433,18 +10433,19 @@ static bool JSONCreator(const char16_t* 
   NS_ENSURE_TRUE(JS_Stringify(aCx, &value, nullptr, JS::NullHandleValue,
                               JSONCreator, &serializedValue),
                  false);
   aOutStr = serializedValue;
   return true;
 }
 
 /* static */
-bool nsContentUtils::HighPriorityEventPendingForTopLevelDocumentBeforeContentfulPaint(
-    Document* aDocument) {
+bool nsContentUtils::
+    HighPriorityEventPendingForTopLevelDocumentBeforeContentfulPaint(
+        Document* aDocument) {
   if (!aDocument || aDocument->IsLoadedAsData()) {
     return false;
   }
 
   Document* topLevel = aDocument->GetTopLevelContentDocument();
   return topLevel && topLevel->GetShell() &&
          topLevel->GetShell()->GetPresContext() &&
          !topLevel->GetShell()->GetPresContext()->HadContentfulPaint() &&
--- a/dom/base/nsJSUtils.cpp
+++ b/dom/base/nsJSUtils.cpp
@@ -372,19 +372,17 @@ JSScript* nsJSUtils::ExecutionContext::G
   MOZ_ASSERT(!mSkip);
   MOZ_ASSERT(mScript);
   mScriptUsed = true;
 #endif
 
   return MaybeGetScript();
 }
 
-JSScript* nsJSUtils::ExecutionContext::MaybeGetScript() {
-  return mScript;
-}
+JSScript* nsJSUtils::ExecutionContext::MaybeGetScript() { return mScript; }
 
 nsresult nsJSUtils::ExecutionContext::ExecScript() {
   if (mSkip) {
     return mRv;
   }
 
   MOZ_ASSERT(mScript);
 
--- a/dom/indexedDB/test/unit/test_complex_keyPaths.js
+++ b/dom/indexedDB/test/unit/test_complex_keyPaths.js
@@ -135,18 +135,25 @@ function* testSteps()
     request.onsuccess = grabEventAndContinueHandler;
     yield undefined;
     ok(true, "Successfully updated cursor" + test);
 
     // Check that cursor.update throws as expected when key is changed
     let newValue = cursor.value;
     let destProp = Array.isArray(info.keyPath) ? info.keyPath[0] : info.keyPath;
     if (destProp) {
-      // eslint-disable-next-line no-eval
-      eval("newValue." + destProp + " = 'newKeyValue'");
+      let splitDestProp = destProp.split(".");
+      if (splitDestProp.length == 1)
+      {
+        newValue[splitDestProp[0]] = "newKeyValue";
+      } else if (splitDestProp.length == 2) {
+        newValue[splitDestProp[0]][splitDestProp[1]] = "newKeyValue";
+      } else {
+        newValue[splitDestProp[0]][splitDestProp[1]][splitDestProp[2]] = "newKeyValue";
+      }
     }
     else {
       newValue = "newKeyValue";
     }
     let didThrow;
     try {
       cursor.update(newValue);
     }
--- a/dom/webauthn/PublicKeyCredential.cpp
+++ b/dom/webauthn/PublicKeyCredential.cpp
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/PublicKeyCredential.h"
 #include "mozilla/dom/WebAuthenticationBinding.h"
 #include "nsCycleCollectionParticipant.h"
 
 #ifdef OS_WIN
-#include "WinWebAuthnManager.h"
+#  include "WinWebAuthnManager.h"
 #endif
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(PublicKeyCredential)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(PublicKeyCredential, Credential)
   tmp->mRawIdCachedObj = nullptr;
--- a/dom/webauthn/WebAuthnManager.cpp
+++ b/dom/webauthn/WebAuthnManager.cpp
@@ -14,17 +14,17 @@
 #include "mozilla/dom/PWebAuthnTransaction.h"
 #include "mozilla/dom/WebAuthnManager.h"
 #include "mozilla/dom/WebAuthnTransactionChild.h"
 #include "mozilla/dom/WebAuthnUtil.h"
 #include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/ipc/PBackgroundChild.h"
 
 #ifdef OS_WIN
-#include "WinWebAuthnManager.h"
+#  include "WinWebAuthnManager.h"
 #endif
 
 using namespace mozilla::ipc;
 
 namespace mozilla {
 namespace dom {
 
 /***********************************************************************
--- a/dom/webauthn/WebAuthnTransactionParent.cpp
+++ b/dom/webauthn/WebAuthnTransactionParent.cpp
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/WebAuthnTransactionParent.h"
 #include "mozilla/dom/U2FTokenManager.h"
 #include "mozilla/ipc/PBackgroundParent.h"
 #include "mozilla/ipc/BackgroundParent.h"
 
 #ifdef OS_WIN
-#include "WinWebAuthnManager.h"
+#  include "WinWebAuthnManager.h"
 #endif
 
 namespace mozilla {
 namespace dom {
 
 mozilla::ipc::IPCResult WebAuthnTransactionParent::RecvRequestRegister(
     const uint64_t& aTransactionId,
     const WebAuthnMakeCredentialInfo& aTransactionInfo) {
--- a/dom/webauthn/WinWebAuthnManager.cpp
+++ b/dom/webauthn/WinWebAuthnManager.cpp
@@ -8,17 +8,17 @@
 #include "mozilla/MozPromise.h"
 #include "mozilla/ipc/BackgroundParent.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/Unused.h"
 #include "nsTextFormatter.h"
 #include "winwebauthn/webauthn.h"
 
 #ifdef OS_WIN
-#include "WinWebAuthnManager.h"
+#  include "WinWebAuthnManager.h"
 #endif
 
 namespace mozilla {
 namespace dom {
 
 namespace {
 static mozilla::LazyLogModule gWinWebAuthnManagerLog("winwebauthnkeymanager");
 StaticAutoPtr<WinWebAuthnManager> gWinWebAuthnManager;
--- a/embedding/ios/GeckoEmbed/GeckoEmbed/AppDelegate.m
+++ b/embedding/ios/GeckoEmbed/GeckoEmbed/AppDelegate.m
@@ -9,37 +9,45 @@
 #import "AppDelegate.h"
 
 @interface AppDelegate ()
 
 @end
 
 @implementation AppDelegate
 
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
-    // Override point for customization after application launch.
-    return YES;
+- (BOOL)application:(UIApplication *)application
+    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+  // Override point for customization after application launch.
+  return YES;
 }
 
 - (void)applicationWillResignActive:(UIApplication *)application {
-    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
-    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+  // Sent when the application is about to move from active to inactive state. This can occur for
+  // certain types of temporary interruptions (such as an incoming phone call or SMS message) or
+  // when the user quits the application and it begins the transition to the background state. Use
+  // this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates.
+  // Games should use this method to pause the game.
 }
 
 - (void)applicationDidEnterBackground:(UIApplication *)application {
-    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
-    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+  // Use this method to release shared resources, save user data, invalidate timers, and store
+  // enough application state information to restore your application to its current state in case
+  // it is terminated later. If your application supports background execution, this method is
+  // called instead of applicationWillTerminate: when the user quits.
 }
 
 - (void)applicationWillEnterForeground:(UIApplication *)application {
-    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+  // Called as part of the transition from the background to the inactive state; here you can undo
+  // many of the changes made on entering the background.
 }
 
 - (void)applicationDidBecomeActive:(UIApplication *)application {
-    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+  // Restart any tasks that were paused (or not yet started) while the application was inactive. If
+  // the application was previously in the background, optionally refresh the user interface.
 }
 
 - (void)applicationWillTerminate:(UIApplication *)application {
-    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+  // Called when the application is about to terminate. Save data if appropriate. See also
+  // applicationDidEnterBackground:.
 }
 
 @end
--- a/embedding/ios/GeckoEmbed/GeckoEmbed/ViewController.m
+++ b/embedding/ios/GeckoEmbed/GeckoEmbed/ViewController.m
@@ -10,18 +10,18 @@
 
 @interface ViewController ()
 
 @end
 
 @implementation ViewController
 
 - (void)viewDidLoad {
-    [super viewDidLoad];
-    // Do any additional setup after loading the view, typically from a nib.
+  [super viewDidLoad];
+  // Do any additional setup after loading the view, typically from a nib.
 }
 
 - (void)didReceiveMemoryWarning {
-    [super didReceiveMemoryWarning];
-    // Dispose of any resources that can be recreated.
+  [super didReceiveMemoryWarning];
+  // Dispose of any resources that can be recreated.
 }
 
 @end
--- a/embedding/ios/GeckoEmbed/js/dirs.m
+++ b/embedding/ios/GeckoEmbed/js/dirs.m
@@ -1,12 +1,11 @@
 #import <Foundation/Foundation.h>
 
-bool GetDocumentsDirectory(char* dir)
-{
-    NSSearchPathDirectory directory = NSDocumentDirectory;
-    NSArray* paths = NSSearchPathForDirectoriesInDomains(directory, NSUserDomainMask, YES);
-    if ([paths count] == 0) {
-        return false;
-    }
-    strcpy(dir, [[paths objectAtIndex:0] UTF8String]);
-    return true;
+bool GetDocumentsDirectory(char* dir) {
+  NSSearchPathDirectory directory = NSDocumentDirectory;
+  NSArray* paths = NSSearchPathForDirectoriesInDomains(directory, NSUserDomainMask, YES);
+  if ([paths count] == 0) {
+    return false;
+  }
+  strcpy(dir, [[paths objectAtIndex:0] UTF8String]);
+  return true;
 }
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -1866,20 +1866,18 @@ nsresult nsPermissionManager::AddInterna
 
   switch (op) {
     case eOperationNone: {
       // nothing to do
       return NS_OK;
     }
 
     case eOperationAdding: {
-      UpdateAutoplayTelemetry(aType,
-                              nsIPermissionManager::UNKNOWN_ACTION,
-                              aPermission,
-                              aExpireType);
+      UpdateAutoplayTelemetry(aType, nsIPermissionManager::UNKNOWN_ACTION,
+                              aPermission, aExpireType);
       if (aDBOperation == eWriteToDB) {
         // we'll be writing to the database - generate a known unique id
         id = ++mLargestID;
       } else {
         // we're reading from the database - use the id already assigned
         id = aID;
       }
 
@@ -1913,18 +1911,17 @@ nsresult nsPermissionManager::AddInterna
 
       // If the type we want to remove is EXPIRE_POLICY, we need to reject
       // attempts to change the permission.
       if (entry->GetPermissions()[index].mExpireType == EXPIRE_POLICY) {
         NS_WARNING("Attempting to remove EXPIRE_POLICY permission");
         break;
       }
 
-      UpdateAutoplayTelemetry(aType,
-                              oldPermissionEntry.mPermission,
+      UpdateAutoplayTelemetry(aType, oldPermissionEntry.mPermission,
                               nsIPermissionManager::UNKNOWN_ACTION,
                               aExpireType);
       entry->GetPermissions().RemoveElementAt(index);
 
       // Record a count of the number of preload permissions present in the
       // content process.
       if (IsPreloadPermission(mTypeArray[typeIndex].get())) {
         sPreloadPermissionCount--;
@@ -1956,20 +1953,18 @@ nsresult nsPermissionManager::AddInterna
 
       // If the existing type is EXPIRE_POLICY, we need to reject attempts to
       // change the permission.
       if (entry->GetPermissions()[index].mExpireType == EXPIRE_POLICY) {
         NS_WARNING("Attempting to modify EXPIRE_POLICY permission");
         break;
       }
 
-      UpdateAutoplayTelemetry(aType,
-                              entry->GetPermissions()[index].mPermission,
-                              aPermission,
-                              aExpireType);
+      UpdateAutoplayTelemetry(aType, entry->GetPermissions()[index].mPermission,
+                              aPermission, aExpireType);
 
       // If the new expireType is EXPIRE_SESSION, then we have to keep a
       // copy of the previous permission/expireType values. This cached value
       // will be used when restoring the permissions of an app.
       if (entry->GetPermissions()[index].mExpireType !=
               nsIPermissionManager::EXPIRE_SESSION &&
           aExpireType == nsIPermissionManager::EXPIRE_SESSION) {
         entry->GetPermissions()[index].mNonSessionPermission =
--- a/image/imgFrame.cpp
+++ b/image/imgFrame.cpp
@@ -505,17 +505,19 @@ nsresult imgFrame::Optimize(DrawTarget* 
   // XXX(seth): It's currently unclear if there's any reason why we can't
   // optimize non-premult surfaces. We should look into removing this.
   if (mNonPremult) {
     return NS_OK;
   }
   if (!gfxVars::UseWebRender()) {
     mOptSurface = aTarget->OptimizeSourceSurface(mLockedSurface);
   } else {
-    mOptSurface = gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget()->OptimizeSourceSurface(mLockedSurface);
+    mOptSurface = gfxPlatform::GetPlatform()
+                      ->ScreenReferenceDrawTarget()
+                      ->OptimizeSourceSurface(mLockedSurface);
   }
   if (mOptSurface == mLockedSurface) {
     mOptSurface = nullptr;
   }
 
   if (mOptSurface) {
     // There's no reason to keep our original surface around if we have an
     // optimized surface. Release our reference to it. This will leave
--- a/js/public/CompileOptions.h
+++ b/js/public/CompileOptions.h
@@ -111,16 +111,19 @@ class JS_PUBLIC_API TransitiveCompileOpt
   bool werrorOption = false;
   AsmJSOption asmJSOption = AsmJSOption::Disabled;
   bool throwOnAsmJSValidationFailureOption = false;
   bool forceAsync = false;
   bool sourceIsLazy = false;
   bool allowHTMLComments = true;
   bool isProbablySystemCode = false;
   bool hideScriptFromDebugger = false;
+#ifdef ENABLE_BIGINT
+  bool bigIntEnabledOption = false;
+#endif
 
   /**
    * |introductionType| is a statically allocated C string: one of "eval",
    * "Function", or "GeneratorFunction".
    */
   const char* introductionType = nullptr;
 
   unsigned introductionLineno = 0;
--- a/js/src/ds/LifoAlloc.cpp
+++ b/js/src/ds/LifoAlloc.cpp
@@ -178,20 +178,19 @@ LifoAlloc::UniqueBumpChunk LifoAlloc::ne
                    (minSize & (size_t(1) << (BitSize<size_t>::value - 1))))) {
     return nullptr;
   }
 
   // Note: When computing chunkSize growth, we only are interested in chunks
   // used for small allocations. This excludes unused chunks, oversized chunks,
   // and chunks transferred in from another LifoAlloc.
   MOZ_ASSERT(curSize_ >= smallAllocsSize_);
-  const size_t chunkSize =
-      (oversize || minSize > defaultChunkSize_)
-          ? MallocGoodSize(minSize)
-          : NextSize(defaultChunkSize_, smallAllocsSize_);
+  const size_t chunkSize = (oversize || minSize > defaultChunkSize_)
+                               ? MallocGoodSize(minSize)
+                               : NextSize(defaultChunkSize_, smallAllocsSize_);
 
   // Create a new BumpChunk, and allocate space for it.
   UniqueBumpChunk result = detail::BumpChunk::newWithCapacity(chunkSize);
   if (!result) {
     return nullptr;
   }
   MOZ_ASSERT(result->computedSizeOfIncludingThis() == chunkSize);
   return result;
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -2409,30 +2409,22 @@ bool BytecodeEmitter::emitFunctionScript
   if (funbox->namedLambdaBindings()) {
     namedLambdaEmitterScope.emplace(this);
     if (!namedLambdaEmitterScope->enterNamedLambda(this, funbox)) {
       return false;
     }
   }
 
   /*
-   * Emit a prologue for run-once scripts which will deoptimize JIT code
-   * if the script ends up running multiple times via foo.caller related
-   * shenanigans.
-   *
-   * Also mark the script so that initializers created within it may be
-   * given more precise types.
+   * Mark the script so that initializers created within it may be given more
+   * precise types.
    */
   if (isRunOnceLambda()) {
     script->setTreatAsRunOnce();
     MOZ_ASSERT(!script->hasRunOnce());
-
-    if (!emit1(JSOP_RUNONCE)) {
-      return false;
-    }
   }
 
   setFunctionBodyEndPos(body->pn_pos);
   if (!emitTree(body)) {
     return false;
   }
 
   if (!updateSourceCoordNotes(body->pn_pos.end)) {
--- a/js/src/frontend/TokenStream.cpp
+++ b/js/src/frontend/TokenStream.cpp
@@ -2154,17 +2154,17 @@ MOZ_MUST_USE bool TokenStreamSpecific<Un
     // Most numbers are pure decimal integers without fractional component
     // or exponential notation.  Handle that with optimized code.
     if (!GetDecimalInteger(anyCharsAccess().cx, numStart,
                            this->sourceUnits.addressOfNextCodeUnit(), &dval)) {
       return false;
     }
   }
 #ifdef ENABLE_BIGINT
-  else if (unit == 'n') {
+  else if (unit == 'n' && anyCharsAccess().options().bigIntEnabledOption) {
     isBigInt = true;
     unit = peekCodeUnit();
   }
 #endif
   else {
     // Consume any decimal dot and fractional component.
     if (unit == '.') {
       decimalPoint = HasDecimal;
@@ -2360,16 +2360,17 @@ MOZ_MUST_USE bool TokenStreamSpecific<Un
   newRegExpToken(reflags, start, out);
   return true;
 }
 
 #ifdef ENABLE_BIGINT
 template <typename Unit, class AnyCharsAccess>
 MOZ_MUST_USE bool TokenStreamSpecific<Unit, AnyCharsAccess>::bigIntLiteral(
     TokenStart start, Modifier modifier, TokenKind* out) {
+  MOZ_ASSERT(anyCharsAccess().options().bigIntEnabledOption);
   MOZ_ASSERT(this->sourceUnits.previousCodeUnit() == toUnit('n'));
   MOZ_ASSERT(this->sourceUnits.offset() > start.offset());
   uint32_t length = this->sourceUnits.offset() - start.offset();
   MOZ_ASSERT(length >= 2);
   this->charBuffer.clear();
   mozilla::Range<const Unit> chars(
       this->sourceUnits.codeUnitPtrAt(start.offset()), length);
   for (uint32_t idx = 0; idx < length - 1; idx++) {
@@ -2640,17 +2641,17 @@ MOZ_MUST_USE bool TokenStreamSpecific<Un
         numStart = this->sourceUnits.addressOfNextCodeUnit() - 1;
 
         // NOTE: |unit| may be EOF here.  (This is permitted by case #3
         //       in TokenStream.h docs for this function.)
         return decimalNumber(unit, start, numStart, modifier, ttp);
       }
 
 #ifdef ENABLE_BIGINT
-      if (unit == 'n') {
+      if (unit == 'n' && anyCharsAccess().options().bigIntEnabledOption) {
         if (isLegacyOctalOrNoctal) {
           error(JSMSG_BIGINT_INVALID_SYNTAX);
           return badToken();
         }
         isBigInt = true;
         unit = peekCodeUnit();
       } else {
         ungetCodeUnit(unit);
--- a/js/src/jit/BaselineCompiler.cpp
+++ b/js/src/jit/BaselineCompiler.cpp
@@ -2879,38 +2879,16 @@ bool BaselineCodeGen<Handler>::emit_JSOP
   }
 
   frame.push(R0);
   return true;
 }
 
 template <>
 bool BaselineCompilerCodeGen::emit_JSOP_SETALIASEDVAR() {
-  jsbytecode* pc = handler.pc();
-  JSScript* outerScript = EnvironmentCoordinateFunctionScript(script, pc);
-  if (outerScript && outerScript->treatAsRunOnce()) {
-    // Type updates for this operation might need to be tracked, so treat
-    // this as a SETPROP.
-
-    // Load rhs into R1.
-    frame.syncStack(0);
-    masm.loadValue(frame.addressOfStackValue(-1), R1);
-
-    // Load and box lhs into R0.
-    getEnvironmentCoordinateObject(R2.scratchReg());
-    masm.tagValue(JSVAL_TYPE_OBJECT, R2.scratchReg(), R0);
-
-    // Call SETPROP IC.
-    if (!emitNextIC()) {
-      return false;
-    }
-
-    return true;
-  }
-
   // Keep rvalue in R0.
   frame.popRegsAndSync(1);
   Register objReg = R2.scratchReg();
 
   getEnvironmentCoordinateObject(objReg);
   Address address =
       getEnvironmentCoordinateAddressFromObject(objReg, R1.scratchReg());
   masm.guardedCallPreBarrier(address, MIRType::Value);
@@ -4719,33 +4697,16 @@ bool BaselineCodeGen<Handler>::emit_JSOP
     return false;
   }
 
   masm.bind(&done);
   frame.push(R0);
   return true;
 }
 
-typedef bool (*RunOnceScriptPrologueFn)(JSContext*, HandleScript);
-static const VMFunction RunOnceScriptPrologueInfo =
-    FunctionInfo<RunOnceScriptPrologueFn>(js::RunOnceScriptPrologue,
-                                          "RunOnceScriptPrologue");
-
-template <typename Handler>
-bool BaselineCodeGen<Handler>::emit_JSOP_RUNONCE() {
-  frame.syncStack(0);
-
-  prepareVMCall();
-
-  masm.movePtr(ImmGCPtr(script), R0.scratchReg());
-  pushArg(R0.scratchReg());
-
-  return callVM(RunOnceScriptPrologueInfo);
-}
-
 template <typename Handler>
 bool BaselineCodeGen<Handler>::emit_JSOP_REST() {
   frame.syncStack(0);
 
   if (!emitNextIC()) {
     return false;
   }
 
@@ -5643,16 +5604,17 @@ MethodStatus BaselineCompiler::emitBody(
     }
 
     switch (op) {
       // ===== NOT Yet Implemented =====
       case JSOP_FORCEINTERPRETER:
         // Intentionally not implemented.
       case JSOP_SETINTRINSIC:
         // Run-once opcode during self-hosting initialization.
+      case JSOP_UNUSED71:
       case JSOP_UNUSED151:
       case JSOP_LIMIT:
         // === !! WARNING WARNING WARNING !! ===
         // Do you really want to sacrifice performance by not implementing
         // this operation in the BaselineCompiler?
         JitSpew(JitSpew_BaselineAbort, "Unhandled op: %s", CodeName[op]);
         return Method_CantCompile;
 
--- a/js/src/jit/BaselineCompiler.h
+++ b/js/src/jit/BaselineCompiler.h
@@ -183,17 +183,16 @@ namespace jit {
   _(JSOP_FRESHENLEXICALENV)     \
   _(JSOP_RECREATELEXICALENV)    \
   _(JSOP_DEBUGLEAVELEXICALENV)  \
   _(JSOP_PUSHVARENV)            \
   _(JSOP_POPVARENV)             \
   _(JSOP_EXCEPTION)             \
   _(JSOP_DEBUGGER)              \
   _(JSOP_ARGUMENTS)             \
-  _(JSOP_RUNONCE)               \
   _(JSOP_REST)                  \
   _(JSOP_TOASYNC)               \
   _(JSOP_TOASYNCGEN)            \
   _(JSOP_TOASYNCITER)           \
   _(JSOP_TOID)                  \
   _(JSOP_TOSTRING)              \
   _(JSOP_TABLESWITCH)           \
   _(JSOP_ITER)                  \
--- a/js/src/jit/BaselineIC.cpp
+++ b/js/src/jit/BaselineIC.cpp
@@ -253,19 +253,17 @@ void ICEntry::trace(JSTracer* trc) {
         if (!addIC(pc, stubCompiler.getStub(&stubSpace))) {
           return nullptr;
         }
         break;
       }
       case JSOP_INITPROP:
       case JSOP_INITLOCKEDPROP:
       case JSOP_INITHIDDENPROP:
-      case JSOP_SETALIASEDVAR:
       case JSOP_INITGLEXICAL:
-      case JSOP_INITALIASEDLEXICAL:
       case JSOP_SETPROP:
       case JSOP_STRICTSETPROP:
       case JSOP_SETNAME:
       case JSOP_STRICTSETNAME:
       case JSOP_SETGNAME:
       case JSOP_STRICTSETGNAME: {
         ICSetProp_Fallback::Compiler compiler(cx);
         if (!addIC(pc, compiler.getStub(&stubSpace))) {
@@ -2994,26 +2992,19 @@ static bool DoSetPropFallback(JSContext*
   jsbytecode* pc = stub->icEntry()->pc(script);
   JSOp op = JSOp(*pc);
   FallbackICSpew(cx, stub, "SetProp(%s)", CodeName[op]);
 
   MOZ_ASSERT(op == JSOP_SETPROP || op == JSOP_STRICTSETPROP ||
              op == JSOP_SETNAME || op == JSOP_STRICTSETNAME ||
              op == JSOP_SETGNAME || op == JSOP_STRICTSETGNAME ||
              op == JSOP_INITPROP || op == JSOP_INITLOCKEDPROP ||
-             op == JSOP_INITHIDDENPROP || op == JSOP_SETALIASEDVAR ||
-             op == JSOP_INITALIASEDLEXICAL || op == JSOP_INITGLEXICAL);
-
-  RootedPropertyName name(cx);
-  if (op == JSOP_SETALIASEDVAR || op == JSOP_INITALIASEDLEXICAL) {
-    name = EnvironmentCoordinateName(cx->caches().envCoordinateNameCache,
-                                     script, pc);
-  } else {
-    name = script->getName(pc);
-  }
+             op == JSOP_INITHIDDENPROP || op == JSOP_INITGLEXICAL);
+
+  RootedPropertyName name(cx, script->getName(pc));
   RootedId id(cx, NameToId(name));
 
   RootedObject obj(cx, ToObjectFromStack(cx, lhs));
   if (!obj) {
     return false;
   }
   RootedShape oldShape(cx, obj->maybeShape());
   RootedObjectGroup oldGroup(cx, JSObject::getGroup(cx, obj));
@@ -3068,19 +3059,16 @@ static bool DoSetPropFallback(JSContext*
     if (!InitPropertyOperation(cx, op, obj, name, rhs)) {
       return false;
     }
   } else if (op == JSOP_SETNAME || op == JSOP_STRICTSETNAME ||
              op == JSOP_SETGNAME || op == JSOP_STRICTSETGNAME) {
     if (!SetNameOperation(cx, script, pc, obj, rhs)) {
       return false;
     }
-  } else if (op == JSOP_SETALIASEDVAR || op == JSOP_INITALIASEDLEXICAL) {
-    obj->as<EnvironmentObject>().setAliasedBinding(
-        cx, EnvironmentCoordinate(pc), name, rhs);
   } else if (op == JSOP_INITGLEXICAL) {
     RootedValue v(cx, rhs);
     LexicalEnvironmentObject* lexicalEnv;
     if (script->hasNonSyntacticScope()) {
       lexicalEnv = &NearestEnclosingExtensibleLexicalEnvironment(
           frame->environmentChain());
     } else {
       lexicalEnv = &cx->global()->lexicalEnvironment();
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -6573,39 +6573,16 @@ void CodeGenerator::visitNewCallObject(L
   TemplateObject templateObject(templateObj);
   bool initContents = ShouldInitFixedSlots(lir, templateObject);
   masm.createGCObject(objReg, tempReg, templateObject, gc::DefaultHeap,
                       ool->entry(), initContents);
 
   masm.bind(ool->rejoin());
 }
 
-typedef JSObject* (*NewSingletonCallObjectFn)(JSContext*, HandleShape);
-static const VMFunction NewSingletonCallObjectInfo =
-    FunctionInfo<NewSingletonCallObjectFn>(NewSingletonCallObject,
-                                           "NewSingletonCallObject");
-
-void CodeGenerator::visitNewSingletonCallObject(LNewSingletonCallObject* lir) {
-  Register objReg = ToRegister(lir->output());
-
-  JSObject* templateObj = lir->mir()->templateObject();
-
-  OutOfLineCode* ool;
-  ool =
-      oolCallVM(NewSingletonCallObjectInfo, lir,
-                ArgList(ImmGCPtr(templateObj->as<CallObject>().lastProperty())),
-                StoreRegisterTo(objReg));
-
-  // Objects can only be given singleton types in VM calls.  We make the call
-  // out of line to not bloat inline code, even if (naively) this seems like
-  // extra work.
-  masm.jump(ool->entry());
-  masm.bind(ool->rejoin());
-}
-
 typedef JSObject* (*NewStringObjectFn)(JSContext*, HandleString);
 static const VMFunction NewStringObjectInfo =
     FunctionInfo<NewStringObjectFn>(NewStringObject, "NewStringObject");
 
 void CodeGenerator::visitNewStringObject(LNewStringObject* lir) {
   Register input = ToRegister(lir->input());
   Register output = ToRegister(lir->output());
   Register temp = ToRegister(lir->temp());
@@ -10108,26 +10085,16 @@ void CodeGenerator::visitSetFrameArgumen
 
 void CodeGenerator::visitSetFrameArgumentV(LSetFrameArgumentV* lir) {
   const ValueOperand val = ToValue(lir, LSetFrameArgumentV::Input);
   size_t argOffset = frameSize() + JitFrameLayout::offsetOfActualArgs() +
                      (sizeof(Value) * lir->mir()->argno());
   masm.storeValue(val, Address(masm.getStackPointer(), argOffset));
 }
 
-typedef bool (*RunOnceScriptPrologueFn)(JSContext*, HandleScript);
-static const VMFunction RunOnceScriptPrologueInfo =
-    FunctionInfo<RunOnceScriptPrologueFn>(js::RunOnceScriptPrologue,
-                                          "RunOnceScriptPrologue");
-
-void CodeGenerator::visitRunOncePrologue(LRunOncePrologue* lir) {
-  pushArg(ImmGCPtr(lir->mir()->block()->info().script()));
-  callVM(RunOnceScriptPrologueInfo, lir);
-}
-
 typedef JSObject* (*InitRestParameterFn)(JSContext*, uint32_t, Value*,
                                          HandleObject, HandleObject);
 static const VMFunction InitRestParameterInfo =
     FunctionInfo<InitRestParameterFn>(InitRestParameter, "InitRestParameter");
 
 void CodeGenerator::emitRest(LInstruction* lir, Register array,
                              Register numActuals, Register temp0,
                              Register temp1, unsigned numFormals,
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -183,22 +183,16 @@ IonBuilder::IonBuilder(JSContext* analys
   if (!info->isAnalysis()) {
     script()->baselineScript()->setIonCompiledOrInlined();
   }
 }
 
 void IonBuilder::clearForBackEnd() {
   MOZ_ASSERT(!analysisContext);
   baselineFrame_ = nullptr;
-
-  // The caches below allocate data from the malloc heap. Release this before
-  // later phases of compilation to avoid leaks, as the top level IonBuilder
-  // is not explicitly destroyed. Note that builders for inner scripts are
-  // constructed on the stack and will release this memory on destruction.
-  envCoordinateNameCache.purge();
 }
 
 mozilla::GenericErrorResult<AbortReason> IonBuilder::abort(AbortReason r) {
   auto res = this->MIRGenerator::abort(r);
 #ifdef DEBUG
   JitSpew(JitSpew_IonAbort, "aborted @ %s:%d", script()->filename(),
           PCToLineNumber(script(), pc));
 #else
@@ -1985,19 +1979,16 @@ AbortReasonOr<Ok> IonBuilder::inspectOpc
 
     case JSOP_TRUE:
       pushConstant(BooleanValue(true));
       return Ok();
 
     case JSOP_ARGUMENTS:
       return jsop_arguments();
 
-    case JSOP_RUNONCE:
-      return jsop_runonce();
-
     case JSOP_REST:
       return jsop_rest();
 
     case JSOP_GETARG:
       if (info().argsObjAliasesFormals()) {
         MGetArgumentsObjectArg* getArg = MGetArgumentsObjectArg::New(
             alloc(), current->argumentsObject(), GET_ARGNO(pc));
         current->add(getArg);
@@ -2527,16 +2518,17 @@ AbortReasonOr<Ok> IonBuilder::inspectOpc
       // Do you really want to sacrifice performance by not implementing this
       // operation in the optimizing compiler?
       break;
 
     case JSOP_FORCEINTERPRETER:
       // Intentionally not implemented.
       break;
 
+    case JSOP_UNUSED71:
     case JSOP_UNUSED151:
     case JSOP_LIMIT:
       break;
   }
 
   // Track a simpler message, since the actionable abort message is a
   // static string, and the internal opcode name isn't an actionable
   // thing anyways.
@@ -5026,24 +5018,18 @@ AbortReasonOr<MInstruction*> IonBuilder:
                                                           MDefinition* env) {
   // Get a template CallObject that we'll use to generate inline object
   // creation.
   CallObject* templateObj = inspector->templateCallObject();
   MConstant* templateCst =
       MConstant::NewConstraintlessObject(alloc(), templateObj);
   current->add(templateCst);
 
-  // Allocate the object. Run-once scripts need a singleton type, so always do
-  // a VM call in such cases.
-  MNewCallObjectBase* callObj;
-  if (script()->treatAsRunOnce() || templateObj->isSingleton()) {
-    callObj = MNewSingletonCallObject::New(alloc(), templateCst);
-  } else {
-    callObj = MNewCallObject::New(alloc(), templateCst);
-  }
+  // Allocate the object.
+  MNewCallObject* callObj = MNewCallObject::New(alloc(), templateCst);
   current->add(callObj);
 
   // Initialize the object's reserved slots. No post barrier is needed here,
   // for the same reason as in createNamedLambdaObject.
   current->add(MStoreFixedSlot::New(
       alloc(), callObj, CallObject::enclosingEnvironmentSlot(), env));
   current->add(
       MStoreFixedSlot::New(alloc(), callObj, CallObject::calleeSlot(), callee));
@@ -7775,19 +7761,17 @@ AbortReasonOr<Ok> IonBuilder::getStaticN
                                             MDefinition* lexicalCheck) {
   MOZ_ASSERT(*emitted == false);
 
   jsid id = NameToId(name);
 
   bool isGlobalLexical =
       staticObject->is<LexicalEnvironmentObject>() &&
       staticObject->as<LexicalEnvironmentObject>().isGlobal();
-  MOZ_ASSERT(isGlobalLexical || staticObject->is<GlobalObject>() ||
-             staticObject->is<CallObject>() ||
-             staticObject->is<ModuleEnvironmentObject>());
+  MOZ_ASSERT(isGlobalLexical || staticObject->is<GlobalObject>());
   MOZ_ASSERT(staticObject->isSingleton());
 
   // Always emit the lexical check. This could be optimized, but is
   // currently not for simplicity's sake.
   if (lexicalCheck) {
     return Ok();
   }
 
@@ -7892,18 +7876,17 @@ bool IonBuilder::needsPostBarrier(MDefin
 
 AbortReasonOr<Ok> IonBuilder::setStaticName(JSObject* staticObject,
                                             PropertyName* name) {
   jsid id = NameToId(name);
 
   bool isGlobalLexical =
       staticObject->is<LexicalEnvironmentObject>() &&
       staticObject->as<LexicalEnvironmentObject>().isGlobal();
-  MOZ_ASSERT(isGlobalLexical || staticObject->is<GlobalObject>() ||
-             staticObject->is<CallObject>());
+  MOZ_ASSERT(isGlobalLexical || staticObject->is<GlobalObject>());
 
   MDefinition* value = current->peek(-1);
 
   TypeSet::ObjectKey* staticKey = TypeSet::ObjectKey::get(staticObject);
   if (staticKey->unknownProperties()) {
     return jsop_setprop(name);
   }
 
@@ -8084,31 +8067,23 @@ AbortReasonOr<Ok> IonBuilder::jsop_intri
 AbortReasonOr<Ok> IonBuilder::jsop_getimport(PropertyName* name) {
   ModuleEnvironmentObject* env = GetModuleEnvironmentForScript(script());
   MOZ_ASSERT(env);
 
   Shape* shape;
   ModuleEnvironmentObject* targetEnv;
   MOZ_ALWAYS_TRUE(env->lookupImport(NameToId(name), &targetEnv, &shape));
 
-  PropertyName* localName =
-      JSID_TO_STRING(shape->propid())->asAtom().asPropertyName();
-  bool emitted = false;
-  MOZ_TRY(getStaticName(&emitted, targetEnv, localName));
-
-  if (!emitted) {
-    // This can happen if we don't have type information.
-    TypeSet::ObjectKey* staticKey = TypeSet::ObjectKey::get(targetEnv);
-    TemporaryTypeSet* types = bytecodeTypes(pc);
-    BarrierKind barrier = PropertyReadNeedsTypeBarrier(
-        analysisContext, alloc(), constraints(), staticKey, name, types,
-        /* updateObserved = */ true);
-
-    MOZ_TRY(loadStaticSlot(targetEnv, barrier, types, shape->slot()));
-  }
+  TypeSet::ObjectKey* staticKey = TypeSet::ObjectKey::get(targetEnv);
+  TemporaryTypeSet* types = bytecodeTypes(pc);
+  BarrierKind barrier = PropertyReadNeedsTypeBarrier(
+      analysisContext, alloc(), constraints(), staticKey, name, types,
+      /* updateObserved = */ true);
+
+  MOZ_TRY(loadStaticSlot(targetEnv, barrier, types, shape->slot()));
 
   // In the rare case where this import hasn't been initialized already (we
   // have an import cycle where modules reference each other's imports), emit
   // a check.
   if (targetEnv->getSlot(shape->slot()).isMagic(JS_UNINITIALIZED_LEXICAL)) {
     MDefinition* checked;
     MOZ_TRY_VAR(checked, addLexicalCheck(current->pop()));
     current->push(checked);
@@ -10093,22 +10068,16 @@ uint32_t IonBuilder::getUnboxedOffset(Te
       trackOptimizationOutcome(TrackedOutcome::InconsistentFieldType);
       return UINT32_MAX;
     }
   }
 
   return offset;
 }
 
-AbortReasonOr<Ok> IonBuilder::jsop_runonce() {
-  MRunOncePrologue* ins = MRunOncePrologue::New(alloc());
-  current->add(ins);
-  return resumeAfter(ins);
-}
-
 AbortReasonOr<Ok> IonBuilder::jsop_not() {
   MDefinition* value = current->pop();
 
   MNot* ins = MNot::New(alloc(), value, constraints());
   current->add(ins);
   current->push(ins);
   return Ok();
 }
@@ -13084,70 +13053,16 @@ MDefinition* IonBuilder::walkEnvironment
     MInstruction* ins = MEnclosingEnvironment::New(alloc(), env);
     current->add(ins);
     env = ins;
   }
 
   return env;
 }
 
-bool IonBuilder::hasStaticEnvironmentObject(JSObject** pcall) {
-  JSScript* outerScript = EnvironmentCoordinateFunctionScript(script(), pc);
-  if (!outerScript || !outerScript->treatAsRunOnce()) {
-    return false;
-  }
-
-  TypeSet::ObjectKey* funKey =
-      TypeSet::ObjectKey::get(outerScript->functionNonDelazifying());
-  if (funKey->hasFlags(constraints(), OBJECT_FLAG_RUNONCE_INVALIDATED)) {
-    return false;
-  }
-
-  // The script this aliased var operation is accessing will run only once,
-  // so there will be only one call object and the aliased var access can be
-  // compiled in the same manner as a global access. We still need to find
-  // the call object though.
-
-  // Look for the call object on the current script's function's env chain.
-  // If the current script is inner to the outer script and the function has
-  // singleton type then it should show up here.
-
-  MDefinition* envDef = current->getSlot(info().environmentChainSlot());
-  envDef->setImplicitlyUsedUnchecked();
-
-  JSObject* environment = script()->functionNonDelazifying()->environment();
-  while (environment && !environment->is<GlobalObject>()) {
-    if (environment->is<CallObject>() &&
-        environment->as<CallObject>().callee().nonLazyScript() == outerScript) {
-      MOZ_ASSERT(environment->isSingleton());
-      *pcall = environment;
-      return true;
-    }
-    environment = environment->enclosingEnvironment();
-  }
-
-  // Look for the call object on the current frame, if we are compiling the
-  // outer script itself. Don't do this if we are at entry to the outer
-  // script, as the call object we see will not be the real one --- after
-  // entering the Ion code a different call object will be created.
-
-  if (script() == outerScript && baselineFrame_ && info().osrPc()) {
-    JSObject* singletonScope = baselineFrame_->singletonEnvChain;
-    if (singletonScope && singletonScope->is<CallObject>() &&
-        singletonScope->as<CallObject>().callee().nonLazyScript() ==
-            outerScript) {
-      MOZ_ASSERT(singletonScope->isSingleton());
-      *pcall = singletonScope;
-      return true;
-    }
-  }
-
-  return true;
-}
-
 MDefinition* IonBuilder::getAliasedVar(EnvironmentCoordinate ec) {
   MDefinition* obj = walkEnvironmentChain(ec.hops());
 
   Shape* shape = EnvironmentCoordinateToEnvironmentShape(script(), pc);
 
   MInstruction* load;
   if (shape->numFixedSlots() <= ec.slot()) {
     MInstruction* slots = MSlots::New(alloc(), obj);
@@ -13158,67 +13073,28 @@ MDefinition* IonBuilder::getAliasedVar(E
     load = MLoadFixedSlot::New(alloc(), obj, ec.slot());
   }
 
   current->add(load);
   return load;
 }
 
 AbortReasonOr<Ok> IonBuilder::jsop_getaliasedvar(EnvironmentCoordinate ec) {
-  JSObject* call = nullptr;
-  if (hasStaticEnvironmentObject(&call) && call) {
-    PropertyName* name =
-        EnvironmentCoordinateName(envCoordinateNameCache, script(), pc);
-    bool emitted = false;
-    MOZ_TRY(getStaticName(&emitted, call, name, takeLexicalCheck()));
-    if (emitted) {
-      return Ok();
-    }
-  }
-
   // See jsop_checkaliasedlexical.
   MDefinition* load = takeLexicalCheck();
   if (!load) {
     load = getAliasedVar(ec);
   }
   current->push(load);
 
   TemporaryTypeSet* types = bytecodeTypes(pc);
   return pushTypeBarrier(load, types, BarrierKind::TypeSet);
 }
 
 AbortReasonOr<Ok> IonBuilder::jsop_setaliasedvar(EnvironmentCoordinate ec) {
-  JSObject* call = nullptr;
-  if (hasStaticEnvironmentObject(&call)) {
-    uint32_t depth = current->stackDepth() + 1;
-    if (depth > current->nslots()) {
-      if (!current->increaseSlots(depth - current->nslots())) {
-        return abort(AbortReason::Alloc);
-      }
-    }
-    MDefinition* value = current->pop();
-    PropertyName* name =
-        EnvironmentCoordinateName(envCoordinateNameCache, script(), pc);
-
-    if (call) {
-      // Push the object on the stack to match the bound object expected in
-      // the global and property set cases.
-      pushConstant(ObjectValue(*call));
-      current->push(value);
-      return setStaticName(call, name);
-    }
-
-    // The call object has type information we need to respect but we
-    // couldn't find it. Just do a normal property assign.
-    MDefinition* obj = walkEnvironmentChain(ec.hops());
-    current->push(obj);
-    current->push(value);
-    return jsop_setprop(name);
-  }
-
   MDefinition* rval = current->peek(-1);
   MDefinition* obj = walkEnvironmentChain(ec.hops());
 
   Shape* shape = EnvironmentCoordinateToEnvironmentShape(script(), pc);
 
   if (needsPostBarrier(rval)) {
     current->add(MPostWriteBarrier::New(alloc(), obj, rval));
   }
--- a/js/src/jit/IonBuilder.h
+++ b/js/src/jit/IonBuilder.h
@@ -230,17 +230,16 @@ class IonBuilder : public MIRGenerator,
                                        BailoutKind bailoutKind);
   MInstruction* addSharedTypedArrayGuard(MDefinition* obj);
 
   MInstruction* addGuardReceiverPolymorphic(
       MDefinition* obj, const BaselineInspector::ReceiverVector& receivers);
 
   bool invalidatedIdempotentCache();
 
-  bool hasStaticEnvironmentObject(JSObject** pcall);
   AbortReasonOr<Ok> loadSlot(MDefinition* obj, size_t slot, size_t nfixed,
                              MIRType rvalType, BarrierKind barrier,
                              TemporaryTypeSet* types);
   AbortReasonOr<Ok> loadSlot(MDefinition* obj, Shape* shape, MIRType rvalType,
                              BarrierKind barrier, TemporaryTypeSet* types);
   AbortReasonOr<Ok> storeSlot(MDefinition* obj, size_t slot, size_t nfixed,
                               MDefinition* value, bool needsBarrier,
                               MIRType slotType = MIRType::None);
@@ -583,17 +582,16 @@ class IonBuilder : public MIRGenerator,
       MDefinition* index, MDefinition* value, bool writeHole, bool* emitted);
   AbortReasonOr<Ok> jsop_setelem_typed(ScalarTypeDescr::Type arrayType,
                                        MDefinition* object, MDefinition* index,
                                        MDefinition* value);
   AbortReasonOr<Ok> jsop_length();
   bool jsop_length_fastPath();
   AbortReasonOr<Ok> jsop_arguments();
   AbortReasonOr<Ok> jsop_arguments_getelem();
-  AbortReasonOr<Ok> jsop_runonce();
   AbortReasonOr<Ok> jsop_rest();
   AbortReasonOr<Ok> jsop_not();
   AbortReasonOr<Ok> jsop_envcallee();
   AbortReasonOr<Ok> jsop_superbase();
   AbortReasonOr<Ok> jsop_getprop_super(PropertyName* name);
   AbortReasonOr<Ok> jsop_getelem_super();
   AbortReasonOr<Ok> jsop_getprop(PropertyName* name);
   AbortReasonOr<Ok> jsop_setprop(PropertyName* name);
@@ -1026,18 +1024,16 @@ class IonBuilder : public MIRGenerator,
   CompilerConstraintList* constraints_;
 
   TemporaryTypeSet* thisTypes;
   TemporaryTypeSet* argTypes;
   TemporaryTypeSet* typeArray;
   uint32_t typeArrayHint;
   uint32_t* bytecodeTypeMap;
 
-  EnvironmentCoordinateNameCache envCoordinateNameCache;
-
   jsbytecode* pc;
   MBasicBlock* current;
   uint32_t loopDepth_;
   Vector<MBasicBlock*, 0, JitAllocPolicy> blockWorklist;
   const CFGBlock* cfgCurrent;
   const ControlFlowGraph* cfg;
 
   Vector<BytecodeSite*, 0, JitAllocPolicy> trackedOptimizationSites_;
--- a/js/src/jit/Lowering.cpp
+++ b/js/src/jit/Lowering.cpp
@@ -221,22 +221,16 @@ void LIRGenerator::visitNewNamedLambdaOb
 }
 
 void LIRGenerator::visitNewCallObject(MNewCallObject* ins) {
   LNewCallObject* lir = new (alloc()) LNewCallObject(temp());
   define(lir, ins);
   assignSafepoint(lir, ins);
 }
 
-void LIRGenerator::visitNewSingletonCallObject(MNewSingletonCallObject* ins) {
-  LNewSingletonCallObject* lir = new (alloc()) LNewSingletonCallObject(temp());
-  define(lir, ins);
-  assignSafepoint(lir, ins);
-}
-
 void LIRGenerator::visitNewDerivedTypedObject(MNewDerivedTypedObject* ins) {
   LNewDerivedTypedObject* lir = new (alloc()) LNewDerivedTypedObject(
       useRegisterAtStart(ins->type()), useRegisterAtStart(ins->owner()),
       useRegisterAtStart(ins->offset()));
   defineReturn(lir, ins);
   assignSafepoint(lir, ins);
 }
 
@@ -4031,22 +4025,16 @@ void LIRGenerator::visitSetFrameArgument
     add(lir, ins);
   } else {
     LSetFrameArgumentT* lir =
         new (alloc()) LSetFrameArgumentT(useRegister(input));
     add(lir, ins);
   }
 }
 
-void LIRGenerator::visitRunOncePrologue(MRunOncePrologue* ins) {
-  LRunOncePrologue* lir = new (alloc()) LRunOncePrologue;
-  add(lir, ins);
-  assignSafepoint(lir, ins);
-}
-
 void LIRGenerator::visitRest(MRest* ins) {
   MOZ_ASSERT(ins->numActuals()->type() == MIRType::Int32);
 
   LRest* lir = new (alloc()) LRest(
       useFixedAtStart(ins->numActuals(), CallTempReg0), tempFixed(CallTempReg1),
       tempFixed(CallTempReg2), tempFixed(CallTempReg3));
   defineReturn(lir, ins);
   assignSafepoint(lir, ins);
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -3569,27 +3569,16 @@ class MSetArgumentsObjectArg
 
   size_t argno() const { return argno_; }
 
   AliasSet getAliasSet() const override {
     return AliasSet::Store(AliasSet::Any);
   }
 };
 
-class MRunOncePrologue : public MNullaryInstruction {
- protected:
-  MRunOncePrologue() : MNullaryInstruction(classOpcode) { setGuard(); }
-
- public:
-  INSTRUCTION_HEADER(RunOncePrologue)
-  TRIVIAL_NEW_WRAPPERS
-
-  bool possiblyCalls() const override { return true; }
-};
-
 // Given a MIRType::Value A and a MIRType::Object B:
 // If the Value may be safely unboxed to an Object, return Object(A).
 // Otherwise, return B.
 // Used to implement return behavior for inlined constructors.
 class MReturnFromCtor : public MBinaryInstruction,
                         public MixPolicy<BoxPolicy<0>, ObjectPolicy<1>>::Data {
   MReturnFromCtor(MDefinition* value, MDefinition* object)
       : MBinaryInstruction(classOpcode, value, object) {
@@ -10397,55 +10386,38 @@ class MNewNamedLambdaObject : public MNu
 
   LexicalEnvironmentObject* templateObj() { return templateObj_; }
   AliasSet getAliasSet() const override { return AliasSet::None(); }
   bool appendRoots(MRootList& roots) const override {
     return roots.append(templateObj_);
   }
 };
 
-class MNewCallObjectBase : public MUnaryInstruction,
-                           public SingleObjectPolicy::Data {
- protected:
-  MNewCallObjectBase(Opcode op, MConstant* templateObj)
-      : MUnaryInstruction(op, templateObj) {
-    setResultType(MIRType::Object);
-  }
-
- public:
-  CallObject* templateObject() const {
-    return &getOperand(0)->toConstant()->toObject().as<CallObject>();
-  }
-  AliasSet getAliasSet() const override { return AliasSet::None(); }
-};
-
-class MNewCallObject : public MNewCallObjectBase {
+class MNewCallObject : public MUnaryInstruction,
+                       public SingleObjectPolicy::Data {
  public:
   INSTRUCTION_HEADER(NewCallObject)
   TRIVIAL_NEW_WRAPPERS
 
   explicit MNewCallObject(MConstant* templateObj)
-      : MNewCallObjectBase(classOpcode, templateObj) {
+      : MUnaryInstruction(classOpcode, templateObj) {
     MOZ_ASSERT(!templateObject()->isSingleton());
-  }
+    setResultType(MIRType::Object);
+  }
+
+  CallObject* templateObject() const {
+    return &getOperand(0)->toConstant()->toObject().as<CallObject>();
+  }
+  AliasSet getAliasSet() const override { return AliasSet::None(); }
 
   MOZ_MUST_USE bool writeRecoverData(
       CompactBufferWriter& writer) const override;
   bool canRecoverOnBailout() const override { return true; }
 };
 
-class MNewSingletonCallObject : public MNewCallObjectBase {
- public:
-  INSTRUCTION_HEADER(NewSingletonCallObject)
-  TRIVIAL_NEW_WRAPPERS
-
-  explicit MNewSingletonCallObject(MConstant* templateObj)
-      : MNewCallObjectBase(classOpcode, templateObj) {}
-};
-
 class MNewStringObject : public MUnaryInstruction,
                          public ConvertToStringPolicy<0>::Data {
   CompilerObject templateObj_;
 
   MNewStringObject(MDefinition* input, JSObject* templateObj)
       : MUnaryInstruction(classOpcode, input), templateObj_(templateObj) {
     setResultType(MIRType::Object);
   }
--- a/js/src/jit/VMFunctions.cpp
+++ b/js/src/jit/VMFunctions.cpp
@@ -511,32 +511,16 @@ JSObject* NewCallObject(JSContext* cx, H
   // the call object tenured, so barrier as needed before re-entering.
   if (!IsInsideNursery(obj)) {
     cx->runtime()->gc.storeBuffer().putWholeCell(obj);
   }
 
   return obj;
 }
 
-JSObject* NewSingletonCallObject(JSContext* cx, HandleShape shape) {
-  JSObject* obj = CallObject::createSingleton(cx, shape);
-  if (!obj) {
-    return nullptr;
-  }
-
-  // The JIT creates call objects in the nursery, so elides barriers for
-  // the initializing writes. The interpreter, however, may have allocated
-  // the call object tenured, so barrier as needed before re-entering.
-  MOZ_ASSERT(!IsInsideNursery(obj),
-             "singletons are created in the tenured heap");
-  cx->runtime()->gc.storeBuffer().putWholeCell(obj);
-
-  return obj;
-}
-
 JSObject* NewStringObject(JSContext* cx, HandleString str) {
   return StringObject::create(cx, str);
 }
 
 bool OperatorIn(JSContext* cx, HandleValue key, HandleObject obj, bool* out) {
   RootedId id(cx);
   return ToPropertyKey(cx, key, &id) && HasProperty(cx, obj, id, out);
 }
--- a/js/src/jit/VMFunctions.h
+++ b/js/src/jit/VMFunctions.h
@@ -971,17 +971,16 @@ MOZ_MUST_USE bool SetProperty(JSContext*
                               HandlePropertyName name, HandleValue value,
                               bool strict, jsbytecode* pc);
 
 MOZ_MUST_USE bool InterruptCheck(JSContext* cx);
 
 void* MallocWrapper(JS::Zone* zone, size_t nbytes);
 JSObject* NewCallObject(JSContext* cx, HandleShape shape,
                         HandleObjectGroup group);
-JSObject* NewSingletonCallObject(JSContext* cx, HandleShape shape);
 JSObject* NewStringObject(JSContext* cx, HandleString str);
 
 bool OperatorIn(JSContext* cx, HandleValue key, HandleObject obj, bool* out);
 bool OperatorInI(JSContext* cx, uint32_t index, HandleObject obj, bool* out);
 
 MOZ_MUST_USE bool GetIntrinsicValue(JSContext* cx, HandlePropertyName name,
                                     MutableHandleValue rval);
 
--- a/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
+++ b/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
@@ -115,150 +115,150 @@ inline bool js::jit::AtomicOperations::I
 inline void js::jit::AtomicOperations::ShutDown() {
   // Nothing
 }
 
 // When compiling with Clang on 32-bit linux it will be necessary to link with
 // -latomic to get the proper 64-bit intrinsics.
 
 inline bool js::jit::AtomicOperations::hasAtomic8() {
-#  if defined(HAS_64BIT_ATOMICS)
+#if defined(HAS_64BIT_ATOMICS)
   return true;
-#  else
+#else
   return false;
-#  endif
+#endif
 }
 
 inline bool js::jit::AtomicOperations::isLockfree8() {
-#  if defined(HAS_64BIT_LOCKFREE)
+#if defined(HAS_64BIT_LOCKFREE)
   return true;
-#  else
+#else
   return false;
-#  endif
+#endif
 }
 
 inline void js::jit::AtomicOperations::fenceSeqCst() {
-#  ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+#ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
   __sync_synchronize();
-#  else
+#else
   __atomic_thread_fence(__ATOMIC_SEQ_CST);
-#  endif
+#endif
 }
 
 template <typename T>
 inline T js::jit::AtomicOperations::loadSeqCst(T* addr) {
   static_assert(sizeof(T) <= 8, "atomics supported up to 8 bytes only");
-#  ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+#ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
   __sync_synchronize();
   T v = *addr;
   __sync_synchronize();
-#  else
+#else
   T v;
   __atomic_load(addr, &v, __ATOMIC_SEQ_CST);
-#  endif
+#endif
   return v;
 }
 
-#  ifndef HAS_64BIT_ATOMICS
+#ifndef HAS_64BIT_ATOMICS
 namespace js {
 namespace jit {
 
 template <>
 inline int64_t AtomicOperations::loadSeqCst(int64_t* addr) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 template <>
 inline uint64_t AtomicOperations::loadSeqCst(uint64_t* addr) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 }  // namespace jit
 }  // namespace js
-#  endif
+#endif
 
 template <typename T>
 inline void js::jit::AtomicOperations::storeSeqCst(T* addr, T val) {
   static_assert(sizeof(T) <= 8, "atomics supported up to 8 bytes only");
-#  ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+#ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
   __sync_synchronize();
   *addr = val;
   __sync_synchronize();
-#  else
+#else
   __atomic_store(addr, &val, __ATOMIC_SEQ_CST);
-#  endif
+#endif
 }
 
-#  ifndef HAS_64BIT_ATOMICS
+#ifndef HAS_64BIT_ATOMICS
 namespace js {
 namespace jit {
 
 template <>
 inline void AtomicOperations::storeSeqCst(int64_t* addr, int64_t val) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 template <>
 inline void AtomicOperations::storeSeqCst(uint64_t* addr, uint64_t val) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 }  // namespace jit
 }  // namespace js
-#  endif
+#endif
 
 template <typename T>
 inline T js::jit::AtomicOperations::exchangeSeqCst(T* addr, T val) {
   static_assert(sizeof(T) <= 8, "atomics supported up to 8 bytes only");
-#  ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+#ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
   T v;
   __sync_synchronize();
   do {
     v = *addr;
   } while (__sync_val_compare_and_swap(addr, v, val) != v);
   return v;
-#  else
+#else
   T v;
   __atomic_exchange(addr, &val, &v, __ATOMIC_SEQ_CST);
   return v;
-#  endif
+#endif
 }
 
-#  ifndef HAS_64BIT_ATOMICS
+#ifndef HAS_64BIT_ATOMICS
 namespace js {
 namespace jit {
 
 template <>
 inline int64_t AtomicOperations::exchangeSeqCst(int64_t* addr, int64_t val) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 template <>
 inline uint64_t AtomicOperations::exchangeSeqCst(uint64_t* addr, uint64_t val) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 }  // namespace jit
 }  // namespace js
-#  endif
+#endif
 
 template <typename T>
 inline T js::jit::AtomicOperations::compareExchangeSeqCst(T* addr, T oldval,
                                                           T newval) {
   static_assert(sizeof(T) <= 8, "atomics supported up to 8 bytes only");
-#  ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+#ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
   return __sync_val_compare_and_swap(addr, oldval, newval);
-#  else
+#else
   __atomic_compare_exchange(addr, &oldval, &newval, false, __ATOMIC_SEQ_CST,
                             __ATOMIC_SEQ_CST);
   return oldval;
-#  endif
+#endif
 }
 
-#  ifndef HAS_64BIT_ATOMICS
+#ifndef HAS_64BIT_ATOMICS
 namespace js {
 namespace jit {
 
 template <>
 inline int64_t AtomicOperations::compareExchangeSeqCst(int64_t* addr,
                                                        int64_t oldval,
                                                        int64_t newval) {
   MOZ_CRASH("No 64-bit atomics");
@@ -268,157 +268,157 @@ template <>
 inline uint64_t AtomicOperations::compareExchangeSeqCst(uint64_t* addr,
                                                         uint64_t oldval,
                                                         uint64_t newval) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 }  // namespace jit
 }  // namespace js
-#  endif
+#endif
 
 template <typename T>
 inline T js::jit::AtomicOperations::fetchAddSeqCst(T* addr, T val) {
   static_assert(sizeof(T) <= 8, "atomics supported up to 8 bytes only");
-#  ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+#ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
   return __sync_fetch_and_add(addr, val);
-#  else
+#else
   return __atomic_fetch_add(addr, val, __ATOMIC_SEQ_CST);
-#  endif
+#endif
 }
 
-#  ifndef HAS_64BIT_ATOMICS
+#ifndef HAS_64BIT_ATOMICS
 namespace js {
 namespace jit {
 
 template <>
 inline int64_t AtomicOperations::fetchAddSeqCst(int64_t* addr, int64_t val) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 template <>
 inline uint64_t AtomicOperations::fetchAddSeqCst(uint64_t* addr, uint64_t val) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 }  // namespace jit
 }  // namespace js
-#  endif
+#endif
 
 template <typename T>
 inline T js::jit::AtomicOperations::fetchSubSeqCst(T* addr, T val) {
   static_assert(sizeof(T) <= 8, "atomics supported up to 8 bytes only");
-#  ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+#ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
   return __sync_fetch_and_sub(addr, val);
-#  else
+#else
   return __atomic_fetch_sub(addr, val, __ATOMIC_SEQ_CST);
-#  endif
+#endif
 }
 
-#  ifndef HAS_64BIT_ATOMICS
+#ifndef HAS_64BIT_ATOMICS
 namespace js {
 namespace jit {
 
 template <>
 inline int64_t AtomicOperations::fetchSubSeqCst(int64_t* addr, int64_t val) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 template <>
 inline uint64_t AtomicOperations::fetchSubSeqCst(uint64_t* addr, uint64_t val) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 }  // namespace jit
 }  // namespace js
-#  endif
+#endif
 
 template <typename T>
 inline T js::jit::AtomicOperations::fetchAndSeqCst(T* addr, T val) {
   static_assert(sizeof(T) <= 8, "atomics supported up to 8 bytes only");
-#  ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+#ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
   return __sync_fetch_and_and(addr, val);
-#  else
+#else
   return __atomic_fetch_and(addr, val, __ATOMIC_SEQ_CST);
-#  endif
+#endif
 }
 
-#  ifndef HAS_64BIT_ATOMICS
+#ifndef HAS_64BIT_ATOMICS
 namespace js {
 namespace jit {
 
 template <>
 inline int64_t AtomicOperations::fetchAndSeqCst(int64_t* addr, int64_t val) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 template <>
 inline uint64_t AtomicOperations::fetchAndSeqCst(uint64_t* addr, uint64_t val) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 }  // namespace jit
 }  // namespace js
-#  endif
+#endif
 
 template <typename T>
 inline T js::jit::AtomicOperations::fetchOrSeqCst(T* addr, T val) {
   static_assert(sizeof(T) <= 8, "atomics supported up to 8 bytes only");
-#  ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+#ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
   return __sync_fetch_and_or(addr, val);
-#  else
+#else
   return __atomic_fetch_or(addr, val, __ATOMIC_SEQ_CST);
-#  endif
+#endif
 }
 
-#  ifndef HAS_64BIT_ATOMICS
+#ifndef HAS_64BIT_ATOMICS
 namespace js {
 namespace jit {
 
 template <>
 inline int64_t AtomicOperations::fetchOrSeqCst(int64_t* addr, int64_t val) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 template <>
 inline uint64_t AtomicOperations::fetchOrSeqCst(uint64_t* addr, uint64_t val) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 }  // namespace jit
 }  // namespace js
-#  endif
+#endif
 
 template <typename T>
 inline T js::jit::AtomicOperations::fetchXorSeqCst(T* addr, T val) {
   static_assert(sizeof(T) <= 8, "atomics supported up to 8 bytes only");
-#  ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
+#ifdef ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS
   return __sync_fetch_and_xor(addr, val);
-#  else
+#else
   return __atomic_fetch_xor(addr, val, __ATOMIC_SEQ_CST);
-#  endif
+#endif
 }
 
-#  ifndef HAS_64BIT_ATOMICS
+#ifndef HAS_64BIT_ATOMICS
 namespace js {
 namespace jit {
 
 template <>
 inline int64_t AtomicOperations::fetchXorSeqCst(int64_t* addr, int64_t val) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 template <>
 inline uint64_t AtomicOperations::fetchXorSeqCst(uint64_t* addr, uint64_t val) {
   MOZ_CRASH("No 64-bit atomics");
 }
 
 }  // namespace jit
 }  // namespace js
-#  endif
+#endif
 
 template <typename T>
 inline T js::jit::AtomicOperations::loadSafeWhenRacy(T* addr) {
   static_assert(sizeof(T) <= 8, "atomics supported up to 8 bytes only");
   // This is actually roughly right even on 32-bit platforms since in that
   // case, double, int64, and uint64 loads need not be access-atomic.
   //
   // We could use __atomic_load, but it would be needlessly expensive on
--- a/js/src/jit/shared/AtomicOperations-feeling-lucky-msvc.h
+++ b/js/src/jit/shared/AtomicOperations-feeling-lucky-msvc.h
@@ -66,17 +66,17 @@ inline void js::jit::AtomicOperations::f
   _ReadWriteBarrier();
 #if defined(_M_IX86) || defined(_M_X64)
   _mm_mfence();
 #elif defined(_M_ARM64)
   // MemoryBarrier is defined in winnt.h, which we don't want to include here.
   // This expression is the expansion of MemoryBarrier.
   __dmb(_ARM64_BARRIER_SY);
 #else
-#error "Unknown hardware for MSVC"
+#  error "Unknown hardware for MSVC"
 #endif
 }
 
 template <typename T>
 inline T js::jit::AtomicOperations::loadSeqCst(T* addr) {
   _ReadWriteBarrier();
   T v = *addr;
   _ReadWriteBarrier();
--- a/js/src/jit/shared/AtomicOperations-feeling-lucky.h
+++ b/js/src/jit/shared/AtomicOperations-feeling-lucky.h
@@ -3,17 +3,16 @@
  * 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/. */
 
 #ifndef jit_shared_AtomicOperations_feeling_lucky_h
 #define jit_shared_AtomicOperations_feeling_lucky_h
 
 #if defined(__clang__) || defined(__GNUC__)
-# include "jit/shared/AtomicOperations-feeling-lucky-gcc.h"
+#  include "jit/shared/AtomicOperations-feeling-lucky-gcc.h"
 #elif defined(_MSC_VER)
-# include "jit/shared/AtomicOperations-feeling-lucky-msvc.h"
+#  include "jit/shared/AtomicOperations-feeling-lucky-msvc.h"
 #else
-# error "No AtomicOperations support for this platform+compiler combination"
+#  error "No AtomicOperations support for this platform+compiler combination"
 #endif
 
-#endif // jit_shared_AtomicOperations_feeling_lucky_h
-
+#endif  // jit_shared_AtomicOperations_feeling_lucky_h
--- a/js/src/jit/shared/AtomicOperations-shared-jit.cpp
+++ b/js/src/jit/shared/AtomicOperations-shared-jit.cpp
@@ -92,43 +92,40 @@ static constexpr Register64 AtomicReturn
 // Assigned registers except temp are disjoint from the argument registers,
 // since accounting for both 32-bit and 64-bit arguments and constraints on the
 // result register is much too messy.  The temp is in an argument register since
 // it won't be used until we've moved all arguments to other registers.
 //
 // Save LR because it's the second scratch register.  The first scratch register
 // is r12 (IP).  The atomics implementation in the MacroAssembler uses both.
 
-static const LiveRegisterSet AtomicNonVolatileRegs =
-  LiveRegisterSet(GeneralRegisterSet((uint32_t(1) << Registers::r4) |
-                                     (uint32_t(1) << Registers::r5) |
-                                     (uint32_t(1) << Registers::r6) |
-                                     (uint32_t(1) << Registers::r7) |
-                                     (uint32_t(1) << Registers::r8) |
-                                     (uint32_t(1) << Registers::lr)),
-                  FloatRegisterSet(0));
+static const LiveRegisterSet AtomicNonVolatileRegs = LiveRegisterSet(
+    GeneralRegisterSet(
+        (uint32_t(1) << Registers::r4) | (uint32_t(1) << Registers::r5) |
+        (uint32_t(1) << Registers::r6) | (uint32_t(1) << Registers::r7) |
+        (uint32_t(1) << Registers::r8) | (uint32_t(1) << Registers::lr)),
+    FloatRegisterSet(0));
 
 static constexpr Register AtomicPtrReg = r8;
 static constexpr Register AtomicPtr2Reg = r6;
 static constexpr Register AtomicTemp = r3;
 static constexpr Register AtomicValReg = r6;
 static constexpr Register64 AtomicValReg64(r7, r6);
 static constexpr Register AtomicVal2Reg = r4;
 static constexpr Register64 AtomicVal2Reg64(r5, r4);
 
 static constexpr Register64 AtomicReturnReg64 = ReturnReg64;
 
 #elif defined(JS_CODEGEN_X86)
 
 // There are no argument registers.
 
-static const LiveRegisterSet AtomicNonVolatileRegs =
-  LiveRegisterSet(GeneralRegisterSet((1 << X86Encoding::rbx) |
-                                     (1 << X86Encoding::rsi)),
-                  FloatRegisterSet(0));
+static const LiveRegisterSet AtomicNonVolatileRegs = LiveRegisterSet(
+    GeneralRegisterSet((1 << X86Encoding::rbx) | (1 << X86Encoding::rsi)),
+    FloatRegisterSet(0));
 
 static constexpr Register AtomicPtrReg = esi;
 static constexpr Register AtomicPtr2Reg = ebx;
 static constexpr Register AtomicValReg = ebx;
 static constexpr Register AtomicVal2Reg = ecx;
 static constexpr Register AtomicTemp = edx;
 
 // 64-bit registers for cmpxchg8b.  ValReg/Val2Reg/Temp are not used in this
@@ -164,28 +161,29 @@ static constexpr Scalar::Type SIZEWORD =
 //
 // A "word" is an item that we can copy using only register intermediate storage
 // on all platforms; words can be individually copied without worrying about
 // overlap.
 //
 // Blocks and words can be aligned or unaligned; specific (generated) copying
 // functions handle this in platform-specific ways.
 
-static constexpr size_t WORDSIZE = sizeof(uintptr_t); // Also see SIZEWORD above
-static constexpr size_t BLOCKSIZE = 8 * WORDSIZE;     // Must be a power of 2
+static constexpr size_t WORDSIZE =
+    sizeof(uintptr_t);                             // Also see SIZEWORD above
+static constexpr size_t BLOCKSIZE = 8 * WORDSIZE;  // Must be a power of 2
 
-static_assert(BLOCKSIZE % WORDSIZE == 0, "A block is an integral number of words");
+static_assert(BLOCKSIZE % WORDSIZE == 0,
+              "A block is an integral number of words");
 
 static constexpr size_t WORDMASK = WORDSIZE - 1;
 static constexpr size_t BLOCKMASK = BLOCKSIZE - 1;
 
-struct ArgIterator
-{
-    ABIArgGenerator abi;
-    unsigned argBase = 0;
+struct ArgIterator {
+  ABIArgGenerator abi;
+  unsigned argBase = 0;
 };
 
 static void GenGprArg(MacroAssembler& masm, MIRType t, ArgIterator* iter,
                       Register reg) {
   MOZ_ASSERT(t == MIRType::Pointer || t == MIRType::Int32);
   ABIArg arg = iter->abi.next(t);
   switch (arg.kind()) {
     case ABIArg::GPR: {
@@ -195,19 +193,17 @@ static void GenGprArg(MacroAssembler& ma
       break;
     }
     case ABIArg::Stack: {
       Address src(masm.getStackPointer(),
                   iter->argBase + arg.offsetFromArgBase());
       masm.loadPtr(src, reg);
       break;
     }
-    default: {
-      MOZ_CRASH("Not possible");
-    }
+    default: { MOZ_CRASH("Not possible"); }
   }
 }
 
 static void GenGpr64Arg(MacroAssembler& masm, ArgIterator* iter,
                         Register64 reg) {
   ABIArg arg = iter->abi.next(MIRType::Int64);
   switch (arg.kind()) {
     case ABIArg::GPR: {
@@ -231,19 +227,17 @@ static void GenGpr64Arg(MacroAssembler& 
     case ABIArg::GPR_PAIR: {
       if (arg.gpr64() != reg) {
         masm.move32(arg.oddGpr(), reg.high);
         masm.move32(arg.evenGpr(), reg.low);
       }
       break;
     }
 #endif
-    default: {
-      MOZ_CRASH("Not possible");
-    }
+    default: { MOZ_CRASH("Not possible"); }
   }
 }
 
 static uint32_t GenPrologue(MacroAssembler& masm, ArgIterator* iter) {
   masm.assumeUnreachable("Shouldn't get here");
   masm.flushBuffer();
   masm.haltingAlign(CodeAlignment);
   masm.setFramePushed(0);
@@ -358,50 +352,50 @@ static uint32_t GenStore(MacroAssembler&
   }
   masm.memoryBarrier(sync.barrierAfter);
 
   GenEpilogue(masm);
   return start;
 }
 
 enum class CopyDir {
-  DOWN,                       // Move data down, ie, iterate toward higher addresses
-  UP                          // The other way
+  DOWN,  // Move data down, ie, iterate toward higher addresses
+  UP     // The other way
 };
 
 static uint32_t GenCopy(MacroAssembler& masm, Scalar::Type size,
                         uint32_t unroll, CopyDir direction) {
   ArgIterator iter;
   uint32_t start = GenPrologue(masm, &iter);
 
   Register dest = AtomicPtrReg;
   Register src = AtomicPtr2Reg;
 
   GenGprArg(masm, MIRType::Pointer, &iter, dest);
   GenGprArg(masm, MIRType::Pointer, &iter, src);
 
-  uint32_t offset = direction == CopyDir::DOWN ? 0 : unroll-1;
+  uint32_t offset = direction == CopyDir::DOWN ? 0 : unroll - 1;
   for (uint32_t i = 0; i < unroll; i++) {
     switch (size) {
       case SIZE8:
         masm.load8ZeroExtend(Address(src, offset), AtomicTemp);
         masm.store8(AtomicTemp, Address(dest, offset));
         break;
       case SIZE16:
-        masm.load16ZeroExtend(Address(src, offset*2), AtomicTemp);
-        masm.store16(AtomicTemp, Address(dest, offset*2));
+        masm.load16ZeroExtend(Address(src, offset * 2), AtomicTemp);
+        masm.store16(AtomicTemp, Address(dest, offset * 2));
         break;
       case SIZE32:
-        masm.load32(Address(src, offset*4), AtomicTemp);
-        masm.store32(AtomicTemp, Address(dest, offset*4));
+        masm.load32(Address(src, offset * 4), AtomicTemp);
+        masm.store32(AtomicTemp, Address(dest, offset * 4));
         break;
       case SIZE64:
 #if defined(JS_64BIT)
-        masm.load64(Address(src, offset*8), AtomicTemp64);
-        masm.store64(AtomicTemp64, Address(dest, offset*8));
+        masm.load64(Address(src, offset * 8), AtomicTemp64);
+        masm.store64(AtomicTemp64, Address(dest, offset * 8));
         break;
 #else
         MOZ_CRASH("64-bit atomic load/store not available on this platform");
 #endif
       default:
         MOZ_CRASH("Unknown size");
     }
     offset += direction == CopyDir::DOWN ? 1 : -1;
@@ -474,46 +468,44 @@ static uint32_t GenExchange(MacroAssembl
     default:
       MOZ_CRASH("Unknown size");
   }
 
   GenEpilogue(masm);
   return start;
 }
 
-static uint32_t
-GenFetchOp(MacroAssembler& masm, Scalar::Type size, AtomicOp op,
-           Synchronization sync) {
+static uint32_t GenFetchOp(MacroAssembler& masm, Scalar::Type size, AtomicOp op,
+                           Synchronization sync) {
   ArgIterator iter;
   uint32_t start = GenPrologue(masm, &iter);
   GenGprArg(masm, MIRType::Pointer, &iter, AtomicPtrReg);
 
   Address addr(AtomicPtrReg, 0);
   switch (size) {
     case SIZE8:
     case SIZE16:
     case SIZE32: {
 #if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)
       Register tmp = op == AtomicFetchAddOp || op == AtomicFetchSubOp
-        ? Register::Invalid()
-        : AtomicTemp;
+                         ? Register::Invalid()
+                         : AtomicTemp;
 #else
       Register tmp = AtomicTemp;
 #endif
       GenGprArg(masm, MIRType::Int32, &iter, AtomicValReg);
-      masm.atomicFetchOp(size, sync, op, AtomicValReg, addr, tmp,
-                         ReturnReg);
+      masm.atomicFetchOp(size, sync, op, AtomicValReg, addr, tmp, ReturnReg);
       break;
     }
     case SIZE64: {
 #if defined(JS_64BIT)
 #  if defined(JS_CODEGEN_X64)
       Register64 tmp = op == AtomicFetchAddOp || op == AtomicFetchSubOp
-        ? Register64::Invalid()
-        : AtomicTemp64;
+                           ? Register64::Invalid()
+                           : AtomicTemp64;
 #  else
       Register64 tmp = AtomicTemp64;
 #  endif
       GenGpr64Arg(masm, &iter, AtomicValReg64);
       masm.atomicFetchOp64(sync, op, AtomicValReg64, addr, tmp,
                            AtomicReturnReg64);
       break;
 #else
@@ -568,30 +560,39 @@ uint64_t (*AtomicStore64Unsynchronized)(
 // See the definitions of BLOCKSIZE and WORDSIZE earlier.  The "unaligned"
 // functions perform individual byte copies (and must always be "down" or "up").
 // The others ignore alignment issues, and thus either depend on unaligned
 // accesses being OK or not being invoked on unaligned addresses.
 //
 // src and dest point to the lower addresses of the respective data areas
 // irrespective of "up" or "down".
 
-static void (*AtomicCopyUnalignedBlockDownUnsynchronized)(uint8_t* dest, const uint8_t* src);
-static void (*AtomicCopyUnalignedBlockUpUnsynchronized)(uint8_t* dest, const uint8_t* src);
-static void (*AtomicCopyUnalignedWordDownUnsynchronized)(uint8_t* dest, const uint8_t* src);
-static void (*AtomicCopyUnalignedWordUpUnsynchronized)(uint8_t* dest, const uint8_t* src);
+static void (*AtomicCopyUnalignedBlockDownUnsynchronized)(uint8_t* dest,
+                                                          const uint8_t* src);
+static void (*AtomicCopyUnalignedBlockUpUnsynchronized)(uint8_t* dest,
+                                                        const uint8_t* src);
+static void (*AtomicCopyUnalignedWordDownUnsynchronized)(uint8_t* dest,
+                                                         const uint8_t* src);
+static void (*AtomicCopyUnalignedWordUpUnsynchronized)(uint8_t* dest,
+                                                       const uint8_t* src);
 
-static void (*AtomicCopyBlockDownUnsynchronized)(uint8_t* dest, const uint8_t* src);
-static void (*AtomicCopyBlockUpUnsynchronized)(uint8_t* dest, const uint8_t* src);
+static void (*AtomicCopyBlockDownUnsynchronized)(uint8_t* dest,
+                                                 const uint8_t* src);
+static void (*AtomicCopyBlockUpUnsynchronized)(uint8_t* dest,
+                                               const uint8_t* src);
 static void (*AtomicCopyWordUnsynchronized)(uint8_t* dest, const uint8_t* src);
 static void (*AtomicCopyByteUnsynchronized)(uint8_t* dest, const uint8_t* src);
 
 uint8_t (*AtomicCmpXchg8SeqCst)(uint8_t* addr, uint8_t oldval, uint8_t newval);
-uint16_t (*AtomicCmpXchg16SeqCst)(uint16_t* addr, uint16_t oldval, uint16_t newval);
-uint32_t (*AtomicCmpXchg32SeqCst)(uint32_t* addr, uint32_t oldval, uint32_t newval);
-uint64_t (*AtomicCmpXchg64SeqCst)(uint64_t* addr, uint64_t oldval, uint64_t newval);
+uint16_t (*AtomicCmpXchg16SeqCst)(uint16_t* addr, uint16_t oldval,
+                                  uint16_t newval);
+uint32_t (*AtomicCmpXchg32SeqCst)(uint32_t* addr, uint32_t oldval,
+                                  uint32_t newval);
+uint64_t (*AtomicCmpXchg64SeqCst)(uint64_t* addr, uint64_t oldval,
+                                  uint64_t newval);
 
 uint8_t (*AtomicExchange8SeqCst)(uint8_t* addr, uint8_t val);
 uint16_t (*AtomicExchange16SeqCst)(uint16_t* addr, uint16_t val);
 uint32_t (*AtomicExchange32SeqCst)(uint32_t* addr, uint32_t val);
 #ifdef JS_64BIT
 uint64_t (*AtomicExchange64SeqCst)(uint64_t* addr, uint64_t val);
 #endif
 
@@ -621,18 +622,17 @@ uint16_t (*AtomicXor16SeqCst)(uint16_t* 
 uint32_t (*AtomicXor32SeqCst)(uint32_t* addr, uint32_t val);
 #ifdef JS_64BIT
 uint64_t (*AtomicXor64SeqCst)(uint64_t* addr, uint64_t val);
 #endif
 
 static bool UnalignedAccessesAreOK() {
 #ifdef DEBUG
   const char* flag = getenv("JS_NO_UNALIGNED_MEMCPY");
-  if (flag && *flag == '1')
-    return false;
+  if (flag && *flag == '1') return false;
 #endif
 #if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)
   return true;
 #elif defined(JS_CODEGEN_ARM)
   return !HasAlignmentFault();
 #elif defined(JS_CODEGEN_ARM64)
   // This is not necessarily true but it's the best guess right now.
   return true;
@@ -646,30 +646,29 @@ void AtomicMemcpyDownUnsynchronized(uint
   const uint8_t* lim = src + nbytes;
 
   // Set up bulk copying.  The cases are ordered the way they are on the
   // assumption that if we can achieve aligned copies even with a little
   // preprocessing then that is better than unaligned copying on a platform
   // that supports it.
 
   if (nbytes >= WORDSIZE) {
-    void (*copyBlock)(uint8_t* dest, const uint8_t* src);
-    void (*copyWord)(uint8_t* dest, const uint8_t* src);
+    void (*copyBlock)(uint8_t * dest, const uint8_t* src);
+    void (*copyWord)(uint8_t * dest, const uint8_t* src);
 
     if (((uintptr_t(dest) ^ uintptr_t(src)) & WORDMASK) == 0) {
-      const uint8_t* cutoff = (const uint8_t*)JS_ROUNDUP(uintptr_t(src),
-                                                         WORDSIZE);
-      MOZ_ASSERT(cutoff <= lim); // because nbytes >= WORDSIZE
+      const uint8_t* cutoff =
+          (const uint8_t*)JS_ROUNDUP(uintptr_t(src), WORDSIZE);
+      MOZ_ASSERT(cutoff <= lim);  // because nbytes >= WORDSIZE
       while (src < cutoff) {
         AtomicCopyByteUnsynchronized(dest++, src++);
       }
       copyBlock = AtomicCopyBlockDownUnsynchronized;
       copyWord = AtomicCopyWordUnsynchronized;
-    }
-    else if (UnalignedAccessesAreOK()) {
+    } else if (UnalignedAccessesAreOK()) {
       copyBlock = AtomicCopyBlockDownUnsynchronized;
       copyWord = AtomicCopyWordUnsynchronized;
     } else {
       copyBlock = AtomicCopyUnalignedBlockDownUnsynchronized;
       copyWord = AtomicCopyUnalignedWordDownUnsynchronized;
     }
 
     // Bulk copy, first larger blocks and then individual words.
@@ -699,29 +698,28 @@ void AtomicMemcpyDownUnsynchronized(uint
 void AtomicMemcpyUpUnsynchronized(uint8_t* dest, const uint8_t* src,
                                   size_t nbytes) {
   const uint8_t* lim = src;
 
   src += nbytes;
   dest += nbytes;
 
   if (nbytes >= WORDSIZE) {
-    void (*copyBlock)(uint8_t* dest, const uint8_t* src);
-    void (*copyWord)(uint8_t* dest, const uint8_t* src);
+    void (*copyBlock)(uint8_t * dest, const uint8_t* src);
+    void (*copyWord)(uint8_t * dest, const uint8_t* src);
 
     if (((uintptr_t(dest) ^ uintptr_t(src)) & WORDMASK) == 0) {
       const uint8_t* cutoff = (const uint8_t*)(uintptr_t(src) & ~WORDMASK);
-      MOZ_ASSERT(cutoff >= lim); // Because nbytes >= WORDSIZE
+      MOZ_ASSERT(cutoff >= lim);  // Because nbytes >= WORDSIZE
       while (src > cutoff) {
         AtomicCopyByteUnsynchronized(--dest, --src);
       }
       copyBlock = AtomicCopyBlockUpUnsynchronized;
       copyWord = AtomicCopyWordUnsynchronized;
-    }
-    else if (UnalignedAccessesAreOK()) {
+    } else if (UnalignedAccessesAreOK()) {
       copyBlock = AtomicCopyBlockUpUnsynchronized;
       copyWord = AtomicCopyWordUnsynchronized;
     } else {
       copyBlock = AtomicCopyUnalignedBlockUpUnsynchronized;
       copyWord = AtomicCopyUnalignedWordUpUnsynchronized;
     }
 
     const uint8_t* blocklim = src - ((src - lim) & ~BLOCKMASK);
@@ -792,28 +790,28 @@ bool InitializeJittedAtomics() {
   uint32_t store8Unsynchronized = GenStore(masm, SIZE8, None);
   uint32_t store16Unsynchronized = GenStore(masm, SIZE16, None);
   uint32_t store32Unsynchronized = GenStore(masm, SIZE32, None);
 #ifdef JS_64BIT
   uint32_t store64Unsynchronized = GenStore(masm, SIZE64, None);
 #endif
 
   uint32_t copyUnalignedBlockDownUnsynchronized =
-    GenCopy(masm, SIZE8, BLOCKSIZE, CopyDir::DOWN);
+      GenCopy(masm, SIZE8, BLOCKSIZE, CopyDir::DOWN);
   uint32_t copyUnalignedBlockUpUnsynchronized =
-    GenCopy(masm, SIZE8, BLOCKSIZE, CopyDir::UP);
+      GenCopy(masm, SIZE8, BLOCKSIZE, CopyDir::UP);
   uint32_t copyUnalignedWordDownUnsynchronized =
-    GenCopy(masm, SIZE8, WORDSIZE, CopyDir::DOWN);
+      GenCopy(masm, SIZE8, WORDSIZE, CopyDir::DOWN);
   uint32_t copyUnalignedWordUpUnsynchronized =
-    GenCopy(masm, SIZE8, WORDSIZE, CopyDir::UP);
+      GenCopy(masm, SIZE8, WORDSIZE, CopyDir::UP);
 
   uint32_t copyBlockDownUnsynchronized =
-    GenCopy(masm, SIZEWORD, BLOCKSIZE/WORDSIZE, CopyDir::DOWN);
+      GenCopy(masm, SIZEWORD, BLOCKSIZE / WORDSIZE, CopyDir::DOWN);
   uint32_t copyBlockUpUnsynchronized =
-    GenCopy(masm, SIZEWORD, BLOCKSIZE/WORDSIZE, CopyDir::UP);
+      GenCopy(masm, SIZEWORD, BLOCKSIZE / WORDSIZE, CopyDir::UP);
   uint32_t copyWordUnsynchronized = GenCopy(masm, SIZEWORD, 1, CopyDir::DOWN);
   uint32_t copyByteUnsynchronized = GenCopy(masm, SIZE8, 1, CopyDir::DOWN);
 
   uint32_t cmpxchg8SeqCst = GenCmpxchg(masm, SIZE8, Full);
   uint32_t cmpxchg16SeqCst = GenCmpxchg(masm, SIZE16, Full);
   uint32_t cmpxchg32SeqCst = GenCmpxchg(masm, SIZE32, Full);
   uint32_t cmpxchg64SeqCst = GenCmpxchg(masm, SIZE64, Full);
 
@@ -855,20 +853,19 @@ bool InitializeJittedAtomics() {
   masm.finish();
   if (masm.oom()) {
     return false;
   }
 
   // Allocate executable memory.
   uint32_t codeLength = masm.bytesNeeded();
   size_t roundedCodeLength = JS_ROUNDUP(codeLength, ExecutableCodePageSize);
-  uint8_t* code =
-    (uint8_t*)AllocateExecutableMemory(roundedCodeLength,
-                                       ProtectionSetting::Writable,
-                                       MemCheckKind::MakeUndefined);
+  uint8_t* code = (uint8_t*)AllocateExecutableMemory(
+      roundedCodeLength, ProtectionSetting::Writable,
+      MemCheckKind::MakeUndefined);
   if (!code) {
     return false;
   }
 
   // Zero the padding.
   memset(code + codeLength, 0, roundedCodeLength - codeLength);
 
   // Copy the code into place but do not flush, as the flush path requires a
@@ -881,152 +878,148 @@ bool InitializeJittedAtomics() {
   // Reprotect the whole region to avoid having separate RW and RX mappings.
   if (!ExecutableAllocator::makeExecutable(code, roundedCodeLength)) {
     DeallocateExecutableMemory(code, roundedCodeLength);
     return false;
   }
 
   // Create the function pointers.
 
-  AtomicFenceSeqCst = (void(*)())(code + fenceSeqCst);
+  AtomicFenceSeqCst = (void (*)())(code + fenceSeqCst);
 
 #ifndef JS_64BIT
-  AtomicCompilerFence = (void(*)())(code + nop);
+  AtomicCompilerFence = (void (*)())(code + nop);
 #endif
 
   AtomicLoad8SeqCst = (uint8_t(*)(const uint8_t* addr))(code + load8SeqCst);
   AtomicLoad16SeqCst = (uint16_t(*)(const uint16_t* addr))(code + load16SeqCst);
   AtomicLoad32SeqCst = (uint32_t(*)(const uint32_t* addr))(code + load32SeqCst);
 #ifdef JS_64BIT
   AtomicLoad64SeqCst = (uint64_t(*)(const uint64_t* addr))(code + load64SeqCst);
 #endif
 
   AtomicLoad8Unsynchronized =
-    (uint8_t(*)(const uint8_t* addr))(code + load8Unsynchronized);
+      (uint8_t(*)(const uint8_t* addr))(code + load8Unsynchronized);
   AtomicLoad16Unsynchronized =
-    (uint16_t(*)(const uint16_t* addr))(code + load16Unsynchronized);
+      (uint16_t(*)(const uint16_t* addr))(code + load16Unsynchronized);
   AtomicLoad32Unsynchronized =
-    (uint32_t(*)(const uint32_t* addr))(code + load32Unsynchronized);
+      (uint32_t(*)(const uint32_t* addr))(code + load32Unsynchronized);
 #ifdef JS_64BIT
   AtomicLoad64Unsynchronized =
-    (uint64_t(*)(const uint64_t* addr))(code + load64Unsynchronized);
+      (uint64_t(*)(const uint64_t* addr))(code + load64Unsynchronized);
 #endif
 
   AtomicStore8SeqCst =
-    (uint8_t(*)(uint8_t* addr, uint8_t val))(code + store8SeqCst);
+      (uint8_t(*)(uint8_t * addr, uint8_t val))(code + store8SeqCst);
   AtomicStore16SeqCst =
-    (uint16_t(*)(uint16_t* addr, uint16_t val))(code + store16SeqCst);
+      (uint16_t(*)(uint16_t * addr, uint16_t val))(code + store16SeqCst);
   AtomicStore32SeqCst =
-    (uint32_t(*)(uint32_t* addr, uint32_t val))(code + store32SeqCst);
+      (uint32_t(*)(uint32_t * addr, uint32_t val))(code + store32SeqCst);
 #ifdef JS_64BIT
   AtomicStore64SeqCst =
-    (uint64_t(*)(uint64_t* addr, uint64_t val))(code + store64SeqCst);
+      (uint64_t(*)(uint64_t * addr, uint64_t val))(code + store64SeqCst);
 #endif
 
   AtomicStore8Unsynchronized =
-    (uint8_t(*)(uint8_t* addr, uint8_t val))(code + store8Unsynchronized);
-  AtomicStore16Unsynchronized =
-    (uint16_t(*)(uint16_t* addr, uint16_t val))(code + store16Unsynchronized);
-  AtomicStore32Unsynchronized =
-    (uint32_t(*)(uint32_t* addr, uint32_t val))(code + store32Unsynchronized);
+      (uint8_t(*)(uint8_t * addr, uint8_t val))(code + store8Unsynchronized);
+  AtomicStore16Unsynchronized = (uint16_t(*)(uint16_t * addr, uint16_t val))(
+      code + store16Unsynchronized);
+  AtomicStore32Unsynchronized = (uint32_t(*)(uint32_t * addr, uint32_t val))(
+      code + store32Unsynchronized);
 #ifdef JS_64BIT
-  AtomicStore64Unsynchronized =
-    (uint64_t(*)(uint64_t* addr, uint64_t val))(code + store64Unsynchronized);
+  AtomicStore64Unsynchronized = (uint64_t(*)(uint64_t * addr, uint64_t val))(
+      code + store64Unsynchronized);
 #endif
 
   AtomicCopyUnalignedBlockDownUnsynchronized =
-    (void(*)(uint8_t* dest, const uint8_t* src))(
-      code + copyUnalignedBlockDownUnsynchronized);
+      (void (*)(uint8_t * dest, const uint8_t* src))(
+          code + copyUnalignedBlockDownUnsynchronized);
   AtomicCopyUnalignedBlockUpUnsynchronized =
-    (void(*)(uint8_t* dest, const uint8_t* src))(
-      code + copyUnalignedBlockUpUnsynchronized);
+      (void (*)(uint8_t * dest, const uint8_t* src))(
+          code + copyUnalignedBlockUpUnsynchronized);
   AtomicCopyUnalignedWordDownUnsynchronized =
-    (void(*)(uint8_t* dest, const uint8_t* src))(
-      code + copyUnalignedWordDownUnsynchronized);
+      (void (*)(uint8_t * dest, const uint8_t* src))(
+          code + copyUnalignedWordDownUnsynchronized);
   AtomicCopyUnalignedWordUpUnsynchronized =
-    (void(*)(uint8_t* dest, const uint8_t* src))(
-      code + copyUnalignedWordUpUnsynchronized);
+      (void (*)(uint8_t * dest, const uint8_t* src))(
+          code + copyUnalignedWordUpUnsynchronized);
 
-  AtomicCopyBlockDownUnsynchronized =
-    (void(*)(uint8_t* dest, const uint8_t* src))(
-      code + copyBlockDownUnsynchronized);
-  AtomicCopyBlockUpUnsynchronized =
-    (void(*)(uint8_t* dest, const uint8_t* src))(
-      code + copyBlockUpUnsynchronized);
-  AtomicCopyWordUnsynchronized =
-    (void(*)(uint8_t* dest, const uint8_t* src))(code + copyWordUnsynchronized);
-  AtomicCopyByteUnsynchronized =
-    (void(*)(uint8_t* dest, const uint8_t* src))(code + copyByteUnsynchronized);
+  AtomicCopyBlockDownUnsynchronized = (void (*)(
+      uint8_t * dest, const uint8_t* src))(code + copyBlockDownUnsynchronized);
+  AtomicCopyBlockUpUnsynchronized = (void (*)(
+      uint8_t * dest, const uint8_t* src))(code + copyBlockUpUnsynchronized);
+  AtomicCopyWordUnsynchronized = (void (*)(uint8_t * dest, const uint8_t* src))(
+      code + copyWordUnsynchronized);
+  AtomicCopyByteUnsynchronized = (void (*)(uint8_t * dest, const uint8_t* src))(
+      code + copyByteUnsynchronized);
 
-  AtomicCmpXchg8SeqCst =
-    (uint8_t(*)(uint8_t* addr, uint8_t oldval, uint8_t newval))(
-      code + cmpxchg8SeqCst);
+  AtomicCmpXchg8SeqCst = (uint8_t(*)(uint8_t * addr, uint8_t oldval,
+                                     uint8_t newval))(code + cmpxchg8SeqCst);
   AtomicCmpXchg16SeqCst =
-    (uint16_t(*)(uint16_t* addr, uint16_t oldval, uint16_t newval))(
-      code + cmpxchg16SeqCst);
+      (uint16_t(*)(uint16_t * addr, uint16_t oldval, uint16_t newval))(
+          code + cmpxchg16SeqCst);
   AtomicCmpXchg32SeqCst =
-    (uint32_t(*)(uint32_t* addr, uint32_t oldval, uint32_t newval))(
-      code + cmpxchg32SeqCst);
+      (uint32_t(*)(uint32_t * addr, uint32_t oldval, uint32_t newval))(
+          code + cmpxchg32SeqCst);
   AtomicCmpXchg64SeqCst =
-    (uint64_t(*)(uint64_t* addr, uint64_t oldval, uint64_t newval))(
-      code + cmpxchg64SeqCst);
+      (uint64_t(*)(uint64_t * addr, uint64_t oldval, uint64_t newval))(
+          code + cmpxchg64SeqCst);
 
-  AtomicExchange8SeqCst = (uint8_t(*)(uint8_t* addr, uint8_t val))(
-    code + exchange8SeqCst);
-  AtomicExchange16SeqCst = (uint16_t(*)(uint16_t* addr, uint16_t val))(
-    code + exchange16SeqCst);
-  AtomicExchange32SeqCst = (uint32_t(*)(uint32_t* addr, uint32_t val))(
-    code + exchange32SeqCst);
+  AtomicExchange8SeqCst =
+      (uint8_t(*)(uint8_t * addr, uint8_t val))(code + exchange8SeqCst);
+  AtomicExchange16SeqCst =
+      (uint16_t(*)(uint16_t * addr, uint16_t val))(code + exchange16SeqCst);
+  AtomicExchange32SeqCst =
+      (uint32_t(*)(uint32_t * addr, uint32_t val))(code + exchange32SeqCst);
 #ifdef JS_64BIT
-  AtomicExchange64SeqCst = (uint64_t(*)(uint64_t* addr, uint64_t val))(
-    code + exchange64SeqCst);
+  AtomicExchange64SeqCst =
+      (uint64_t(*)(uint64_t * addr, uint64_t val))(code + exchange64SeqCst);
 #endif
 
   AtomicAdd8SeqCst =
-    (uint8_t(*)(uint8_t* addr, uint8_t val))(code + add8SeqCst);
+      (uint8_t(*)(uint8_t * addr, uint8_t val))(code + add8SeqCst);
   AtomicAdd16SeqCst =
-    (uint16_t(*)(uint16_t* addr, uint16_t val))(code + add16SeqCst);
+      (uint16_t(*)(uint16_t * addr, uint16_t val))(code + add16SeqCst);
   AtomicAdd32SeqCst =
-    (uint32_t(*)(uint32_t* addr, uint32_t val))(code + add32SeqCst);
+      (uint32_t(*)(uint32_t * addr, uint32_t val))(code + add32SeqCst);
 #ifdef JS_64BIT
   AtomicAdd64SeqCst =
-    (uint64_t(*)(uint64_t* addr, uint64_t val))(code + add64SeqCst);
+      (uint64_t(*)(uint64_t * addr, uint64_t val))(code + add64SeqCst);
 #endif
 
   AtomicAnd8SeqCst =
-    (uint8_t(*)(uint8_t* addr, uint8_t val))(code + and8SeqCst);
+      (uint8_t(*)(uint8_t * addr, uint8_t val))(code + and8SeqCst);
   AtomicAnd16SeqCst =
-    (uint16_t(*)(uint16_t* addr, uint16_t val))(code + and16SeqCst);
+      (uint16_t(*)(uint16_t * addr, uint16_t val))(code + and16SeqCst);
   AtomicAnd32SeqCst =
-    (uint32_t(*)(uint32_t* addr, uint32_t val))(code + and32SeqCst);
+      (uint32_t(*)(uint32_t * addr, uint32_t val))(code + and32SeqCst);
 #ifdef JS_64BIT
   AtomicAnd64SeqCst =
-    (uint64_t(*)(uint64_t* addr, uint64_t val))(code + and64SeqCst);
+      (uint64_t(*)(uint64_t * addr, uint64_t val))(code + and64SeqCst);
 #endif
 
-  AtomicOr8SeqCst =
-    (uint8_t(*)(uint8_t* addr, uint8_t val))(code + or8SeqCst);
+  AtomicOr8SeqCst = (uint8_t(*)(uint8_t * addr, uint8_t val))(code + or8SeqCst);
   AtomicOr16SeqCst =
-    (uint16_t(*)(uint16_t* addr, uint16_t val))(code + or16SeqCst);
+      (uint16_t(*)(uint16_t * addr, uint16_t val))(code + or16SeqCst);
   AtomicOr32SeqCst =
-    (uint32_t(*)(uint32_t* addr, uint32_t val))(code + or32SeqCst);
+      (uint32_t(*)(uint32_t * addr, uint32_t val))(code + or32SeqCst);
 #ifdef JS_64BIT
   AtomicOr64SeqCst =
-    (uint64_t(*)(uint64_t* addr, uint64_t val))(code + or64SeqCst);
+      (uint64_t(*)(uint64_t * addr, uint64_t val))(code + or64SeqCst);
 #endif
 
   AtomicXor8SeqCst =
-    (uint8_t(*)(uint8_t* addr, uint8_t val))(code + xor8SeqCst);
+      (uint8_t(*)(uint8_t * addr, uint8_t val))(code + xor8SeqCst);
   AtomicXor16SeqCst =
-    (uint16_t(*)(uint16_t* addr, uint16_t val))(code + xor16SeqCst);
+      (uint16_t(*)(uint16_t * addr, uint16_t val))(code + xor16SeqCst);
   AtomicXor32SeqCst =
-    (uint32_t(*)(uint32_t* addr, uint32_t val))(code + xor32SeqCst);
+      (uint32_t(*)(uint32_t * addr, uint32_t val))(code + xor32SeqCst);
 #ifdef JS_64BIT
   AtomicXor64SeqCst =
-    (uint64_t(*)(uint64_t* addr, uint64_t val))(code + xor64SeqCst);
+      (uint64_t(*)(uint64_t * addr, uint64_t val))(code + xor64SeqCst);
 #endif
 
   codeSegment = code;
   codeSegmentSize = roundedCodeLength;
 
   return true;
 }
 
@@ -1034,10 +1027,10 @@ void ShutDownJittedAtomics() {
   // Must have been initialized.
   MOZ_ASSERT(codeSegment);
 
   DeallocateExecutableMemory(codeSegment, codeSegmentSize);
   codeSegment = nullptr;
   codeSegmentSize = 0;
 }
 
-} // jit
-} // js
+}  // namespace jit
+}  // namespace js
--- a/js/src/jit/shared/AtomicOperations-shared-jit.h
+++ b/js/src/jit/shared/AtomicOperations-shared-jit.h
@@ -119,58 +119,57 @@ extern uint16_t (*AtomicXor16SeqCst)(uin
 extern uint32_t (*AtomicXor32SeqCst)(uint32_t* addr, uint32_t val);
 #ifdef JS_64BIT
 extern uint64_t (*AtomicXor64SeqCst)(uint64_t* addr, uint64_t val);
 #endif
 
 // `cmpxchg` takes a cell address, an expected value and a replacement value.
 // If the value in the cell equals the expected value then the replacement value
 // is stored in the cell.  It always returns the value previously in the cell.
-extern uint8_t (*AtomicCmpXchg8SeqCst)(uint8_t* addr, uint8_t oldval, uint8_t newval);
-extern uint16_t (*AtomicCmpXchg16SeqCst)(uint16_t* addr, uint16_t oldval, uint16_t newval);
-extern uint32_t (*AtomicCmpXchg32SeqCst)(uint32_t* addr, uint32_t oldval, uint32_t newval);
-extern uint64_t (*AtomicCmpXchg64SeqCst)(uint64_t* addr, uint64_t oldval, uint64_t newval);
+extern uint8_t (*AtomicCmpXchg8SeqCst)(uint8_t* addr, uint8_t oldval,
+                                       uint8_t newval);
+extern uint16_t (*AtomicCmpXchg16SeqCst)(uint16_t* addr, uint16_t oldval,
+                                         uint16_t newval);
+extern uint32_t (*AtomicCmpXchg32SeqCst)(uint32_t* addr, uint32_t oldval,
+                                         uint32_t newval);
+extern uint64_t (*AtomicCmpXchg64SeqCst)(uint64_t* addr, uint64_t oldval,
+                                         uint64_t newval);
 
 // `...MemcpyDown` moves bytes toward lower addresses in memory: dest <= src.
 // `...MemcpyUp` moves bytes toward higher addresses in memory: dest >= src.
-extern void AtomicMemcpyDownUnsynchronized(uint8_t* dest, const uint8_t* src, size_t nbytes);
-extern void AtomicMemcpyUpUnsynchronized(uint8_t* dest, const uint8_t* src, size_t nbytes);
+extern void AtomicMemcpyDownUnsynchronized(uint8_t* dest, const uint8_t* src,
+                                           size_t nbytes);
+extern void AtomicMemcpyUpUnsynchronized(uint8_t* dest, const uint8_t* src,
+                                         size_t nbytes);
 
-} }
+}  // namespace jit
+}  // namespace js
 
-inline bool js::jit::AtomicOperations::hasAtomic8() {
-  return true;
-}
+inline bool js::jit::AtomicOperations::hasAtomic8() { return true; }
 
-inline bool js::jit::AtomicOperations::isLockfree8() {
-  return true;
-}
+inline bool js::jit::AtomicOperations::isLockfree8() { return true; }
+
+inline void js::jit::AtomicOperations::fenceSeqCst() { AtomicFenceSeqCst(); }
 
-inline void
-js::jit::AtomicOperations::fenceSeqCst() {
-  AtomicFenceSeqCst();
-}
-
-#define JIT_LOADOP(T, U, loadop)                            \
-  template<> inline T                                       \
-  AtomicOperations::loadSeqCst(T* addr) {                   \
-    JS::AutoSuppressGCAnalysis nogc;                        \
-    return (T)loadop((U*)addr);                             \
+#define JIT_LOADOP(T, U, loadop)                   \
+  template <>                                      \
+  inline T AtomicOperations::loadSeqCst(T* addr) { \
+    JS::AutoSuppressGCAnalysis nogc;               \
+    return (T)loadop((U*)addr);                    \
   }
 
 #ifndef JS_64BIT
-#  define JIT_LOADOP_CAS(T)                                     \
-  template<>                                                    \
-  inline T                                                      \
-  AtomicOperations::loadSeqCst(T* addr) {                       \
-    JS::AutoSuppressGCAnalysis nogc;                            \
-    AtomicCompilerFence();                                      \
-    return (T)AtomicCmpXchg64SeqCst((uint64_t*)addr, 0, 0);     \
-  }
-#endif // !JS_64BIT
+#  define JIT_LOADOP_CAS(T)                                   \
+    template <>                                               \
+    inline T AtomicOperations::loadSeqCst(T* addr) {          \
+      JS::AutoSuppressGCAnalysis nogc;                        \
+      AtomicCompilerFence();                                  \
+      return (T)AtomicCmpXchg64SeqCst((uint64_t*)addr, 0, 0); \
+    }
+#endif  // !JS_64BIT
 
 namespace js {
 namespace jit {
 
 JIT_LOADOP(int8_t, uint8_t, AtomicLoad8SeqCst)
 JIT_LOADOP(uint8_t, uint8_t, AtomicLoad8SeqCst)
 JIT_LOADOP(int16_t, uint16_t, AtomicLoad16SeqCst)
 JIT_LOADOP(uint16_t, uint16_t, AtomicLoad16SeqCst)
@@ -180,48 +179,47 @@ JIT_LOADOP(uint32_t, uint32_t, AtomicLoa
 #ifdef JIT_LOADOP_CAS
 JIT_LOADOP_CAS(int64_t)
 JIT_LOADOP_CAS(uint64_t)
 #else
 JIT_LOADOP(int64_t, uint64_t, AtomicLoad64SeqCst)
 JIT_LOADOP(uint64_t, uint64_t, AtomicLoad64SeqCst)
 #endif
 
-}}
+}  // namespace jit
+}  // namespace js
 
 #undef JIT_LOADOP
 #undef JIT_LOADOP_CAS
 
-#define JIT_STOREOP(T, U, storeop)                      \
-  template<> inline void                                \
-  AtomicOperations::storeSeqCst(T* addr, T val) {       \
-    JS::AutoSuppressGCAnalysis nogc;                    \
-    storeop((U*)addr, val);                             \
+#define JIT_STOREOP(T, U, storeop)                            \
+  template <>                                                 \
+  inline void AtomicOperations::storeSeqCst(T* addr, T val) { \
+    JS::AutoSuppressGCAnalysis nogc;                          \
+    storeop((U*)addr, val);                                   \
   }
 
 #ifndef JS_64BIT
-#  define JIT_STOREOP_CAS(T)                                          \
-  template<>                                                          \
-  inline void                                                         \
-  AtomicOperations::storeSeqCst(T* addr, T val) {                     \
-    JS::AutoSuppressGCAnalysis nogc;                                  \
-    AtomicCompilerFence();                                            \
-    T oldval = *addr; /* good initial approximation */                \
-    for (;;) {                                                        \
-      T nextval = (T)AtomicCmpXchg64SeqCst((uint64_t*)addr,           \
-                                           (uint64_t)oldval,          \
-                                           (uint64_t)val);            \
-      if (nextval == oldval) {                                        \
-        break;                                                        \
-      }                                                               \
-      oldval = nextval;                                               \
-    }                                                                 \
-    AtomicCompilerFence();                                            \
-  }
-#endif // !JS_64BIT
+#  define JIT_STOREOP_CAS(T)                                                   \
+    template <>                                                                \
+    inline void AtomicOperations::storeSeqCst(T* addr, T val) {                \
+      JS::AutoSuppressGCAnalysis nogc;                                         \
+      AtomicCompilerFence();                                                   \
+      T oldval = *addr; /* good initial approximation */                       \
+      for (;;) {                                                               \
+        T nextval = (T)AtomicCmpXchg64SeqCst((uint64_t*)addr,                  \
+                                             (uint64_t)oldval, (uint64_t)val); \
+        if (nextval == oldval) {                                               \
+          break;                                                               \
+        }                                                                      \
+        oldval = nextval;                                                      \
+      }                                                                        \
+      AtomicCompilerFence();                                                   \
+    }
+#endif  // !JS_64BIT
 
 namespace js {
 namespace jit {
 
 JIT_STOREOP(int8_t, uint8_t, AtomicStore8SeqCst)
 JIT_STOREOP(uint8_t, uint8_t, AtomicStore8SeqCst)
 JIT_STOREOP(int16_t, uint16_t, AtomicStore16SeqCst)
 JIT_STOREOP(uint16_t, uint16_t, AtomicStore16SeqCst)
@@ -231,48 +229,48 @@ JIT_STOREOP(uint32_t, uint32_t, AtomicSt
 #ifdef JIT_STOREOP_CAS
 JIT_STOREOP_CAS(int64_t)
 JIT_STOREOP_CAS(uint64_t)
 #else
 JIT_STOREOP(int64_t, uint64_t, AtomicStore64SeqCst)
 JIT_STOREOP(uint64_t, uint64_t, AtomicStore64SeqCst)
 #endif
 
-}}
+}  // namespace jit
+}  // namespace js
 
 #undef JIT_STOREOP
 #undef JIT_STOREOP_CAS
 
-#define JIT_EXCHANGEOP(T, U, xchgop)                            \
-  template<> inline T                                           \
-  AtomicOperations::exchangeSeqCst(T* addr, T val) {            \
-    JS::AutoSuppressGCAnalysis nogc;                            \
-    return (T)xchgop((U*)addr, (U)val);                         \
+#define JIT_EXCHANGEOP(T, U, xchgop)                          \
+  template <>                                                 \
+  inline T AtomicOperations::exchangeSeqCst(T* addr, T val) { \
+    JS::AutoSuppressGCAnalysis nogc;                          \
+    return (T)xchgop((U*)addr, (U)val);                       \
   }
 
 #ifndef JS_64BIT
-#  define JIT_EXCHANGEOP_CAS(T)                                       \
-  template<> inline T                                                 \
-  AtomicOperations::exchangeSeqCst(T* addr, T val) {                  \
-    JS::AutoSuppressGCAnalysis nogc;                                  \
-    AtomicCompilerFence();                                            \
-    T oldval = *addr;                                                 \
-    for (;;) {                                                        \
-      T nextval = (T)AtomicCmpXchg64SeqCst((uint64_t*)addr,           \
-                                           (uint64_t)oldval,          \
-                                           (uint64_t)val);            \
-      if (nextval == oldval) {                                        \
-        break;                                                        \
-      }                                                               \
-      oldval = nextval;                                               \
-    }                                                                 \
-    AtomicCompilerFence();                                            \
-    return oldval;                                                    \
-  }
-#endif // !JS_64BIT
+#  define JIT_EXCHANGEOP_CAS(T)                                                \
+    template <>                                                                \
+    inline T AtomicOperations::exchangeSeqCst(T* addr, T val) {                \
+      JS::AutoSuppressGCAnalysis nogc;                                         \
+      AtomicCompilerFence();                                                   \
+      T oldval = *addr;                                                        \
+      for (;;) {                                                               \
+        T nextval = (T)AtomicCmpXchg64SeqCst((uint64_t*)addr,                  \
+                                             (uint64_t)oldval, (uint64_t)val); \
+        if (nextval == oldval) {                                               \
+          break;                                                               \
+        }                                                                      \
+        oldval = nextval;                                                      \
+      }                                                                        \
+      AtomicCompilerFence();                                                   \
+      return oldval;                                                           \
+    }
+#endif  // !JS_64BIT
 
 namespace js {
 namespace jit {
 
 JIT_EXCHANGEOP(int8_t, uint8_t, AtomicExchange8SeqCst)
 JIT_EXCHANGEOP(uint8_t, uint8_t, AtomicExchange8SeqCst)
 JIT_EXCHANGEOP(int16_t, uint16_t, AtomicExchange16SeqCst)
 JIT_EXCHANGEOP(uint16_t, uint16_t, AtomicExchange16SeqCst)
@@ -282,324 +280,342 @@ JIT_EXCHANGEOP(uint32_t, uint32_t, Atomi
 #ifdef JIT_EXCHANGEOP_CAS
 JIT_EXCHANGEOP_CAS(int64_t)
 JIT_EXCHANGEOP_CAS(uint64_t)
 #else
 JIT_EXCHANGEOP(int64_t, uint64_t, AtomicExchange64SeqCst)
 JIT_EXCHANGEOP(uint64_t, uint64_t, AtomicExchange64SeqCst)
 #endif
 
-}}
+}  // namespace jit
+}  // namespace js
 
 #undef JIT_EXCHANGEOP
 #undef JIT_EXCHANGEOP_CAS
 
-#define JIT_CAS(T, U, cmpxchg)                                          \
-  template<> inline T                                                   \
-  AtomicOperations::compareExchangeSeqCst(T* addr, T oldval, T newval) { \
-    JS::AutoSuppressGCAnalysis nogc;                                    \
-    return (T)cmpxchg((U*)addr, (U)oldval, (U)newval);                  \
+#define JIT_CAS(T, U, cmpxchg)                                        \
+  template <>                                                         \
+  inline T AtomicOperations::compareExchangeSeqCst(T* addr, T oldval, \
+                                                   T newval) {        \
+    JS::AutoSuppressGCAnalysis nogc;                                  \
+    return (T)cmpxchg((U*)addr, (U)oldval, (U)newval);                \
   }
 
 namespace js {
 namespace jit {
 
 JIT_CAS(int8_t, uint8_t, AtomicCmpXchg8SeqCst)
 JIT_CAS(uint8_t, uint8_t, AtomicCmpXchg8SeqCst)
 JIT_CAS(int16_t, uint16_t, AtomicCmpXchg16SeqCst)
 JIT_CAS(uint16_t, uint16_t, AtomicCmpXchg16SeqCst)
 JIT_CAS(int32_t, uint32_t, AtomicCmpXchg32SeqCst)
 JIT_CAS(uint32_t, uint32_t, AtomicCmpXchg32SeqCst)
 JIT_CAS(int64_t, uint64_t, AtomicCmpXchg64SeqCst)
 JIT_CAS(uint64_t, uint64_t, AtomicCmpXchg64SeqCst)
 
-}}
+}  // namespace jit
+}  // namespace js
 
 #undef JIT_CAS
 
-#define JIT_FETCHADDOP(T, U, xadd)                                   \
-  template<> inline T                                                \
-  AtomicOperations::fetchAddSeqCst(T* addr, T val) {                 \
-    JS::AutoSuppressGCAnalysis nogc;                                 \
-    return (T)xadd((U*)addr, (U)val);                                \
-  }                                                                  \
+#define JIT_FETCHADDOP(T, U, xadd)                            \
+  template <>                                                 \
+  inline T AtomicOperations::fetchAddSeqCst(T* addr, T val) { \
+    JS::AutoSuppressGCAnalysis nogc;                          \
+    return (T)xadd((U*)addr, (U)val);                         \
+  }
 
-#define JIT_FETCHSUBOP(T)                                            \
-  template<> inline T                                                \
-  AtomicOperations::fetchSubSeqCst(T* addr, T val) {                 \
-    JS::AutoSuppressGCAnalysis nogc;                                 \
-    return fetchAddSeqCst(addr, (T)(0-val));                         \
+#define JIT_FETCHSUBOP(T)                                     \
+  template <>                                                 \
+  inline T AtomicOperations::fetchSubSeqCst(T* addr, T val) { \
+    JS::AutoSuppressGCAnalysis nogc;                          \
+    return fetchAddSeqCst(addr, (T)(0 - val));                \
   }
 
 #ifndef JS_64BIT
-#  define JIT_FETCHADDOP_CAS(T)                                         \
-  template<> inline T                                                   \
-  AtomicOperations::fetchAddSeqCst(T* addr, T val) {                    \
-    JS::AutoSuppressGCAnalysis nogc;                                    \
-    AtomicCompilerFence();                                              \
-    T oldval = *addr; /* Good initial approximation */                  \
-    for (;;) {                                                          \
-      T nextval = (T)AtomicCmpXchg64SeqCst((uint64_t*)addr,             \
-                                           (uint64_t)oldval,            \
-                                           (uint64_t)(oldval + val));   \
-      if (nextval == oldval) {                                          \
-        break;                                                          \
-      }                                                                 \
-      oldval = nextval;                                                 \
-    }                                                                   \
-    AtomicCompilerFence();                                              \
-    return oldval;                                                      \
-  }
-#endif // !JS_64BIT
+#  define JIT_FETCHADDOP_CAS(T)                                           \
+    template <>                                                           \
+    inline T AtomicOperations::fetchAddSeqCst(T* addr, T val) {           \
+      JS::AutoSuppressGCAnalysis nogc;                                    \
+      AtomicCompilerFence();                                              \
+      T oldval = *addr; /* Good initial approximation */                  \
+      for (;;) {                                                          \
+        T nextval = (T)AtomicCmpXchg64SeqCst(                             \
+            (uint64_t*)addr, (uint64_t)oldval, (uint64_t)(oldval + val)); \
+        if (nextval == oldval) {                                          \
+          break;                                                          \
+        }                                                                 \
+        oldval = nextval;                                                 \
+      }                                                                   \
+      AtomicCompilerFence();                                              \
+      return oldval;                                                      \
+    }
+#endif  // !JS_64BIT
 
 namespace js {
 namespace jit {
 
 JIT_FETCHADDOP(int8_t, uint8_t, AtomicAdd8SeqCst)
 JIT_FETCHADDOP(uint8_t, uint8_t, AtomicAdd8SeqCst)
 JIT_FETCHADDOP(int16_t, uint16_t, AtomicAdd16SeqCst)
 JIT_FETCHADDOP(uint16_t, uint16_t, AtomicAdd16SeqCst)
 JIT_FETCHADDOP(int32_t, uint32_t, AtomicAdd32SeqCst)
 JIT_FETCHADDOP(uint32_t, uint32_t, AtomicAdd32SeqCst)
 
 #ifdef JIT_FETCHADDOP_CAS
 JIT_FETCHADDOP_CAS(int64_t)
 JIT_FETCHADDOP_CAS(uint64_t)
 #else
-JIT_FETCHADDOP(int64_t,  uint64_t, AtomicAdd64SeqCst)
+JIT_FETCHADDOP(int64_t, uint64_t, AtomicAdd64SeqCst)
 JIT_FETCHADDOP(uint64_t, uint64_t, AtomicAdd64SeqCst)
 #endif
 
 JIT_FETCHSUBOP(int8_t)
 JIT_FETCHSUBOP(uint8_t)
 JIT_FETCHSUBOP(int16_t)
 JIT_FETCHSUBOP(uint16_t)
 JIT_FETCHSUBOP(int32_t)
 JIT_FETCHSUBOP(uint32_t)
 JIT_FETCHSUBOP(int64_t)
 JIT_FETCHSUBOP(uint64_t)
 
-}}
+}  // namespace jit
+}  // namespace js
 
 #undef JIT_FETCHADDOP
 #undef JIT_FETCHADDOP_CAS
 #undef JIT_FETCHSUBOP
 
-#define JIT_FETCHBITOPX(T, U, name, op)                                 \
-  template<> inline T                                                   \
-  AtomicOperations::name(T* addr, T val) {                              \
-    JS::AutoSuppressGCAnalysis nogc;                                    \
-    return (T)op((U *)addr, (U)val);                                    \
+#define JIT_FETCHBITOPX(T, U, name, op)             \
+  template <>                                       \
+  inline T AtomicOperations::name(T* addr, T val) { \
+    JS::AutoSuppressGCAnalysis nogc;                \
+    return (T)op((U*)addr, (U)val);                 \
   }
 
-#define JIT_FETCHBITOP(T, U, andop, orop, xorop)                        \
-  JIT_FETCHBITOPX(T, U, fetchAndSeqCst, andop)                          \
-  JIT_FETCHBITOPX(T, U, fetchOrSeqCst, orop)                            \
+#define JIT_FETCHBITOP(T, U, andop, orop, xorop) \
+  JIT_FETCHBITOPX(T, U, fetchAndSeqCst, andop)   \
+  JIT_FETCHBITOPX(T, U, fetchOrSeqCst, orop)     \
   JIT_FETCHBITOPX(T, U, fetchXorSeqCst, xorop)
 
 #ifndef JS_64BIT
 
 #  define AND_OP &
-#  define OR_OP  |
+#  define OR_OP |
 #  define XOR_OP ^
 
-#  define JIT_FETCHBITOPX_CAS(T, name, OP)                              \
-  template<> inline T                                                   \
-  AtomicOperations::name(T* addr, T val) {                              \
-    JS::AutoSuppressGCAnalysis nogc;                                    \
-    AtomicCompilerFence();                                              \
-    T oldval = *addr;                                                   \
-    for (;;) {                                                          \
-      T nextval = (T)AtomicCmpXchg64SeqCst((uint64_t*)addr,             \
-                                           (uint64_t)oldval,            \
-                                           (uint64_t)(oldval OP val));  \
-      if (nextval == oldval) {                                          \
-        break;                                                          \
-      }                                                                 \
-      oldval = nextval;                                                 \
-    }                                                                   \
-    AtomicCompilerFence();                                              \
-    return oldval;                                                      \
-  }
+#  define JIT_FETCHBITOPX_CAS(T, name, OP)                                 \
+    template <>                                                            \
+    inline T AtomicOperations::name(T* addr, T val) {                      \
+      JS::AutoSuppressGCAnalysis nogc;                                     \
+      AtomicCompilerFence();                                               \
+      T oldval = *addr;                                                    \
+      for (;;) {                                                           \
+        T nextval = (T)AtomicCmpXchg64SeqCst(                              \
+            (uint64_t*)addr, (uint64_t)oldval, (uint64_t)(oldval OP val)); \
+        if (nextval == oldval) {                                           \
+          break;                                                           \
+        }                                                                  \
+        oldval = nextval;                                                  \
+      }                                                                    \
+      AtomicCompilerFence();                                               \
+      return oldval;                                                       \
+    }
 
-#  define JIT_FETCHBITOP_CAS(T)                                      \
-  JIT_FETCHBITOPX_CAS(T, fetchAndSeqCst, AND_OP)                     \
-  JIT_FETCHBITOPX_CAS(T, fetchOrSeqCst, OR_OP)                       \
-  JIT_FETCHBITOPX_CAS(T, fetchXorSeqCst, XOR_OP)
+#  define JIT_FETCHBITOP_CAS(T)                    \
+    JIT_FETCHBITOPX_CAS(T, fetchAndSeqCst, AND_OP) \
+    JIT_FETCHBITOPX_CAS(T, fetchOrSeqCst, OR_OP)   \
+    JIT_FETCHBITOPX_CAS(T, fetchXorSeqCst, XOR_OP)
 
 #endif  // !JS_64BIT
 
 namespace js {
 namespace jit {
 
-JIT_FETCHBITOP(int8_t, uint8_t, AtomicAnd8SeqCst, AtomicOr8SeqCst, AtomicXor8SeqCst)
-JIT_FETCHBITOP(uint8_t, uint8_t, AtomicAnd8SeqCst, AtomicOr8SeqCst, AtomicXor8SeqCst)
-JIT_FETCHBITOP(int16_t, uint16_t, AtomicAnd16SeqCst, AtomicOr16SeqCst, AtomicXor16SeqCst)
-JIT_FETCHBITOP(uint16_t, uint16_t, AtomicAnd16SeqCst, AtomicOr16SeqCst, AtomicXor16SeqCst)
-JIT_FETCHBITOP(int32_t, uint32_t,  AtomicAnd32SeqCst, AtomicOr32SeqCst, AtomicXor32SeqCst)
-JIT_FETCHBITOP(uint32_t, uint32_t, AtomicAnd32SeqCst, AtomicOr32SeqCst, AtomicXor32SeqCst)
+JIT_FETCHBITOP(int8_t, uint8_t, AtomicAnd8SeqCst, AtomicOr8SeqCst,
+               AtomicXor8SeqCst)
+JIT_FETCHBITOP(uint8_t, uint8_t, AtomicAnd8SeqCst, AtomicOr8SeqCst,
+               AtomicXor8SeqCst)
+JIT_FETCHBITOP(int16_t, uint16_t, AtomicAnd16SeqCst, AtomicOr16SeqCst,
+               AtomicXor16SeqCst)
+JIT_FETCHBITOP(uint16_t, uint16_t, AtomicAnd16SeqCst, AtomicOr16SeqCst,
+               AtomicXor16SeqCst)
+JIT_FETCHBITOP(int32_t, uint32_t, AtomicAnd32SeqCst, AtomicOr32SeqCst,
+               AtomicXor32SeqCst)
+JIT_FETCHBITOP(uint32_t, uint32_t, AtomicAnd32SeqCst, AtomicOr32SeqCst,
+               AtomicXor32SeqCst)
 
 #ifdef JIT_FETCHBITOP_CAS
 JIT_FETCHBITOP_CAS(int64_t)
 JIT_FETCHBITOP_CAS(uint64_t)
 #else
-JIT_FETCHBITOP(int64_t,  uint64_t, AtomicAnd64SeqCst, AtomicOr64SeqCst, AtomicXor64SeqCst)
-JIT_FETCHBITOP(uint64_t, uint64_t, AtomicAnd64SeqCst, AtomicOr64SeqCst, AtomicXor64SeqCst)
+JIT_FETCHBITOP(int64_t, uint64_t, AtomicAnd64SeqCst, AtomicOr64SeqCst,
+               AtomicXor64SeqCst)
+JIT_FETCHBITOP(uint64_t, uint64_t, AtomicAnd64SeqCst, AtomicOr64SeqCst,
+               AtomicXor64SeqCst)
 #endif
 
-}}
+}  // namespace jit
+}  // namespace js
 
 #undef JIT_FETCHBITOPX_CAS
 #undef JIT_FETCHBITOPX
 #undef JIT_FETCHBITOP_CAS
 #undef JIT_FETCHBITOP
 
-#define JIT_LOADSAFE(T, U, loadop)                              \
-  template<>                                                    \
-  inline T                                                      \
-  js::jit::AtomicOperations::loadSafeWhenRacy(T* addr) {        \
-    JS::AutoSuppressGCAnalysis nogc;                            \
-    union { U u; T t; };                                        \
-    u = loadop((U*)addr);                                       \
-    return t;                                                   \
+#define JIT_LOADSAFE(T, U, loadop)                                \
+  template <>                                                     \
+  inline T js::jit::AtomicOperations::loadSafeWhenRacy(T* addr) { \
+    JS::AutoSuppressGCAnalysis nogc;                              \
+    union {                                                       \
+      U u;                                                        \
+      T t;                                                        \
+    };                                                            \
+    u = loadop((U*)addr);                                         \
+    return t;                                                     \
   }
 
 #ifndef JS_64BIT
-#  define JIT_LOADSAFE_TEARING(T)                               \
-  template<>                                                    \
-  inline T                                                      \
-  js::jit::AtomicOperations::loadSafeWhenRacy(T* addr) {        \
-    JS::AutoSuppressGCAnalysis nogc;                            \
-    MOZ_ASSERT(sizeof(T) == 8);                                 \
-    union { uint32_t u[2]; T t; };                              \
-    uint32_t* ptr = (uint32_t*)addr;                            \
-    u[0] = AtomicLoad32Unsynchronized(ptr);                     \
-    u[1] = AtomicLoad32Unsynchronized(ptr + 1);                 \
-    return t;                                                   \
-  }
-#endif // !JS_64BIT
+#  define JIT_LOADSAFE_TEARING(T)                                   \
+    template <>                                                     \
+    inline T js::jit::AtomicOperations::loadSafeWhenRacy(T* addr) { \
+      JS::AutoSuppressGCAnalysis nogc;                              \
+      MOZ_ASSERT(sizeof(T) == 8);                                   \
+      union {                                                       \
+        uint32_t u[2];                                              \
+        T t;                                                        \
+      };                                                            \
+      uint32_t* ptr = (uint32_t*)addr;                              \
+      u[0] = AtomicLoad32Unsynchronized(ptr);                       \
+      u[1] = AtomicLoad32Unsynchronized(ptr + 1);                   \
+      return t;                                                     \
+    }
+#endif  // !JS_64BIT
 
 namespace js {
 namespace jit {
 
-JIT_LOADSAFE(int8_t,   uint8_t, AtomicLoad8Unsynchronized)
-JIT_LOADSAFE(uint8_t,  uint8_t, AtomicLoad8Unsynchronized)
-JIT_LOADSAFE(int16_t,  uint16_t, AtomicLoad16Unsynchronized)
+JIT_LOADSAFE(int8_t, uint8_t, AtomicLoad8Unsynchronized)
+JIT_LOADSAFE(uint8_t, uint8_t, AtomicLoad8Unsynchronized)
+JIT_LOADSAFE(int16_t, uint16_t, AtomicLoad16Unsynchronized)
 JIT_LOADSAFE(uint16_t, uint16_t, AtomicLoad16Unsynchronized)
-JIT_LOADSAFE(int32_t,  uint32_t, AtomicLoad32Unsynchronized)
+JIT_LOADSAFE(int32_t, uint32_t, AtomicLoad32Unsynchronized)
 JIT_LOADSAFE(uint32_t, uint32_t, AtomicLoad32Unsynchronized)
 #ifdef JIT_LOADSAFE_TEARING
 JIT_LOADSAFE_TEARING(int64_t)
 JIT_LOADSAFE_TEARING(uint64_t)
 JIT_LOADSAFE_TEARING(double)
 #else
-JIT_LOADSAFE(int64_t,  uint64_t, AtomicLoad64Unsynchronized)
+JIT_LOADSAFE(int64_t, uint64_t, AtomicLoad64Unsynchronized)
 JIT_LOADSAFE(uint64_t, uint64_t, AtomicLoad64Unsynchronized)
-JIT_LOADSAFE(double,   uint64_t, AtomicLoad64Unsynchronized)
+JIT_LOADSAFE(double, uint64_t, AtomicLoad64Unsynchronized)
 #endif
-JIT_LOADSAFE(float,    uint32_t, AtomicLoad32Unsynchronized)
+JIT_LOADSAFE(float, uint32_t, AtomicLoad32Unsynchronized)
 
 // Clang requires a specialization for uint8_clamped.
-template<>
+template <>
 inline uint8_clamped js::jit::AtomicOperations::loadSafeWhenRacy(
-  uint8_clamped* addr) {
+    uint8_clamped* addr) {
   return uint8_clamped(loadSafeWhenRacy((uint8_t*)addr));
 }
 
-}}
+}  // namespace jit
+}  // namespace js
 
 #undef JIT_LOADSAFE
 #undef JIT_LOADSAFE_TEARING
 
-#define JIT_STORESAFE(T, U, storeop)                               \
-  template<>                                                       \
-  inline void                                                      \
-  js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val) {   \
-    JS::AutoSuppressGCAnalysis nogc;                               \
-    union { U u; T t; };                                           \
-    t = val;                                                       \
-    storeop((U*)addr, u);                                          \
+#define JIT_STORESAFE(T, U, storeop)                                         \
+  template <>                                                                \
+  inline void js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val) { \
+    JS::AutoSuppressGCAnalysis nogc;                                         \
+    union {                                                                  \
+      U u;                                                                   \
+      T t;                                                                   \
+    };                                                                       \
+    t = val;                                                                 \
+    storeop((U*)addr, u);                                                    \
   }
 
 #ifndef JS_64BIT
-#  define JIT_STORESAFE_TEARING(T)                                    \
-  template<>                                                          \
-  inline void                                                         \
-  js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val) {      \
-    JS::AutoSuppressGCAnalysis nogc;                                  \
-    union { uint32_t u[2]; T t; };                                    \
-    t = val;                                                          \
-    uint32_t* ptr = (uint32_t*)addr;                                  \
-    AtomicStore32Unsynchronized(ptr, u[0]);                           \
-    AtomicStore32Unsynchronized(ptr + 1, u[1]);                       \
-  }
-#endif // !JS_64BIT
+#  define JIT_STORESAFE_TEARING(T)                                             \
+    template <>                                                                \
+    inline void js::jit::AtomicOperations::storeSafeWhenRacy(T* addr, T val) { \
+      JS::AutoSuppressGCAnalysis nogc;                                         \
+      union {                                                                  \
+        uint32_t u[2];                                                         \
+        T t;                                                                   \
+      };                                                                       \
+      t = val;                                                                 \
+      uint32_t* ptr = (uint32_t*)addr;                                         \
+      AtomicStore32Unsynchronized(ptr, u[0]);                                  \
+      AtomicStore32Unsynchronized(ptr + 1, u[1]);                              \
+    }
+#endif  // !JS_64BIT
 
 namespace js {
 namespace jit {
 
-JIT_STORESAFE(int8_t,   uint8_t, AtomicStore8Unsynchronized)
-JIT_STORESAFE(uint8_t,  uint8_t, AtomicStore8Unsynchronized)
-JIT_STORESAFE(int16_t,  uint16_t, AtomicStore16Unsynchronized)
+JIT_STORESAFE(int8_t, uint8_t, AtomicStore8Unsynchronized)
+JIT_STORESAFE(uint8_t, uint8_t, AtomicStore8Unsynchronized)
+JIT_STORESAFE(int16_t, uint16_t, AtomicStore16Unsynchronized)
 JIT_STORESAFE(uint16_t, uint16_t, AtomicStore16Unsynchronized)
-JIT_STORESAFE(int32_t,  uint32_t, AtomicStore32Unsynchronized)
+JIT_STORESAFE(int32_t, uint32_t, AtomicStore32Unsynchronized)
 JIT_STORESAFE(uint32_t, uint32_t, AtomicStore32Unsynchronized)
 #ifdef JIT_STORESAFE_TEARING
 JIT_STORESAFE_TEARING(int64_t)
 JIT_STORESAFE_TEARING(uint64_t)
 JIT_STORESAFE_TEARING(double)
 #else
-JIT_STORESAFE(int64_t,  uint64_t, AtomicStore64Unsynchronized)
+JIT_STORESAFE(int64_t, uint64_t, AtomicStore64Unsynchronized)
 JIT_STORESAFE(uint64_t, uint64_t, AtomicStore64Unsynchronized)
-JIT_STORESAFE(double,   uint64_t, AtomicStore64Unsynchronized)
+JIT_STORESAFE(double, uint64_t, AtomicStore64Unsynchronized)
 #endif
-JIT_STORESAFE(float,    uint32_t, AtomicStore32Unsynchronized)
+JIT_STORESAFE(float, uint32_t, AtomicStore32Unsynchronized)
 
 // Clang requires a specialization for uint8_clamped.
-template<>
+template <>
 inline void js::jit::AtomicOperations::storeSafeWhenRacy(uint8_clamped* addr,
                                                          uint8_clamped val) {
-    storeSafeWhenRacy((uint8_t*)addr, (uint8_t)val);
+  storeSafeWhenRacy((uint8_t*)addr, (uint8_t)val);
 }
 
-}}
+}  // namespace jit
+}  // namespace js
 
 #undef JIT_STORESAFE
 #undef JIT_STORESAFE_TEARING
 
 void js::jit::AtomicOperations::memcpySafeWhenRacy(void* dest, const void* src,
                                                    size_t nbytes) {
-    JS::AutoSuppressGCAnalysis nogc;
-    MOZ_ASSERT(!((char*)dest <= (char*)src && (char*)src < (char*)dest+nbytes));
-    MOZ_ASSERT(!((char*)src <= (char*)dest && (char*)dest < (char*)src+nbytes));
-    AtomicMemcpyDownUnsynchronized((uint8_t*)dest, (const uint8_t*)src, nbytes);
+  JS::AutoSuppressGCAnalysis nogc;
+  MOZ_ASSERT(!((char*)dest <= (char*)src && (char*)src < (char*)dest + nbytes));
+  MOZ_ASSERT(!((char*)src <= (char*)dest && (char*)dest < (char*)src + nbytes));
+  AtomicMemcpyDownUnsynchronized((uint8_t*)dest, (const uint8_t*)src, nbytes);
 }
 
 inline void js::jit::AtomicOperations::memmoveSafeWhenRacy(void* dest,
                                                            const void* src,
                                                            size_t nbytes) {
-    JS::AutoSuppressGCAnalysis nogc;
-    if ((char*)dest <= (char*)src) {
-        AtomicMemcpyDownUnsynchronized((uint8_t*)dest, (const uint8_t*)src,
-                                       nbytes);
-    } else {
-        AtomicMemcpyUpUnsynchronized((uint8_t*)dest, (const uint8_t*)src,
-                                     nbytes);
-    }
+  JS::AutoSuppressGCAnalysis nogc;
+  if ((char*)dest <= (char*)src) {
+    AtomicMemcpyDownUnsynchronized((uint8_t*)dest, (const uint8_t*)src, nbytes);
+  } else {
+    AtomicMemcpyUpUnsynchronized((uint8_t*)dest, (const uint8_t*)src, nbytes);
+  }
 }
 
 namespace js {
 namespace jit {
 
 extern bool InitializeJittedAtomics();
 extern void ShutDownJittedAtomics();
 
-}}
+}  // namespace jit
+}  // namespace js
 
 inline bool js::jit::AtomicOperations::Initialize() {
   return InitializeJittedAtomics();
 }
 
-inline void js::jit::AtomicOperations::ShutDown() {
-  ShutDownJittedAtomics();
-}
+inline void js::jit::AtomicOperations::ShutDown() { ShutDownJittedAtomics(); }
 
-#endif // jit_shared_AtomicOperations_shared_jit_h
+#endif  // jit_shared_AtomicOperations_shared_jit_h
--- a/js/src/jit/shared/LIR-shared.h
+++ b/js/src/jit/shared/LIR-shared.h
@@ -454,33 +454,16 @@ class LNewCallObject : public LInstructi
     setTemp(0, temp);
   }
 
   const LDefinition* temp() { return getTemp(0); }
 
   MNewCallObject* mir() const { return mir_->toNewCallObject(); }
 };
 
-// Performs a callVM to allocate a new CallObject with singleton type.
-class LNewSingletonCallObject : public LInstructionHelper<1, 0, 1> {
- public:
-  LIR_HEADER(NewSingletonCallObject)
-
-  explicit LNewSingletonCallObject(const LDefinition& temp)
-      : LInstructionHelper(classOpcode) {
-    setTemp(0, temp);
-  }
-
-  const LDefinition* temp() { return getTemp(0); }
-
-  MNewSingletonCallObject* mir() const {
-    return mir_->toNewSingletonCallObject();
-  }
-};
-
 class LNewDerivedTypedObject : public LCallInstructionHelper<1, 3, 0> {
  public:
   LIR_HEADER(NewDerivedTypedObject);
 
   LNewDerivedTypedObject(const LAllocation& type, const LAllocation& owner,
                          const LAllocation& offset)
       : LCallInstructionHelper(classOpcode) {
     setOperand(0, type);
@@ -5626,25 +5609,16 @@ class LSetFrameArgumentV : public LInstr
     setBoxOperand(Input, input);
   }
 
   static const size_t Input = 0;
 
   MSetFrameArgument* mir() const { return mir_->toSetFrameArgument(); }
 };
 
-class LRunOncePrologue : public LCallInstructionHelper<0, 0, 0> {
- public:
-  LIR_HEADER(RunOncePrologue)
-
-  MRunOncePrologue* mir() const { return mir_->toRunOncePrologue(); }
-
-  LRunOncePrologue() : LCallInstructionHelper(classOpcode) {}
-};
-
 // Create the rest parameter.
 class LRest : public LCallInstructionHelper<1, 1, 3> {
  public:
   LIR_HEADER(Rest)
 
   LRest(const LAllocation& numActuals, const LDefinition& temp1,
         const LDefinition& temp2, const LDefinition& temp3)
       : LCallInstructionHelper(classOpcode) {
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -3421,16 +3421,19 @@ void JS::TransitiveCompileOptions::copyP
   forceAsync = rhs.forceAsync;
   sourceIsLazy = rhs.sourceIsLazy;
   introductionType = rhs.introductionType;
   introductionLineno = rhs.introductionLineno;
   introductionOffset = rhs.introductionOffset;
   hasIntroductionInfo = rhs.hasIntroductionInfo;
   isProbablySystemCode = rhs.isProbablySystemCode;
   hideScriptFromDebugger = rhs.hideScriptFromDebugger;
+#ifdef ENABLE_BIGINT
+  bigIntEnabledOption = rhs.bigIntEnabledOption;
+#endif
 };
 
 void JS::ReadOnlyCompileOptions::copyPODOptions(
     const ReadOnlyCompileOptions& rhs) {
   copyPODTransitiveOptions(rhs);
   lineno = rhs.lineno;
   column = rhs.column;
   scriptSourceOffset = rhs.scriptSourceOffset;
@@ -3547,16 +3550,19 @@ JS::CompileOptions::CompileOptions(JSCon
     asmJSOption = AsmJSOption::Disabled;
   } else if (cx->realm()->debuggerObservesAsmJS()) {
     asmJSOption = AsmJSOption::DisabledByDebugger;
   } else {
     asmJSOption = AsmJSOption::Enabled;
   }
   throwOnAsmJSValidationFailureOption =
       cx->options().throwOnAsmJSValidationFailure();
+#ifdef ENABLE_BIGINT
+  bigIntEnabledOption = cx->realm()->creationOptions().getBigIntEnabled();
+#endif
 }
 
 CompileOptions& CompileOptions::setIntroductionInfoToCaller(
     JSContext* cx, const char* introductionType) {
   RootedScript maybeScript(cx);
   const char* filename;
   unsigned lineno;
   uint32_t pcOffset;
--- a/js/src/vm/BytecodeUtil.cpp
+++ b/js/src/vm/BytecodeUtil.cpp
@@ -1437,18 +1437,17 @@ static unsigned Disassemble1(JSContext* 
       }
       if (!sp->jsprintf(" %s", bytes.get())) {
         return 0;
       }
       break;
     }
 
     case JOF_ENVCOORD: {
-      RootedValue v(cx, StringValue(EnvironmentCoordinateName(
-                            cx->caches().envCoordinateNameCache, script, pc)));
+      RootedValue v(cx, StringValue(EnvironmentCoordinateNameSlow(script, pc)));
       UniqueChars bytes = ToDisassemblySource(cx, v);
       if (!bytes) {
         return 0;
       }
       EnvironmentCoordinate ec(pc);
       if (!sp->jsprintf(" %s (hops = %u, slot = %u)", bytes.get(), ec.hops(),
                         ec.slot())) {
         return 0;
@@ -1765,18 +1764,17 @@ bool ExpressionDecompiler::decompilePC(j
       return write(atom);
     }
     case JSOP_GETLOCAL: {
       JSAtom* atom = FrameSlotName(script, pc);
       MOZ_ASSERT(atom);
       return write(atom);
     }
     case JSOP_GETALIASEDVAR: {
-      JSAtom* atom = EnvironmentCoordinateName(
-          cx->caches().envCoordinateNameCache, script, pc);
+      JSAtom* atom = EnvironmentCoordinateNameSlow(script, pc);
       MOZ_ASSERT(atom);
       return write(atom);
     }
 
     case JSOP_DELPROP:
     case JSOP_STRICTDELPROP:
     case JSOP_LENGTH:
     case JSOP_GETPROP:
--- a/js/src/vm/Caches.h
+++ b/js/src/vm/Caches.h
@@ -38,31 +38,16 @@ struct GSNCache {
   jsbytecode* code;
   Map map;
 
   GSNCache() : code(nullptr) {}
 
   void purge();
 };
 
-/*
- * EnvironmentCoordinateName cache to avoid O(n^2) growth in finding the name
- * associated with a given aliasedvar operation.
- */
-struct EnvironmentCoordinateNameCache {
-  typedef HashMap<uint32_t, jsid, DefaultHasher<uint32_t>, SystemAllocPolicy>
-      Map;
-
-  Shape* shape;
-  Map map;
-
-  EnvironmentCoordinateNameCache() : shape(nullptr) {}
-  void purge();
-};
-
 struct EvalCacheEntry {
   JSLinearString* str;
   JSScript* script;
   JSScript* callerScript;
   jsbytecode* pc;
 
   // We sweep this cache before a nursery collection to remove entries with
   // string keys in the nursery.
@@ -234,17 +219,16 @@ class NewObjectCache {
     dst->initGroup(src->group());
     dst->initShape(src->shape());
   }
 };
 
 class RuntimeCaches {
  public:
   js::GSNCache gsnCache;
-  js::EnvironmentCoordinateNameCache envCoordinateNameCache;
   js::NewObjectCache newObjectCache;
   js::UncompressedSourceCache uncompressedSourceCache;
   js::EvalCache evalCache;
 
   void purgeForMinorGC(JSRuntime* rt) {
     newObjectCache.clearNurseryObjects(rt);
     evalCache.sweep();
   }
@@ -252,16 +236,15 @@ class RuntimeCaches {
   void purgeForCompaction() {
     newObjectCache.purge();
     evalCache.clear();
   }
 
   void purge() {
     purgeForCompaction();
     gsnCache.purge();
-    envCoordinateNameCache.purge();
     uncompressedSourceCache.purge();
   }
 };
 
 }  // namespace js
 
 #endif /* vm_Caches_h */
--- a/js/src/vm/EnvironmentObject-inl.h
+++ b/js/src/vm/EnvironmentObject-inl.h
@@ -30,44 +30,32 @@ inline JSObject& GetVariablesObject(JSOb
   while (!envChain->isQualifiedVarObj()) {
     envChain = envChain->enclosingEnvironment();
   }
   MOZ_ASSERT(envChain);
   return *envChain;
 }
 
 inline void EnvironmentObject::setAliasedBinding(JSContext* cx, uint32_t slot,
-                                                 PropertyName* name,
                                                  const Value& v) {
-  if (isSingleton()) {
-    MOZ_ASSERT(name);
-    AddTypePropertyId(cx, this, NameToId(name), v);
-
-    // Keep track of properties which have ever been overwritten.
-    if (!getSlot(slot).isUndefined()) {
-      Shape* shape = lookup(cx, name);
-      shape->setOverwritten();
-    }
-  }
-
+  MOZ_ASSERT(!isSingleton());
   setSlot(slot, v);
 }
 
 inline void EnvironmentObject::setAliasedBinding(JSContext* cx,
                                                  EnvironmentCoordinate ec,
-                                                 PropertyName* name,
                                                  const Value& v) {
-  setAliasedBinding(cx, ec.slot(), name, v);
+  setAliasedBinding(cx, ec.slot(), v);
 }
 
 inline void EnvironmentObject::setAliasedBinding(JSContext* cx,
                                                  const BindingIter& bi,
                                                  const Value& v) {
   MOZ_ASSERT(bi.location().kind() == BindingLocation::Kind::Environment);
-  setAliasedBinding(cx, bi.location().slot(), bi.name()->asPropertyName(), v);
+  setAliasedBinding(cx, bi.location().slot(), v);
 }
 
 inline void CallObject::setAliasedFormalFromArguments(JSContext* cx,
                                                       const Value& argsValue,
                                                       jsid id, const Value& v) {
   setSlot(ArgumentsObject::SlotFromMagicScopeSlotValue(argsValue), v);
   if (isSingleton()) {
     AddTypePropertyId(cx, this, id, v);
--- a/js/src/vm/EnvironmentObject.cpp
+++ b/js/src/vm/EnvironmentObject.cpp
@@ -45,119 +45,51 @@ Shape* js::EnvironmentCoordinateToEnviro
       }
       hops--;
     }
     si++;
   }
   return si.environmentShape();
 }
 
-static const uint32_t ENV_COORDINATE_NAME_THRESHOLD = 20;
-
-void EnvironmentCoordinateNameCache::purge() {
-  shape = nullptr;
-  map.clearAndCompact();
-}
-
-PropertyName* js::EnvironmentCoordinateName(
-    EnvironmentCoordinateNameCache& cache, JSScript* script, jsbytecode* pc) {
+PropertyName* js::EnvironmentCoordinateNameSlow(JSScript* script,
+                                                jsbytecode* pc) {
   Shape* shape = EnvironmentCoordinateToEnvironmentShape(script, pc);
-  if (shape != cache.shape && shape->slot() >= ENV_COORDINATE_NAME_THRESHOLD) {
-    cache.purge();
-    if (cache.map.reserve(shape->slot())) {
-      cache.shape = shape;
-      Shape::Range<NoGC> r(shape);
-      while (!r.empty()) {
-        cache.map.putNewInfallible(r.front().slot(), r.front().propid());
-        r.popFront();
-      }
-    }
+  EnvironmentCoordinate ec(pc);
+
+  Shape::Range<NoGC> r(shape);
+  while (r.front().slot() != ec.slot()) {
+    r.popFront();
   }
-
-  jsid id;
-  EnvironmentCoordinate ec(pc);
-  if (shape == cache.shape) {
-    EnvironmentCoordinateNameCache::Map::Ptr p = cache.map.lookup(ec.slot());
-    id = p->value();
-  } else {
-    Shape::Range<NoGC> r(shape);
-    while (r.front().slot() != ec.slot()) {
-      r.popFront();
-    }
-    id = r.front().propidRaw();
-  }
+  jsid id = r.front().propidRaw();
 
   /* Beware nameless destructuring formal. */
   if (!JSID_IS_ATOM(id)) {
     return script->runtimeFromAnyThread()->commonNames->empty;
   }
   return JSID_TO_ATOM(id)->asPropertyName();
 }
 
-JSScript* js::EnvironmentCoordinateFunctionScript(JSScript* script,
-                                                  jsbytecode* pc) {
-  MOZ_ASSERT(JOF_OPTYPE(JSOp(*pc)) == JOF_ENVCOORD);
-  ScopeIter si(script->innermostScope(pc));
-  uint32_t hops = EnvironmentCoordinate(pc).hops();
-  while (true) {
-    if (si.hasSyntacticEnvironment()) {
-      if (!hops) {
-        break;
-      }
-      hops--;
-    }
-    si++;
-  }
-  if (si.kind() != ScopeKind::Function) {
-    return nullptr;
-  }
-  return si.scope()->as<FunctionScope>().script();
-}
-
 /*****************************************************************************/
 
 CallObject* CallObject::create(JSContext* cx, HandleShape shape,
                                HandleObjectGroup group) {
-  MOZ_ASSERT(!group->singleton(),
-             "passed a singleton group to create() (use createSingleton() "
-             "instead)");
+  MOZ_ASSERT(!group->singleton());
 
   gc::AllocKind kind = gc::GetGCObjectKind(shape->numFixedSlots());
   MOZ_ASSERT(CanBeFinalizedInBackground(kind, &CallObject::class_));
   kind = gc::GetBackgroundAllocKind(kind);
 
   JSObject* obj;
   JS_TRY_VAR_OR_RETURN_NULL(
       cx, obj, NativeObject::create(cx, kind, gc::DefaultHeap, shape, group));
 
   return &obj->as<CallObject>();
 }
 
-CallObject* CallObject::createSingleton(JSContext* cx, HandleShape shape) {
-  gc::AllocKind kind = gc::GetGCObjectKind(shape->numFixedSlots());
-  MOZ_ASSERT(CanBeFinalizedInBackground(kind, &CallObject::class_));
-  kind = gc::GetBackgroundAllocKind(kind);
-
-  RootedObjectGroup group(
-      cx, ObjectGroup::lazySingletonGroup(cx, /* oldGroup = */ nullptr, &class_,
-                                          TaggedProto(nullptr)));
-  if (!group) {
-    return nullptr;
-  }
-
-  JSObject* obj;
-  JS_TRY_VAR_OR_RETURN_NULL(
-      cx, obj, NativeObject::create(cx, kind, gc::TenuredHeap, shape, group));
-
-  MOZ_ASSERT(obj->isSingleton(),
-             "group created inline above must be a singleton");
-
-  return &obj->as<CallObject>();
-}
-
 /*
  * Create a CallObject for a JSScript that is not initialized to any particular
  * callsite. This object can either be initialized (with an enclosing scope and
  * callee) or used as a template for jit compilation.
  */
 CallObject* CallObject::createTemplateObject(JSContext* cx, HandleScript script,
                                              HandleObject enclosing,
                                              gc::InitialHeap heap) {
@@ -201,34 +133,25 @@ CallObject* CallObject::createTemplateOb
  * Construct a call object for the given bindings.  If this is a call object
  * for a function invocation, callee should be the function being called.
  * Otherwise it must be a call object for eval of strict mode code, and callee
  * must be null.
  */
 CallObject* CallObject::create(JSContext* cx, HandleFunction callee,
                                HandleObject enclosing) {
   RootedScript script(cx, callee->nonLazyScript());
-  gc::InitialHeap heap =
-      script->treatAsRunOnce() ? gc::TenuredHeap : gc::DefaultHeap;
+  gc::InitialHeap heap = gc::DefaultHeap;
   CallObject* callobj =
       CallObject::createTemplateObject(cx, script, enclosing, heap);
   if (!callobj) {
     return nullptr;
   }
 
   callobj->initFixedSlot(CALLEE_SLOT, ObjectValue(*callee));
 
-  if (script->treatAsRunOnce()) {
-    Rooted<CallObject*> ncallobj(cx, callobj);
-    if (!JSObject::setSingleton(cx, ncallobj)) {
-      return nullptr;
-    }
-    return ncallobj;
-  }
-
   return callobj;
 }
 
 CallObject* CallObject::create(JSContext* cx, AbstractFramePtr frame) {
   MOZ_ASSERT(frame.isFunctionFrame());
   cx->check(frame);
 
   RootedObject envChain(cx, frame.environmentChain());
@@ -345,18 +268,17 @@ const Class CallObject::class_ = {
     MOZ_ASSERT_IF(
         frame.callee()->needsCallObject(),
         &frame.environmentChain()->as<CallObject>().callee() == frame.callee());
   }
 #endif
 
   RootedScript script(cx, frame.script());
   RootedObject envChain(cx, frame.environmentChain());
-  gc::InitialHeap heap =
-      script->treatAsRunOnce() ? gc::TenuredHeap : gc::DefaultHeap;
+  gc::InitialHeap heap = gc::DefaultHeap;
   RootedShape shape(cx, scope->environmentShape());
   VarEnvironmentObject* env = create(cx, shape, envChain, heap);
   if (!env) {
     return nullptr;
   }
   env->initScope(scope);
   return env;
 }
@@ -445,19 +367,16 @@ const Class ModuleEnvironmentObject::cla
 
   JSObject* obj;
   JS_TRY_VAR_OR_RETURN_NULL(
       cx, obj, NativeObject::create(cx, kind, gc::TenuredHeap, shape, group));
 
   RootedModuleEnvironmentObject env(cx, &obj->as<ModuleEnvironmentObject>());
 
   env->initReservedSlot(MODULE_SLOT, ObjectValue(*module));
-  if (!JSObject::setSingleton(cx, env)) {
-    return nullptr;
-  }
 
   // Initialize this early so that we can manipulate the env object without
   // causing assertions.
   env->initEnclosingEnvironment(&cx->global()->lexicalEnvironment());
 
   // Initialize all lexical bindings and imports as uninitialized. Imports
   // get uninitialized because they have a special TDZ for cyclic imports.
   for (BindingIter bi(script); bi; bi++) {
@@ -3829,18 +3748,17 @@ static bool RemoveReferencedNames(JSCont
           name = script->getName(pc);
         } else {
           name = nullptr;
         }
         break;
 
       case JSOP_GETALIASEDVAR:
       case JSOP_SETALIASEDVAR:
-        name = EnvironmentCoordinateName(cx->caches().envCoordinateNameCache,
-                                         script, pc);
+        name = EnvironmentCoordinateNameSlow(script, pc);
         break;
 
       default:
         name = nullptr;
         break;
     }
 
     if (name) {
--- a/js/src/vm/EnvironmentObject.h
+++ b/js/src/vm/EnvironmentObject.h
@@ -26,25 +26,20 @@ typedef Handle<ModuleObject*> HandleModu
 
 /*
  * Return a shape representing the static scope containing the variable
  * accessed by the ALIASEDVAR op at 'pc'.
  */
 extern Shape* EnvironmentCoordinateToEnvironmentShape(JSScript* script,
                                                       jsbytecode* pc);
 
-// Return the name being accessed by the given ALIASEDVAR op.
-extern PropertyName* EnvironmentCoordinateName(
-    EnvironmentCoordinateNameCache& cache, JSScript* script, jsbytecode* pc);
-
-// Return the function script accessed by the given ALIASEDVAR op, or nullptr.
-extern JSScript* EnvironmentCoordinateFunctionScript(JSScript* script,
-                                                     jsbytecode* pc);
-
-/*** Environment objects ****************************************************/
+// Return the name being accessed by the given ALIASEDVAR op. This function is
+// relatively slow so it should not be used on hot paths.
+extern PropertyName* EnvironmentCoordinateNameSlow(JSScript* script,
+                                                   jsbytecode* pc);
 
 /*** Environment objects ****************************************************/
 
 // clang-format off
 /*
  * [SMDOC] Environment Objects
  *
  * About environments
@@ -259,18 +254,17 @@ extern JSScript* EnvironmentCoordinateFu
 // clang-format on
 
 class EnvironmentObject : public NativeObject {
  protected:
   // The enclosing environment. Either another EnvironmentObject, a
   // GlobalObject, or a non-syntactic environment object.
   static const uint32_t ENCLOSING_ENV_SLOT = 0;
 
-  inline void setAliasedBinding(JSContext* cx, uint32_t slot,
-                                PropertyName* name, const Value& v);
+  inline void setAliasedBinding(JSContext* cx, uint32_t slot, const Value& v);
 
   void setEnclosingEnvironment(JSObject* enclosing) {
     setReservedSlot(ENCLOSING_ENV_SLOT, ObjectOrNullValue(enclosing));
   }
 
  public:
   // Since every env chain terminates with a global object, whether
   // GlobalObject or a non-syntactic one, and since those objects do not
@@ -290,17 +284,17 @@ class EnvironmentObject : public NativeO
   }
 
   const Value& aliasedBinding(const BindingIter& bi) {
     MOZ_ASSERT(bi.location().kind() == BindingLocation::Kind::Environment);
     return getSlot(bi.location().slot());
   }
 
   inline void setAliasedBinding(JSContext* cx, EnvironmentCoordinate ec,
-                                PropertyName* name, const Value& v);
+                                const Value& v);
 
   inline void setAliasedBinding(JSContext* cx, const BindingIter& bi,
                                 const Value& v);
 
   // For JITs.
   static size_t offsetOfEnclosingEnvironment() {
     return getFixedSlotOffset(ENCLOSING_ENV_SLOT);
   }
@@ -317,28 +311,22 @@ class CallObject : public EnvironmentObj
 
  public:
   static const uint32_t RESERVED_SLOTS = 2;
   static const Class class_;
 
   /* These functions are internal and are exposed only for JITs. */
 
   /*
-   * Construct a bare-bones call object given a shape and a non-singleton
-   * group.  The call object must be further initialized to be usable.
+   * Construct a bare-bones call object given a shape and a group.
+   * The call object must be further initialized to be usable.
    */
   static CallObject* create(JSContext* cx, HandleShape shape,
                             HandleObjectGroup group);
 
-  /*
-   * Construct a bare-bones call object given a shape and make it into
-   * a singleton.  The call object must be initialized to be usable.
-   */
-  static CallObject* createSingleton(JSContext* cx, HandleShape shape);
-
   static CallObject* createTemplateObject(JSContext* cx, HandleScript script,
                                           HandleObject enclosing,
                                           gc::InitialHeap heap);
 
   static CallObject* create(JSContext* cx, HandleFunction callee,
                             HandleObject enclosing);
   static CallObject* create(JSContext* cx, AbstractFramePtr frame);
 
--- a/js/src/vm/Interpreter-inl.h
+++ b/js/src/vm/Interpreter-inl.h
@@ -299,25 +299,17 @@ inline bool SetIntrinsicOperation(JSCont
   return GlobalObject::setIntrinsicValue(cx, cx->global(), name, val);
 }
 
 inline void SetAliasedVarOperation(JSContext* cx, JSScript* script,
                                    jsbytecode* pc, EnvironmentObject& obj,
                                    EnvironmentCoordinate ec, const Value& val,
                                    MaybeCheckTDZ checkTDZ) {
   MOZ_ASSERT_IF(checkTDZ, !IsUninitializedLexical(obj.aliasedBinding(ec)));
-
-  // Avoid computing the name if no type updates are needed, as this may be
-  // expensive on scopes with large numbers of variables.
-  PropertyName* name =
-      obj.isSingleton() ? EnvironmentCoordinateName(
-                              cx->caches().envCoordinateNameCache, script, pc)
-                        : nullptr;
-
-  obj.setAliasedBinding(cx, ec, name, val);
+  obj.setAliasedBinding(cx, ec, val);
 }
 
 inline bool SetNameOperation(JSContext* cx, JSScript* script, jsbytecode* pc,
                              HandleObject env, HandleValue val) {
   MOZ_ASSERT(*pc == JSOP_SETNAME || *pc == JSOP_STRICTSETNAME ||
              *pc == JSOP_SETGNAME || *pc == JSOP_STRICTSETGNAME);
   MOZ_ASSERT_IF((*pc == JSOP_SETGNAME || *pc == JSOP_STRICTSETGNAME) &&
                     !script->hasNonSyntacticScope(),
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -1954,16 +1954,17 @@ static MOZ_NEVER_INLINE JS_HAZ_JSNATIVE_
       SANITY_CHECKS();
       DISPATCH_TO(op);
     }
 
     /* Various 1-byte no-ops. */
     CASE(JSOP_NOP)
     CASE(JSOP_NOP_DESTRUCTURING)
     CASE(JSOP_TRY_DESTRUCTURING)
+    CASE(JSOP_UNUSED71)
     CASE(JSOP_UNUSED151)
     CASE(JSOP_CONDSWITCH) {
       MOZ_ASSERT(CodeSpec[*REGS.pc].length == 1);
       ADVANCE_AND_DISPATCH(1);
     }
 
     CASE(JSOP_TRY)
     CASE(JSOP_JUMPTARGET)
@@ -3390,23 +3391,16 @@ static MOZ_NEVER_INLINE JS_HAZ_JSNATIVE_
         }
         PUSH_COPY(ObjectValue(*obj));
       } else {
         PUSH_COPY(MagicValue(JS_OPTIMIZED_ARGUMENTS));
       }
     }
     END_CASE(JSOP_ARGUMENTS)
 
-    CASE(JSOP_RUNONCE) {
-      if (!RunOnceScriptPrologue(cx, script)) {
-        goto error;
-      }
-    }
-    END_CASE(JSOP_RUNONCE)
-
     CASE(JSOP_REST) {
       ReservedRooted<JSObject*> rest(&rootObject0,
                                      REGS.fp()->createRestParameter(cx));
       if (!rest) {
         goto error;
       }
       PUSH_COPY(ObjectValue(*rest));
     }
@@ -3414,18 +3408,17 @@ static MOZ_NEVER_INLINE JS_HAZ_JSNATIVE_
 
     CASE(JSOP_GETALIASEDVAR) {
       EnvironmentCoordinate ec = EnvironmentCoordinate(REGS.pc);
       ReservedRooted<Value> val(
           &rootValue0, REGS.fp()->aliasedEnvironment(ec).aliasedBinding(ec));
 #ifdef DEBUG
       // Only the .this slot can hold the TDZ MagicValue.
       if (IsUninitializedLexical(val)) {
-        PropertyName* name = EnvironmentCoordinateName(
-            cx->caches().envCoordinateNameCache, script, REGS.pc);
+        PropertyName* name = EnvironmentCoordinateNameSlow(script, REGS.pc);
         MOZ_ASSERT(name == cx->names().dotThis);
         JSOp next = JSOp(*GetNextPc(REGS.pc));
         MOZ_ASSERT(next == JSOP_CHECKTHIS || next == JSOP_CHECKRETURN ||
                    next == JSOP_CHECKTHISREINIT);
       }
 #endif
       PUSH_COPY(val);
       TypeScript::Monitor(cx, script, REGS.pc, REGS.sp[-1]);
@@ -4919,36 +4912,16 @@ bool js::ImplicitThisOperation(JSContext
   if (!LookupNameWithGlobalDefault(cx, name, scopeObj, &obj)) {
     return false;
   }
 
   res.set(ComputeImplicitThis(obj));
   return true;
 }
 
-bool js::RunOnceScriptPrologue(JSContext* cx, HandleScript script) {
-  MOZ_ASSERT(script->treatAsRunOnce());
-
-  if (!script->hasRunOnce()) {
-    script->setHasRunOnce();
-    return true;
-  }
-
-  // Force instantiation of the script's function's group to ensure the flag
-  // is preserved in type information.
-  RootedFunction fun(cx, script->functionNonDelazifying());
-  if (!JSObject::getGroup(cx, fun)) {
-    return false;
-  }
-
-  MarkObjectGroupFlags(cx, script->functionNonDelazifying(),
-                       OBJECT_FLAG_RUNONCE_INVALIDATED);
-  return true;
-}
-
 unsigned js::GetInitDataPropAttrs(JSOp op) {
   switch (op) {
     case JSOP_INITPROP:
     case JSOP_INITELEM:
       return JSPROP_ENUMERATE;
     case JSOP_INITLOCKEDPROP:
       return JSPROP_PERMANENT | JSPROP_READONLY;
     case JSOP_INITHIDDENPROP:
@@ -5306,18 +5279,17 @@ void js::ReportRuntimeLexicalError(JSCon
   if (op == JSOP_THROWSETCALLEE) {
     name = script->functionNonDelazifying()->explicitName()->asPropertyName();
   } else if (IsLocalOp(op)) {
     name = FrameSlotName(script, pc)->asPropertyName();
   } else if (IsAtomOp(op)) {
     name = script->getName(pc);
   } else {
     MOZ_ASSERT(IsAliasedVarOp(op));
-    name = EnvironmentCoordinateName(cx->caches().envCoordinateNameCache,
-                                     script, pc);
+    name = EnvironmentCoordinateNameSlow(script, pc);
   }
 
   ReportRuntimeLexicalError(cx, errorNumber, name);
 }
 
 void js::ReportRuntimeRedeclaration(JSContext* cx, HandlePropertyName name,
                                     const char* redeclKind) {
   if (UniqueChars printable = AtomToPrintableString(cx, name)) {
--- a/js/src/vm/Interpreter.h
+++ b/js/src/vm/Interpreter.h
@@ -503,18 +503,16 @@ bool ThrowMsgOperation(JSContext* cx, co
 bool GetAndClearException(JSContext* cx, MutableHandleValue res);
 
 bool DeleteNameOperation(JSContext* cx, HandlePropertyName name,
                          HandleObject scopeObj, MutableHandleValue res);
 
 bool ImplicitThisOperation(JSContext* cx, HandleObject scopeObj,
                            HandlePropertyName name, MutableHandleValue res);
 
-bool RunOnceScriptPrologue(JSContext* cx, HandleScript script);
-
 bool InitGetterSetterOperation(JSContext* cx, jsbytecode* pc, HandleObject obj,
                                HandleId id, HandleObject val);
 
 bool InitGetterSetterOperation(JSContext* cx, jsbytecode* pc, HandleObject obj,
                                HandlePropertyName name, HandleObject val);
 
 unsigned GetInitDataPropAttrs(JSOp op);
 
--- a/js/src/vm/Opcodes.h
+++ b/js/src/vm/Opcodes.h
@@ -705,25 +705,18 @@
      *   Type: Switch Statement
      *   Operands: int32_t len, int32_t low, int32_t high,
      *             uint24_t firstResumeIndex
      *   Stack: i =>
      *   len: len
      */ \
     MACRO(JSOP_TABLESWITCH, 70, "tableswitch", NULL, 16, 1, 0, JOF_TABLESWITCH|JOF_DETECTING) \
     /*
-     * Prologue emitted in scripts expected to run once, which deoptimizes code
-     * if it executes multiple times.
-     *
-     *   Category: Statements
-     *   Type: Function
-     *   Operands:
-     *   Stack: =>
      */ \
-    MACRO(JSOP_RUNONCE, 71, "runonce", NULL, 1, 0, 0, JOF_BYTE) \
+    MACRO(JSOP_UNUSED71, 71, "unused71", NULL, 1, 0, 0, JOF_BYTE) \
     /*
      * Pops the top two values from the stack, then pushes the result of
      * applying the operator to the two values.
      *
      *   Category: Operators
      *   Type: Comparison Operators
      *   Operands:
      *   Stack: lval, rval => (lval OP rval)
@@ -1482,17 +1475,17 @@
     /*
      * Sets aliased variable as the top of stack value.
      *
      *   Category: Variables and Scopes
      *   Type: Aliased Variables
      *   Operands: uint8_t hops, uint24_t slot
      *   Stack: v => v
      */ \
-    MACRO(JSOP_SETALIASEDVAR, 137, "setaliasedvar", NULL, 5, 1, 1, JOF_ENVCOORD|JOF_NAME|JOF_PROPSET|JOF_DETECTING|JOF_IC) \
+    MACRO(JSOP_SETALIASEDVAR, 137, "setaliasedvar", NULL, 5, 1, 1, JOF_ENVCOORD|JOF_NAME|JOF_PROPSET|JOF_DETECTING) \
     /*
      * Checks if the value of the local variable is the
      * JS_UNINITIALIZED_LEXICAL magic, throwing an error if so.
      *
      *   Category: Variables and Scopes
      *   Type: Local Variables
      *   Operands: uint24_t localno
      *   Stack: =>
@@ -1522,17 +1515,17 @@
      * Initializes an uninitialized aliased lexical binding with the top of
      * stack value.
      *
      *   Category: Variables and Scopes
      *   Type: Aliased Variables
      *   Operands: uint8_t hops, uint24_t slot
      *   Stack: v => v
      */ \
-    MACRO(JSOP_INITALIASEDLEXICAL, 141, "initaliasedlexical", NULL, 5, 1, 1, JOF_ENVCOORD|JOF_NAME|JOF_PROPINIT|JOF_DETECTING|JOF_IC) \
+    MACRO(JSOP_INITALIASEDLEXICAL, 141, "initaliasedlexical", NULL, 5, 1, 1, JOF_ENVCOORD|JOF_NAME|JOF_PROPINIT|JOF_DETECTING) \
     /*
      * Pushes a JS_UNINITIALIZED_LEXICAL value onto the stack, representing an
      * uninitialized lexical binding.
      *
      * This opcode is used with the JSOP_INITLEXICAL opcode.
      *
      *   Category: Literals
      *   Type: Constants
--- a/js/src/vm/TypeSet.h
+++ b/js/src/vm/TypeSet.h
@@ -184,21 +184,17 @@ enum : uint32_t {
   OBJECT_FLAG_LENGTH_OVERFLOW = 0x00040000,
 
   /* Whether any objects have been iterated over. */
   OBJECT_FLAG_ITERATED = 0x00080000,
 
   /* Whether any object this represents may have non-extensible elements. */
   OBJECT_FLAG_NON_EXTENSIBLE_ELEMENTS = 0x00100000,
 
-  /*
-   * For the function on a run-once script, whether the function has actually
-   * run multiple times.
-   */
-  OBJECT_FLAG_RUNONCE_INVALIDATED = 0x00200000,
+  // (0x00200000 is unused)
 
   /*
    * For a global object, whether any array buffers in this compartment with
    * typed object views have ever been detached.
    */
   OBJECT_FLAG_TYPED_OBJECT_HAS_DETACHED_BUFFER = 0x00400000,
 
   /*
--- a/js/xpconnect/tests/chrome/test_cows.xul
+++ b/js/xpconnect/tests/chrome/test_cows.xul
@@ -17,16 +17,19 @@ https://bugzilla.mozilla.org/show_bug.cg
   </body>
 
   <!-- test code goes here -->
   <script type="application/javascript"><![CDATA[
 var sandbox = new Cu.Sandbox("about:blank");
 
 var test_utils = window.windowUtils;
 
+SpecialPowers.pushPrefEnv({"set": [["security.allow_eval_with_system_principal",
+                                    true]]});
+
 function getCOW(x) {
   if (typeof x != 'object' && typeof x != 'function')
     return x;
   x = Cu.waiveXrays(x);
   var rval = {};
   if (typeof x == "function")
     rval = eval(uneval(x));
   for (var i in x) {
--- a/layout/build/nsLayoutStatics.cpp
+++ b/layout/build/nsLayoutStatics.cpp
@@ -107,17 +107,17 @@
 #include "mozilla/ClearSiteData.h"
 #include "mozilla/Fuzzyfox.h"
 #include "mozilla/ServoBindings.h"
 #include "mozilla/StaticPresData.h"
 #include "mozilla/dom/WebIDLGlobalNameHash.h"
 #include "mozilla/dom/ipc/IPCBlobInputStreamStorage.h"
 #include "mozilla/dom/U2FTokenManager.h"
 #ifdef OS_WIN
-#include "mozilla/dom/WinWebAuthnManager.h"
+#  include "mozilla/dom/WinWebAuthnManager.h"
 #endif
 #include "mozilla/dom/PointerEventHandler.h"
 #include "mozilla/dom/RemoteWorkerService.h"
 #include "mozilla/dom/BlobURLProtocolHandler.h"
 #include "mozilla/dom/ReportingHeader.h"
 #include "mozilla/net/UrlClassifierFeatureFactory.h"
 #include "nsThreadManager.h"
 #include "mozilla/css/ImageLoader.h"
--- a/media/libcubeb/cubeb-pulse-rs/README_MOZILLA
+++ b/media/libcubeb/cubeb-pulse-rs/README_MOZILLA
@@ -1,8 +1,8 @@
 The source from this directory was copied from the cubeb-pulse-rs
 git repository using the update.sh script.  The only changes
 made were those applied by update.sh and the addition of
 Makefile.in build files for the Mozilla build system.
 
 The cubeb-pulse-rs git repository is: https://github.com/djg/cubeb-pulse-rs.git
 
-The git commit ID used was 100b85828388d4bf8b9713fe5c5dd9dc00d8f24f (2018-10-19 10:32:47 +1300)
+The git commit ID used was 17c1629c323ff24d656ff9449bf50d6758aafc1a (2019-01-24 07:50:09 +1300)
--- a/media/libcubeb/cubeb-pulse-rs/pulse-ffi/src/ffi_funcs.rs
+++ b/media/libcubeb/cubeb-pulse-rs/pulse-ffi/src/ffi_funcs.rs
@@ -12,16 +12,20 @@ mod static_fns {
     use super::*;
     use std::os::raw::{c_char, c_double, c_float, c_int, c_uint, c_void};
 
     #[link(name = "pulse")]
     extern "C" {
         pub fn pa_get_library_version() -> *const c_char;
         pub fn pa_channel_map_can_balance(map: *const pa_channel_map) -> c_int;
         pub fn pa_channel_map_init(m: *mut pa_channel_map) -> *mut pa_channel_map;
+        pub fn pa_channel_map_init_auto(m: *mut pa_channel_map,
+                                        ch: u32,
+                                        def: pa_channel_map_def_t)
+                                        -> *mut pa_channel_map;
         pub fn pa_context_connect(c: *mut pa_context,
                                   server: *const c_char,
                                   flags: pa_context_flags_t,
                                   api: *const pa_spawn_api)
                                   -> c_int;
         pub fn pa_context_disconnect(c: *mut pa_context);
         pub fn pa_context_drain(c: *mut pa_context,
                                 cb: pa_context_notify_cb_t,
@@ -202,16 +206,23 @@ mod dynamic_fns {
             };
             PA_CHANNEL_MAP_INIT = {
                 let fp = dlsym(h, cstr!("pa_channel_map_init"));
                 if fp.is_null() {
                     return None;
                 }
                 fp
             };
+            PA_CHANNEL_MAP_INIT_AUTO = {
+                let fp = dlsym(h, cstr!("pa_channel_map_init_auto"));
+                if fp.is_null() {
+                    return None;
+                }
+                fp
+            };
             PA_CONTEXT_CONNECT = {
                 let fp = dlsym(h, cstr!("pa_context_connect"));
                 if fp.is_null() {
                     return None;
                 }
                 fp
             };
             PA_CONTEXT_DISCONNECT = {
@@ -740,16 +751,29 @@ mod dynamic_fns {
     }
 
     static mut PA_CHANNEL_MAP_INIT: *mut ::libc::c_void = 0 as *mut _;
     #[inline]
     pub unsafe fn pa_channel_map_init(m: *mut pa_channel_map) -> *mut pa_channel_map {
         (::std::mem::transmute::<_, extern "C" fn(*mut pa_channel_map) -> *mut pa_channel_map>(PA_CHANNEL_MAP_INIT))(m)
     }
 
+    static mut PA_CHANNEL_MAP_INIT_AUTO: *mut ::libc::c_void = 0 as *mut _;
+    #[inline]
+    pub unsafe fn pa_channel_map_init_auto(m: *mut pa_channel_map,
+                                           ch: u32,
+                                           def: pa_channel_map_def_t)
+                                           -> *mut pa_channel_map {
+        (::std::mem::transmute::<_,
+                                 extern "C" fn(*mut pa_channel_map,
+                                               u32,
+                                               pa_channel_map_def_t)
+                                               -> *mut pa_channel_map>(PA_CHANNEL_MAP_INIT_AUTO))(m, ch, def)
+    }
+
     static mut PA_CONTEXT_CONNECT: *mut ::libc::c_void = 0 as *mut _;
     #[inline]
     pub unsafe fn pa_context_connect(c: *mut pa_context,
                                      server: *const c_char,
                                      flags: pa_context_flags_t,
                                      api: *const pa_spawn_api)
                                      -> c_int {
         (::std::mem::transmute::<_,
--- a/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/lib.rs
+++ b/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/lib.rs
@@ -588,27 +588,39 @@ impl CVolumeExt for CVolume {
         unsafe {
             ffi::pa_cvolume_set_balance(self, map, new_balance);
         }
     }
 }
 
 pub trait ChannelMapExt {
     fn init() -> ChannelMap;
+    fn init_auto(ch: u32, def: ffi::pa_channel_map_def_t) -> Option<ChannelMap>;
     fn can_balance(&self) -> bool;
 }
 
 impl ChannelMapExt for ChannelMap {
     fn init() -> ChannelMap {
         let mut cm = ChannelMap::default();
         unsafe {
             ffi::pa_channel_map_init(&mut cm);
         }
         cm
     }
+    fn init_auto(ch: u32, def: ffi::pa_channel_map_def_t) -> Option<ChannelMap> {
+        let mut cm = ChannelMap::default();
+        let r: *mut ffi::pa_channel_map = unsafe {
+            ffi::pa_channel_map_init_auto(&mut cm, ch, def)
+        };
+        if r.is_null() {
+            None
+        } else {
+            Some(cm)
+        }
+    }
     fn can_balance(&self) -> bool {
         unsafe { ffi::pa_channel_map_can_balance(self) > 0 }
     }
 }
 
 pub trait ProplistExt {
     fn proplist(&self) -> Proplist;
 }
--- a/media/libcubeb/cubeb-pulse-rs/src/backend/stream.rs
+++ b/media/libcubeb/cubeb-pulse-rs/src/backend/stream.rs
@@ -76,16 +76,32 @@ fn layout_to_channel_map(layout: Channel
     let mut cm = pulse::ChannelMap::init();
     for (i, channel) in channel_layout_iter(layout).enumerate() {
         cm.map[i] = cubeb_channel_to_pa_channel(channel.into());
     }
     cm.channels = layout.num_channels() as _;
     cm
 }
 
+fn default_layout_for_channels(ch: u32) -> ChannelLayout {
+    match ch {
+        1 => ChannelLayout::MONO,
+        2 => ChannelLayout::STEREO,
+        3 => ChannelLayout::_3F,
+        4 => ChannelLayout::QUAD,
+        5 => ChannelLayout::_3F2,
+        6 => ChannelLayout::_3F_LFE
+             | ChannelLayout::SIDE_LEFT
+             | ChannelLayout::SIDE_RIGHT,
+        7 => ChannelLayout::_3F3R_LFE,
+        8 => ChannelLayout::_3F4_LFE,
+        _ => panic!("channel must be between 1 to 8.")
+    }
+}
+
 pub struct Device(ffi::cubeb_device);
 
 impl Drop for Device {
     fn drop(&mut self) {
         unsafe {
             if !self.0.input_name.is_null() {
                 let _ = CString::from_raw(self.0.input_name as *mut _);
             }
@@ -656,17 +672,25 @@ impl<'ctx> PulseStream<'ctx> {
 
         let ss = pulse::SampleSpec {
             channels: stream_params.channels() as u8,
             format: fmt.into(),
             rate: stream_params.rate(),
         };
 
         let cm: Option<pa_channel_map> = match stream_params.layout() {
-            ChannelLayout::UNDEFINED => None,
+            ChannelLayout::UNDEFINED =>
+                if stream_params.channels() <= 8
+                  && pulse::ChannelMap::init_auto(stream_params.channels(), PA_CHANNEL_MAP_DEFAULT).is_none() {
+                    cubeb_log!("Layout undefined and PulseAudio's default layout has not been configured, guess one.");
+                    Some(layout_to_channel_map(default_layout_for_channels(stream_params.channels())))
+                } else {
+                    cubeb_log!("Layout undefined, PulseAudio will use its default.");
+                    None
+                },
             _ => Some(layout_to_channel_map(stream_params.layout())),
         };
 
         let stream = pulse::Stream::new(context, stream_name.unwrap(), &ss, cm.as_ref());
 
         match stream {
             None => Err(Error::error()),
             Some(stm) => Ok(stm),
--- a/media/libcubeb/moz.yaml
+++ b/media/libcubeb/moz.yaml
@@ -14,10 +14,10 @@ bugzilla:
 origin:
   name: "cubeb"
   description: "Cross platform audio library"
 
   url: "https://github.com/kinetiknz/cubeb"
   license: "ISC"
 
   # update.sh will update this value
-  release: "67d37c16be84fcc469531d4b6f70eae8a2867a66 (2019-01-21 14:41:14 +0200)"
+  release: "feec7e2e893c6dc4188fcb95e15dcf8c19890f46 (2019-01-23 17:15:35 +0200)"
 
--- a/media/libcubeb/src/cubeb_pulse.c
+++ b/media/libcubeb/src/cubeb_pulse.c
@@ -80,16 +80,17 @@
   X(pa_stream_peek)                             \
   X(pa_stream_drop)                             \
   X(pa_stream_get_buffer_attr)                  \
   X(pa_stream_get_device_name)                  \
   X(pa_context_set_subscribe_callback)          \
   X(pa_context_subscribe)                       \
   X(pa_mainloop_api_once)                       \
   X(pa_get_library_version)                     \
+  X(pa_channel_map_init_auto)                   \
 
 #define MAKE_TYPEDEF(x) static typeof(x) * cubeb_##x;
 LIBPULSE_API_VISIT(MAKE_TYPEDEF);
 #undef MAKE_TYPEDEF
 #endif
 
 #if PA_CHECK_VERSION(2, 0, 0)
 static int has_pulse_v2 = 0;
@@ -781,16 +782,35 @@ to_pulse_format(cubeb_sample_format form
     return PA_SAMPLE_FLOAT32LE;
   case CUBEB_SAMPLE_FLOAT32BE:
     return PA_SAMPLE_FLOAT32BE;
   default:
     return PA_SAMPLE_INVALID;
   }
 }
 
+static cubeb_channel_layout
+pulse_default_layout_for_channels(uint32_t ch)
+{
+  assert (ch > 0 && ch <= 8);
+  switch (ch) {
+    case 1: return CUBEB_LAYOUT_MONO;
+    case 2: return CUBEB_LAYOUT_STEREO;
+    case 3: return CUBEB_LAYOUT_3F;
+    case 4: return CUBEB_LAYOUT_QUAD;
+    case 5: return CUBEB_LAYOUT_3F2;
+    case 6: return CUBEB_LAYOUT_3F_LFE |
+                   CHANNEL_SIDE_LEFT | CHANNEL_SIDE_RIGHT;
+    case 7: return CUBEB_LAYOUT_3F3R_LFE;
+    case 8: return CUBEB_LAYOUT_3F4_LFE;
+  }
+  // Never get here!
+  return CUBEB_LAYOUT_UNDEFINED;
+}
+
 static int
 create_pa_stream(cubeb_stream * stm,
                  pa_stream ** pa_stm,
                  cubeb_stream_params * stream_params,
                  char const * stream_name)
 {
   assert(stm && stream_params);
   assert(&stm->input_stream == pa_stm || (&stm->output_stream == pa_stm &&
@@ -804,17 +824,26 @@ create_pa_stream(cubeb_stream * stm,
   pa_sample_spec ss;
   ss.format = to_pulse_format(stream_params->format);
   if (ss.format == PA_SAMPLE_INVALID)
     return CUBEB_ERROR_INVALID_FORMAT;
   ss.rate = stream_params->rate;
   ss.channels = stream_params->channels;
 
   if (stream_params->layout == CUBEB_LAYOUT_UNDEFINED) {
-    *pa_stm = WRAP(pa_stream_new)(stm->context->context, stream_name, &ss, NULL);
+    pa_channel_map cm;
+    if (stream_params->channels <= 8 &&
+       !WRAP(pa_channel_map_init_auto)(&cm, stream_params->channels, PA_CHANNEL_MAP_DEFAULT)) {
+      LOG("Layout undefined and PulseAudio's default layout has not been configured, guess one.");
+      layout_to_channel_map(pulse_default_layout_for_channels(stream_params->channels), &cm);
+      *pa_stm = WRAP(pa_stream_new)(stm->context->context, stream_name, &ss, &cm);
+    } else {
+      LOG("Layout undefined, PulseAudio will use its default.");
+      *pa_stm = WRAP(pa_stream_new)(stm->context->context, stream_name, &ss, NULL);
+    }
   } else {
     pa_channel_map cm;
     layout_to_channel_map(stream_params->layout, &cm);
     *pa_stm = WRAP(pa_stream_new)(stm->context->context, stream_name, &ss, &cm);
   }
   return (*pa_stm == NULL) ? CUBEB_ERROR : CUBEB_OK;
 }
 
--- a/media/libdav1d/asm/moz.build
+++ b/media/libdav1d/asm/moz.build
@@ -23,23 +23,24 @@ CFLAGS += [
 
 # This is Linux only for now
 
 # Attaching config.asm file
 if CONFIG['CPU_ARCH'] == 'x86':
     ASFLAGS += ['-I%s/media/libdav1d/asm/x86_32/' % TOPSRCDIR]
 
 if CONFIG['CPU_ARCH'] == 'x86_64':
-    # Change the default stack aligment (16) to 32
-    if CONFIG['CC_TYPE'] == 'clang':
-        CFLAGS += ['-mstack-alignment=32']
-    elif CONFIG['CC_TYPE'] == 'gcc':
-        CFLAGS += ['-mpreferred-stack-boundary=5']
-
-    if CONFIG['OS_TARGET'] == 'Darwin':
+    if CONFIG['OS_TARGET'] == 'Linux':
+        ASFLAGS += ['-I%s/media/libdav1d/asm/x86_64/linux/' % TOPSRCDIR]
+    elif CONFIG['OS_TARGET'] == 'Darwin':
+        # Change the default stack aligment (16) to 32
+        if CONFIG['CC_TYPE'] == 'clang':
+            CFLAGS += ['-mstack-alignment=32']
+        elif CONFIG['CC_TYPE'] == 'gcc':
+            CFLAGS += ['-mpreferred-stack-boundary=5']
         ASFLAGS += ['-I%s/media/libdav1d/asm/x86_64/osx/' % TOPSRCDIR]
     else:
         ASFLAGS += ['-I%s/media/libdav1d/asm/x86_64/' % TOPSRCDIR]
 
 if CONFIG['CPU_ARCH'] in ('x86', 'x86_64'):
     SOURCES += [
         '../../../third_party/dav1d/src/x86/cpu.c',
     ]
new file mode 100644
--- /dev/null
+++ b/media/libdav1d/asm/x86_64/linux/config.asm
@@ -0,0 +1,11 @@
+; Autogenerated by the Meson build system.
+; Do not edit, your changes will be lost.
+
+%define ARCH_X86_32 0
+
+%define ARCH_X86_64 1
+
+%define PIC 1
+
+%define STACK_ALIGNMENT 16
+
--- a/media/libdav1d/config.h
+++ b/media/libdav1d/config.h
@@ -57,13 +57,14 @@
 // build, so we do not really care.
 #define HAVE_UNISTD_H 1
 
 // Important when asm is enabled
 #if defined(__APPLE__)
 #  define PREFIX 1
 #endif
 
-#if ARCH_X86_32 == 1 && defined(__linux__) && !defined(__ANDROID__)
+#if (ARCH_x86_32 == 1 || ARCH_X86_64 == 1) && defined(__linux__) && \
+    !defined(__ANDROID__)
 #  define STACK_ALIGNMENT 16
 #else
 #  define STACK_ALIGNMENT 32
 #endif
--- a/media/libdav1d/moz.build
+++ b/media/libdav1d/moz.build
@@ -19,30 +19,20 @@ EXPORTS.dav1d += [
 ]
 
 # entrypoint source files
 SOURCES += [
     '../../third_party/dav1d/src/lib.c',
     '../../third_party/dav1d/src/thread_task.c',
 ]
 
-# Enable ASM on Linux for now.
+# Enable ASM build only on Linux for now.
 if CONFIG['OS_TARGET'] == 'Linux' and (CONFIG['CPU_ARCH'] in ('x86', 'x86_64')):
     # Default stack aligment is 16 bytes
     DIRS += ['asm']
-    if CONFIG['CPU_ARCH'] == 'x86_64':
-        # Update stack aligment to 32 bytes
-        if CONFIG['CC_TYPE'] == 'clang':
-            CFLAGS += ['-mstack-alignment=32']
-            SOURCES['../../third_party/dav1d/src/lib.c'].flags += ['-mstackrealign']
-            SOURCES['../../third_party/dav1d/src/thread_task.c'].flags += ['-mstackrealign']
-        elif CONFIG['CC_TYPE'] == 'gcc':
-            CFLAGS += ['-mpreferred-stack-boundary=5']
-            SOURCES['../../third_party/dav1d/src/lib.c'].flags += ['-mincoming-stack-boundary=4']
-            SOURCES['../../third_party/dav1d/src/thread_task.c'].flags += ['-mincoming-stack-boundary=4']
 
 # common sources
 SOURCES += [
     '../../third_party/dav1d/src/cdf.c',
     '../../third_party/dav1d/src/cpu.c',
     '../../third_party/dav1d/src/data.c',
     '../../third_party/dav1d/src/decode.c',
     '../../third_party/dav1d/src/dequant_tables.c',
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -2679,18 +2679,18 @@ pref("security.dialog_enable_delay", 100
 pref("security.notification_enable_delay", 500);
 
 #if defined(DEBUG) && !defined(ANDROID)
 pref("csp.about_uris_without_csp", "blank,printpreview,srcdoc,about,addons,cache-entry,config,crashes,debugging,devtools,downloads,home,memory,networking,newtab,performance,plugins,policies,profiles,restartrequired,searchreset,serviceworkers,sessionrestore,support,sync-log,telemetry,url-classifier,webrtc,welcomeback");
 // the following prefs are for testing purposes only.
 pref("csp.overrule_about_uris_without_csp_whitelist", false);
 pref("csp.skip_about_page_has_csp_assert", false);
 // assertion flag will be set to false after fixing Bug 1473549
-pref("security.allow_eval_with_system_principal", true);
-pref("security.uris_using_eval_with_system_principal", "autocomplete.xml,redux.js,react-redux.js,content-task.js,content-task.js,tree.xml,dialog.xml,preferencesbindings.js,wizard.xml,lodash.js,jszip.js,ajv-4.1.1.js,updates.js,setup,jsol.js");
+pref("security.allow_eval_with_system_principal", false);
+pref("security.uris_using_eval_with_system_principal", "autocomplete.xml,redux.js,react-redux.js,content-task.js,content-task.js,tree.xml,dialog.xml,preferencesbindings.js,wizard.xml,lodash.js,jszip.js,ajv-4.1.1.js,updates.js,setup,jsol.js,parent_utils.js");
 #endif
 
 // Default Content Security Policy to apply to signed contents.
 pref("security.signed_content.CSP.default", "script-src 'self'; style-src 'self'");
 
 // Mixed content blocking
 pref("security.mixed_content.block_active_content", false);
 pref("security.mixed_content.block_display_content", false);
--- a/netwerk/test/unit/test_duplicate_headers.js
+++ b/netwerk/test/unit/test_duplicate_headers.js
@@ -24,21 +24,21 @@ function run_test()
 
   do_test_pending();
   run_test_number(1);
 }
 
 function run_test_number(num)
 {
   testPath = testPathBase + num;
-  httpserver.registerPathHandler(testPath, eval("handler" + num));
+  httpserver.registerPathHandler(testPath, this["handler" + num]);
 
   var channel = setupChannel(testPath);
   flags = test_flags[num];   // OK if flags undefined for test
-  channel.asyncOpen2(new ChannelListener(eval("completeTest" + num),
+  channel.asyncOpen2(new ChannelListener(this["completeTest" + num],
                                          channel, flags));
 }
 
 function setupChannel(url)
 {
   var chan = NetUtil.newChannel({
     uri: URL + url,
     loadUsingSystemPrincipal: true
--- a/netwerk/test/unit/test_headers.js
+++ b/netwerk/test/unit/test_headers.js
@@ -45,32 +45,32 @@ function run_test()
 function runNextTest()
 {
   if (nextTest == lastTest) {
     endTests();
     return;
   }
   nextTest++;
   // Make sure test functions exist
-  if (eval("handler" + nextTest) == undefined)
+  if (this["handler" + nextTest] == undefined)
     do_throw("handler" + nextTest + " undefined!");
-  if (eval("completeTest" + nextTest) == undefined)
+  if (this["completeTest" + nextTest] == undefined)
     do_throw("completeTest" + nextTest + " undefined!");
   
   run_test_number(nextTest);
 }
 
 function run_test_number(num)
 {
   testPath = testPathBase + num;
-  httpserver.registerPathHandler(testPath, eval("handler" + num));
+  httpserver.registerPathHandler(testPath, this["handler" + num]);
 
   var channel = setupChannel(testPath);
   flags = test_flags[num];   // OK if flags undefined for test
-  channel.asyncOpen2(new ChannelListener(eval("completeTest" + num),
+  channel.asyncOpen2(new ChannelListener(this["completeTest" + num],
                                          channel, flags));
 }
 
 function setupChannel(url)
 {
   var chan = NetUtil.newChannel({
     uri: URL + url,
     loadUsingSystemPrincipal: true
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1643,17 +1643,17 @@ class StaticAnalysisMonitor(object):
         return (warning, True)
 
 
 @CommandProvider
 class StaticAnalysis(MachCommandBase):
     """Utilities for running C++ static analysis checks and format."""
 
     # List of file extension to consider (should start with dot)
-    _format_include_extensions = ('.cpp', '.c', '.cc', '.h', '.mm')
+    _format_include_extensions = ('.cpp', '.c', '.cc', '.h', '.m', '.mm')
     # File contaning all paths to exclude from formatting
     _format_ignore_file = '.clang-format-ignore'
 
     @Command('static-analysis', category='testing',
              description='Run C++ static analysis checks')
     def static_analysis(self):
         # If not arguments are provided, just print a help message.
         mach = Mach(os.getcwd())
--- a/security/manager/ssl/TransportSecurityInfo.cpp
+++ b/security/manager/ssl/TransportSecurityInfo.cpp
@@ -279,18 +279,17 @@ nsresult TransportSecurityInfo::ReadSSLS
   nsCOMPtr<nsISupports> cert;
   rv = aStream->ReadObject(true, getter_AddRefs(cert));
   MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv), "Deserialization should not fail");
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (cert) {
     mServerCert = do_QueryInterface(cert);
     if (!mServerCert) {
-      MOZ_DIAGNOSTIC_ASSERT(false,
-                            "Deserialization should not fail");
+      MOZ_DIAGNOSTIC_ASSERT(false, "Deserialization should not fail");
       return NS_NOINTERFACE;
     }
   }
 
   rv = aStream->Read16(&mCipherSuite);
   MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv), "Deserialization should not fail");
   NS_ENSURE_SUCCESS(rv, rv);
 
@@ -440,18 +439,17 @@ TransportSecurityInfo::Read(nsIObjectInp
     nsCOMPtr<nsISupports> cert;
     rv = NS_ReadOptionalObject(aStream, true, getter_AddRefs(cert));
     MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv), "Deserialization should not fail");
     NS_ENSURE_SUCCESS(rv, rv);
 
     if (cert != nullptr) {
       mServerCert = do_QueryInterface(cert);
       if (!mServerCert) {
-        MOZ_DIAGNOSTIC_ASSERT(false,
-                              "Deserialization should not fail");
+        MOZ_DIAGNOSTIC_ASSERT(false, "Deserialization should not fail");
         return NS_NOINTERFACE;
       }
     }
 
     rv = aStream->Read16(&mCipherSuite);
     MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv), "Deserialization should not fail");
     NS_ENSURE_SUCCESS(rv, rv);
 
deleted file mode 100644
--- a/testing/web-platform/meta/css/CSS2/abspos/abspos-containing-block-initial-001.xht.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[abspos-containing-block-initial-001.xht]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--auto--percent-width-nonpercent-height-viewbox.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[tall--auto--percent-width-nonpercent-height-viewbox.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--auto-32px--nonpercent-width-omitted-height.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[tall--auto-32px--nonpercent-width-omitted-height.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--auto-32px--nonpercent-width-percent-height-viewbox.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[tall--auto-32px--nonpercent-width-percent-height-viewbox.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--auto-32px--omitted-width-nonpercent-height.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[tall--auto-32px--omitted-width-nonpercent-height.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--auto-32px--percent-width-nonpercent-height.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[tall--auto-32px--percent-width-nonpercent-height.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--contain--height.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[tall--contain--height.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--cover--nonpercent-width-nonpercent-height--crisp.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[tall--cover--nonpercent-width-nonpercent-height--crisp.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--cover--nonpercent-width-percent-height-viewbox.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[tall--cover--nonpercent-width-percent-height-viewbox.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--cover--omitted-width-omitted-height.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[tall--cover--omitted-width-omitted-height.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-backgrounds/background-size/vector/tall--cover--omitted-width-percent-height-viewbox.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[tall--cover--omitted-width-percent-height-viewbox.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-color/t421-rgb-values-meaning-b.xht.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[t421-rgb-values-meaning-b.xht]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-grid/grid-definition/grid-template-columns-fit-content-001.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[grid-template-columns-fit-content-001.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-grid/grid-definition/grid-template-rows-fit-content-001.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[grid-template-rows-fit-content-001.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-position/position-sticky-flexbox.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[position-sticky-flexbox.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-text-decor/text-decoration-line.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[text-decoration-line.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-text/line-break/line-break-strict-011.xht.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[line-break-strict-011.xht]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-text/text-transform/text-transform-capitalize-001.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[text-transform-capitalize-001.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-text/text-transform/text-transform-capitalize-003.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[text-transform-capitalize-003.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-text/text-transform/text-transform-capitalize-005.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[text-transform-capitalize-005.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-text/text-transform/text-transform-capitalize-007.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[text-transform-capitalize-007.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-text/text-transform/text-transform-capitalize-010.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[text-transform-capitalize-010.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-text/text-transform/text-transform-upperlower-001.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[text-transform-upperlower-001.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-text/text-transform/text-transform-upperlower-003.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[text-transform-upperlower-003.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-ui/box-sizing-007.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[box-sizing-007.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-ui/box-sizing-009.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[box-sizing-009.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-ui/text-overflow-021.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[text-overflow-021.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-writing-modes/sizing-orthog-prct-vlr-in-htb-001.xht.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[sizing-orthog-prct-vlr-in-htb-001.xht]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-writing-modes/sizing-orthog-vrl-in-htb-008.xht.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[sizing-orthog-vrl-in-htb-008.xht]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-writing-modes/sizing-orthog-vrl-in-htb-013.xht.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[sizing-orthog-vrl-in-htb-013.xht]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-writing-modes/svg-aliasing-001.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[svg-aliasing-001.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/cssom-view/scrollTop-display-change.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[scrollTop-display-change.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/selectors/selectors-empty-001.xml.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[selectors-empty-001.xml]
deleted file mode 100644
--- a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/background/background-attachment-fixed-inside-transform-1.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[background-attachment-fixed-inside-transform-1.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/break3/moz-block-fragmentation-001.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[moz-block-fragmentation-001.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/contain/contain-layout-overflow-001.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[contain-layout-overflow-001.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/contain/contain-layout-overflow-002.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[contain-layout-overflow-002.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/contain/contain-paint-clip-003.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[contain-paint-clip-003.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001a.xhtml.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[flexbox-align-content-vert-001a.xhtml]
deleted file mode 100644
--- a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-justify-content-horiz-003.xhtml.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[flexbox-justify-content-horiz-003.xhtml]
deleted file mode 100644
--- a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-justify-content-horiz-004.xhtml.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[flexbox-justify-content-horiz-004.xhtml]
deleted file mode 100644
--- a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/images3/color-stop-currentcolor.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[color-stop-currentcolor.html]
deleted file mode 100644
--- a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/multicol-height-002.xht.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[multicol-height-002.xht]
deleted file mode 100644
--- a/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/text-orientation-upright-directionality-001.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[text-orientation-upright-directionality-001.html]
deleted file mode 100644
--- a/testing/web-platform/meta/html/dom/elements/global-attributes/dir_auto-contained-L.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[dir_auto-contained-L.html]
deleted file mode 100644
--- a/testing/web-platform/meta/html/dom/elements/global-attributes/dir_auto-contained-R.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[dir_auto-contained-R.html]
deleted file mode 100644
--- a/testing/web-platform/meta/html/dom/elements/global-attributes/dir_auto-contained-dir-L.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[dir_auto-contained-dir-L.html]
deleted file mode 100644
--- a/testing/web-platform/meta/html/rendering/non-replaced-elements/the-page/body-margin-2a.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[body-margin-2a.html]
deleted file mode 100644
--- a/testing/web-platform/meta/html/rendering/non-replaced-elements/the-page/body-margin-2b.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[body-margin-2b.html]
deleted file mode 100644
--- a/testing/web-platform/meta/html/rendering/non-replaced-elements/the-page/body-margin-2h.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[body-margin-2h.html]
deleted file mode 100644
--- a/testing/web-platform/meta/html/rendering/non-replaced-elements/the-page/body-margin-2k.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[body-margin-2k.html]
deleted file mode 100644
--- a/testing/web-platform/meta/html/rendering/non-replaced-elements/the-page/body-margin-2l.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[body-margin-2l.html]
deleted file mode 100644
--- a/testing/web-platform/meta/html/semantics/forms/the-textarea-element/textarea-newline-bidi.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[textarea-newline-bidi.html]
deleted file mode 100644
--- a/testing/web-platform/meta/html/semantics/forms/the-textarea-element/wrap-reflect-1a.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[wrap-reflect-1a.html]
deleted file mode 100644
--- a/testing/web-platform/meta/html/semantics/forms/the-textarea-element/wrap-reflect-1b.html.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[wrap-reflect-1b.html]
--- a/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_autocomplete.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_autocomplete.html
@@ -18,83 +18,82 @@ var chromeScript = runChecksAfterCommonI
 var setupScript = runInParent(function setup() {
   ChromeUtils.import("resource://gre/modules/Services.jsm");
 
   // Create some logins just for this form, since we'll be deleting them.
   var nsLoginInfo = Components.Constructor("@mozilla.org/login-manager/loginInfo;1",
                                            Ci.nsILoginInfo, "init");
   assert.ok(nsLoginInfo != null, "nsLoginInfo constructor");
 
+  let logins = {};
   // login0 has no username, so should be filtered out from the autocomplete list.
-  var login0 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
-                               "", "user0pass", "", "pword");
+  logins.login0 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
+                                  "", "user0pass", "", "pword");
 
-  var login1 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
-                               "tempuser1", "temppass1", "uname", "pword");
+  logins.login1 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
+                                  "tempuser1", "temppass1", "uname", "pword");
 
-  var login2 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
-                               "testuser2", "testpass2", "uname", "pword");
+  logins.login2 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
+                                  "testuser2", "testpass2", "uname", "pword");
 
-  var login3 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
-                               "testuser3", "testpass3", "uname", "pword");
+  logins.login3 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
+                                  "testuser3", "testpass3", "uname", "pword");
 
-  var login4 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
-                               "zzzuser4", "zzzpass4", "uname", "pword");
+  logins.login4 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete:8888", null,
+                                  "zzzuser4", "zzzpass4", "uname", "pword");
 
   // login 5 only used in the single-user forms
-  var login5 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete2", null,
-                               "singleuser5", "singlepass5", "uname", "pword");
+  logins.login5 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete2", null,
+                                  "singleuser5", "singlepass5", "uname", "pword");
 
-  var login6A = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete3", null,
-                                "form7user1", "form7pass1", "uname", "pword");
-  var login6B = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete3", null,
-                                "form7user2", "form7pass2", "uname", "pword");
+  logins.login6A = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete3", null,
+                                   "form7user1", "form7pass1", "uname", "pword");
+  logins.login6B = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete3", null,
+                                   "form7user2", "form7pass2", "uname", "pword");
 
-  var login7  = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete4", null,
-                                "form8user", "form8pass", "uname", "pword");
+  logins.login7  = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete4", null,
+                                   "form8user", "form8pass", "uname", "pword");
 
-  var login8A = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete5", null,
-                                "form9userAB", "form9pass", "uname", "pword");
-  var login8B = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete5", null,
-                                "form9userAAB", "form9pass", "uname", "pword");
-  var login8C = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete5", null,
-                                "form9userAABzz", "form9pass", "uname", "pword");
+  logins.login8A = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete5", null,
+                                   "form9userAB", "form9pass", "uname", "pword");
+  logins.login8B = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete5", null,
+                                   "form9userAAB", "form9pass", "uname", "pword");
+  logins.login8C = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete5", null,
+                                   "form9userAABzz", "form9pass", "uname", "pword");
 
-  var login10 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete7", null,
-                                "testuser10", "testpass10", "uname", "pword");
+  logins.login10 = new nsLoginInfo("http://mochi.test:8888", "http://autocomplete7", null,
+                                   "testuser10", "testpass10", "uname", "pword");
 
 
   // try/catch in case someone runs the tests manually, twice.
   try {
-    Services.logins.addLogin(login0);
-    Services.logins.addLogin(login1);
-    Services.logins.addLogin(login2);
-    Services.logins.addLogin(login3);
-    Services.logins.addLogin(login4);
-    Services.logins.addLogin(login5);
-    Services.logins.addLogin(login6A);
-    Services.logins.addLogin(login6B);
-    Services.logins.addLogin(login7);
-    Services.logins.addLogin(login8A);
-    Services.logins.addLogin(login8B);
+    Services.logins.addLogin(logins.login0);
+    Services.logins.addLogin(logins.login1);
+    Services.logins.addLogin(logins.login2);
+    Services.logins.addLogin(logins.login3);
+    Services.logins.addLogin(logins.login4);
+    Services.logins.addLogin(logins.login5);
+    Services.logins.addLogin(logins.login6A);
+    Services.logins.addLogin(logins.login6B);
+    Services.logins.addLogin(logins.login7);
+    Services.logins.addLogin(logins.login8A);
+    Services.logins.addLogin(logins.login8B);
     // login8C is added later
-    Services.logins.addLogin(login10);
+    Services.logins.addLogin(logins.login10);
   } catch (e) {
     assert.ok(false, "addLogin threw: " + e);
   }
 
   addMessageListener("addLogin", loginVariableName => {
-    // eslint-disable-next-line no-eval
-    let login = eval(loginVariableName);
+    let login = logins[loginVariableName];
     assert.ok(!!login, "Login to add is defined: " + loginVariableName);
     Services.logins.addLogin(login);
   });
   addMessageListener("removeLogin", loginVariableName => {
-    // eslint-disable-next-line no-eval
-    let login = eval(loginVariableName);
+    let login = logins[loginVariableName];
     assert.ok(!!login, "Login to delete is defined: " + loginVariableName);
     Services.logins.removeLogin(login);
   });
 });
 </script>
 <p id="display"></p>
 
 <!-- we presumably can't hide the content for this test. -->
@@ -175,16 +174,18 @@ var setupScript = runInParent(function s
    </div>
 </div>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Login Manager: multiple login autocomplete. **/
 
+SpecialPowers.pushPrefEnv({"set": [["security.allow_eval_with_system_principal", true]]});
+
 var uname = $_(1, "uname");
 var pword = $_(1, "pword");
 
 // Restore the form to the default state.
 function restoreForm() {
   uname.value = "";
   pword.value = "";
   uname.focus();
--- a/toolkit/components/satchel/test/test_form_autocomplete.html
+++ b/toolkit/components/satchel/test/test_form_autocomplete.html
@@ -136,16 +136,18 @@ Form History test: form field autocomple
   </form>
 
 </div>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 /** Test for Form History autocomplete **/
 
+SpecialPowers.pushPrefEnv({"set": [["security.allow_eval_with_system_principal", true]]});
+
 var input = $_(1, "field1");
 
 function setupFormHistory(aCallback) {
   updateFormHistory([
     { op: "remove" },
     { op: "add", fieldname: "field1", value: "value1" },
     { op: "add", fieldname: "field1", value: "value2" },
     { op: "add", fieldname: "field1", value: "value3" },
--- a/widget/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/cocoa/nsNativeThemeCocoa.mm
@@ -111,17 +111,16 @@ void CUIDraw(CUIRendererRef r, CGRect re
 @end
 
 @interface CheckboxCell : NSButtonCell
 @end
 
 @implementation CheckboxCell
 @end
 
-
 static void DrawFocusRingForCellIfNeeded(NSCell* aCell, NSRect aWithFrame, NSView* aInView) {
   if ([aCell showsFirstResponder]) {
     CGContextRef cgContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
     CGContextSaveGState(cgContext);
 
     // It's important to set the focus ring style before we enter the
     // transparency layer so that the transparency layer only contains
     // the normal button mask without the focus ring, and the conversion
--- a/widget/cocoa/nsTouchBar.mm
+++ b/widget/cocoa/nsTouchBar.mm
@@ -7,38 +7,35 @@
 #include "mozilla/MacStringHelpers.h"
 #include "mozilla/Telemetry.h"
 #include "nsArrayUtils.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsIArray.h"
 
 @implementation nsTouchBar
 
-static NSTouchBarItemIdentifier CustomButtonIdentifier =
-    @"com.mozilla.firefox.touchbar.button";
+static NSTouchBarItemIdentifier CustomButtonIdentifier = @"com.mozilla.firefox.touchbar.button";
 static NSTouchBarItemIdentifier CustomMainButtonIdentifier =
     @"com.mozilla.firefox.touchbar.mainbutton";
-static NSTouchBarItemIdentifier ScrubberIdentifier =
-    @"com.mozilla.firefox.touchbar.scrubber";
+static NSTouchBarItemIdentifier ScrubberIdentifier = @"com.mozilla.firefox.touchbar.scrubber";
 
 // Non-JS scrubber implemention for the Share Scrubber,
 // since it is defined by an Apple API.
 static NSTouchBarItemIdentifier ShareScrubberIdentifier =
-  [ScrubberIdentifier stringByAppendingPathExtension:@"share"];
+    [ScrubberIdentifier stringByAppendingPathExtension:@"share"];
 
 // Used to tie action strings to buttons.
 static char sIdentifierAssociationKey;
 
 // The system default width for Touch Bar inputs is 128px. This is double.
 #define MAIN_BUTTON_WIDTH 256
 
 #pragma mark - NSTouchBarDelegate
 
-- (instancetype)init
-{
+- (instancetype)init {
   if ((self = [super init])) {
     mTouchBarHelper = do_GetService(NS_TOUCHBARHELPER_CID);
     if (!mTouchBarHelper) {
       return nil;
     }
 
     self.delegate = self;
     self.mappedLayoutItems = [NSMutableDictionary dictionary];
@@ -46,104 +43,92 @@ static char sIdentifierAssociationKey;
 
     nsresult rv = mTouchBarHelper->GetLayout(getter_AddRefs(layoutItems));
     if (NS_FAILED(rv) || !layoutItems) {
       return nil;
     }
 
     uint32_t itemCount = 0;
     layoutItems->GetLength(&itemCount);
-    // This is copied to self.defaultItemIdentifiers. Required since 
+    // This is copied to self.defaultItemIdentifiers. Required since
     // [self.mappedLayoutItems allKeys] does not preserve order.
-    NSMutableArray* orderedLayoutIdentifiers = 
-      [NSMutableArray arrayWithCapacity:itemCount];
+    NSMutableArray* orderedLayoutIdentifiers = [NSMutableArray arrayWithCapacity:itemCount];
     for (uint32_t i = 0; i < itemCount; ++i) {
       nsCOMPtr<nsITouchBarInput> input = do_QueryElementAt(layoutItems, i);
       if (!input) {
         continue;
       }
 
-      TouchBarInput* convertedInput =
-        [[TouchBarInput alloc] initWithXPCOM:input];
+      TouchBarInput* convertedInput = [[TouchBarInput alloc] initWithXPCOM:input];
 
       // Add new input to dictionary for lookup of properties in delegate.
       self.mappedLayoutItems[[convertedInput nativeIdentifier]] = convertedInput;
       orderedLayoutIdentifiers[i] = [convertedInput nativeIdentifier];
     }
 
     self.defaultItemIdentifiers = [orderedLayoutIdentifiers copy];
   }
 
   return self;
 }
 
-- (void)dealloc
-{
+- (void)dealloc {
   for (NSTouchBarItemIdentifier identifier in self.mappedLayoutItems) {
     NSTouchBarItem* item = [self itemForIdentifier:identifier];
     [item release];
   }
 
   [self.defaultItemIdentifiers release];
 
   [self.mappedLayoutItems removeAllObjects];
   [self.mappedLayoutItems release];
   [super dealloc];
 }
 
 - (NSTouchBarItem*)touchBar:(NSTouchBar*)aTouchBar
-      makeItemForIdentifier:(NSTouchBarItemIdentifier)aIdentifier
-{
+      makeItemForIdentifier:(NSTouchBarItemIdentifier)aIdentifier {
   if ([aIdentifier hasPrefix:ScrubberIdentifier]) {
     if (![aIdentifier isEqualToString:ShareScrubberIdentifier]) {
       // We're only supporting the Share scrubber for now.
       return nil;
     }
     return [self makeShareScrubberForIdentifier:aIdentifier];
   }
 
   // The cases of a button or main button require the same setup.
-  NSButton* button = [NSButton buttonWithTitle:@""
-                                        target:self
-                                        action:@selector(touchBarAction:)];
-  NSCustomTouchBarItem* item = [[NSCustomTouchBarItem alloc]
-                                  initWithIdentifier:aIdentifier];
+  NSButton* button = [NSButton buttonWithTitle:@"" target:self action:@selector(touchBarAction:)];
+  NSCustomTouchBarItem* item = [[NSCustomTouchBarItem alloc] initWithIdentifier:aIdentifier];
   item.view = button;
 
   TouchBarInput* input = self.mappedLayoutItems[aIdentifier];
   if ([aIdentifier hasPrefix:CustomButtonIdentifier]) {
     return [self updateButton:item input:input];
   } else if ([aIdentifier hasPrefix:CustomMainButtonIdentifier]) {
     return [self updateMainButton:item input:input];
   }
 
   return nil;
 }
 
-- (void)updateItem:(TouchBarInput*)aInput
-{
+- (void)updateItem:(TouchBarInput*)aInput {
   NSTouchBarItem* item = [self itemForIdentifier:[aInput nativeIdentifier]];
   if (!item) {
     return;
   }
   if ([[aInput nativeIdentifier] hasPrefix:CustomButtonIdentifier]) {
-    [self updateButton:(NSCustomTouchBarItem*)item
-                 input:aInput];
+    [self updateButton:(NSCustomTouchBarItem*)item input:aInput];
   } else if ([[aInput nativeIdentifier] hasPrefix:CustomMainButtonIdentifier]) {
-    [self updateMainButton:(NSCustomTouchBarItem*)item
-                     input:aInput];
+    [self updateMainButton:(NSCustomTouchBarItem*)item input:aInput];
   }
 
   [self.mappedLayoutItems[[aInput nativeIdentifier]] release];
   self.mappedLayoutItems[[aInput nativeIdentifier]] = aInput;
 }
 
-- (NSTouchBarItem*)updateButton:(NSCustomTouchBarItem*)aButton
-                          input:(TouchBarInput*)aInput
-{
+- (NSTouchBarItem*)updateButton:(NSCustomTouchBarItem*)aButton input:(TouchBarInput*)aInput {
   NSButton* button = (NSButton*)aButton.view;
   if (!button) {
     return nil;
   }
 
   button.title = [aInput title];
   if ([aInput image]) {
     button.image = [aInput image];
@@ -151,108 +136,96 @@ static char sIdentifierAssociationKey;
   }
 
   [button setEnabled:![aInput isDisabled]];
 
   if ([aInput color]) {
     button.bezelColor = [aInput color];
   }
 
-  objc_setAssociatedObject(button,
-    &sIdentifierAssociationKey,
-    [aInput nativeIdentifier], OBJC_ASSOCIATION_RETAIN);
+  objc_setAssociatedObject(button, &sIdentifierAssociationKey, [aInput nativeIdentifier],
+                           OBJC_ASSOCIATION_RETAIN);
 
   aButton.customizationLabel = [aInput title];
 
   return aButton;
 }
 
 - (NSTouchBarItem*)updateMainButton:(NSCustomTouchBarItem*)aMainButton
-                              input:(TouchBarInput*)aInput
-{
-  aMainButton = (NSCustomTouchBarItem*)[self updateButton:aMainButton
-                                                    input:aInput];
+                              input:(TouchBarInput*)aInput {
+  aMainButton = (NSCustomTouchBarItem*)[self updateButton:aMainButton input:aInput];
   NSButton* button = (NSButton*)aMainButton.view;
   button.imageHugsTitle = YES;
   // If empty, string is still being localized. Display a blank input instead.
   if ([button.title isEqualToString:@""]) {
     [button setImagePosition:NSNoImage];
   } else {
     [button setImagePosition:NSImageLeft];
   }
 
-  [button.widthAnchor
-    constraintGreaterThanOrEqualToConstant:MAIN_BUTTON_WIDTH].active = YES;
-  [button setContentHuggingPriority:1.0
-                      forOrientation:NSLayoutConstraintOrientationHorizontal];
+  [button.widthAnchor constraintGreaterThanOrEqualToConstant:MAIN_BUTTON_WIDTH].active = YES;
+  [button setContentHuggingPriority:1.0 forOrientation:NSLayoutConstraintOrientationHorizontal];
   return aMainButton;
 }
 
-- (NSTouchBarItem*)makeShareScrubberForIdentifier:
-                        (NSTouchBarItemIdentifier)aIdentifier 
-{
+- (NSTouchBarItem*)makeShareScrubberForIdentifier:(NSTouchBarItemIdentifier)aIdentifier {
   TouchBarInput* input = self.mappedLayoutItems[aIdentifier];
   // System-default share menu
   NSSharingServicePickerTouchBarItem* servicesItem =
-      [[NSSharingServicePickerTouchBarItem alloc]
-        initWithIdentifier:aIdentifier];
+      [[NSSharingServicePickerTouchBarItem alloc] initWithIdentifier:aIdentifier];
   servicesItem.buttonImage = [input image];
   servicesItem.delegate = self;
   return servicesItem;
 }
 
-- (void)touchBarAction:(id)aSender
-{
+- (void)touchBarAction:(id)aSender {
   NSTouchBarItemIdentifier identifier =
-    objc_getAssociatedObject(aSender, &sIdentifierAssociationKey);
-  if (!identifier || [identifier isEqualToString: @""]) {
+      objc_getAssociatedObject(aSender, &sIdentifierAssociationKey);
+  if (!identifier || [identifier isEqualToString:@""]) {
     return;
   }
 
   TouchBarInput* input = self.mappedLayoutItems[identifier];
   if (!input) {
     return;
   }
 
   nsCOMPtr<nsITouchBarInputCallback> callback = [input callback];
   callback->OnCommand();
 }
 
 #pragma mark - TouchBar Utilities
 
-+ (NSImage*)getTouchBarIconNamed:(NSString*)aImageName
-{
++ (NSImage*)getTouchBarIconNamed:(NSString*)aImageName {
   nsCOMPtr<nsIFile> resDir;
   nsAutoCString resPath;
   NSString* pathToImage;
 
   nsresult rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(resDir));
   resDir->AppendNative(NS_LITERAL_CSTRING("res"));
   resDir->AppendNative(NS_LITERAL_CSTRING("touchbar"));
 
   rv = resDir->GetNativePath(resPath);
-  
+
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return nil;
   }
 
   pathToImage = [NSString stringWithUTF8String:(const char*)resPath.get()];
   pathToImage = [pathToImage stringByAppendingPathComponent:aImageName];
-  NSImage* image = [[[NSImage alloc]
-                      initWithContentsOfFile:pathToImage] autorelease];
+  NSImage* image = [[[NSImage alloc] initWithContentsOfFile:pathToImage] autorelease];
   // A nil image will fail gracefully to a labelled button
 
   return image;
 }
 
 #pragma mark - NSSharingServicePickerTouchBarItemDelegate
 
 - (NSArray*)itemsForSharingServicePickerTouchBarItem:
-                (NSSharingServicePickerTouchBarItem*)aPickerTouchBarItem
-{
+    (NSSharingServicePickerTouchBarItem*)aPickerTouchBarItem {
   NSURL* urlToShare = nil;
   NSString* titleToShare = @"";
   nsAutoString url;
   nsAutoString title;
   if (mTouchBarHelper) {
     nsresult rv = mTouchBarHelper->GetActiveUrl(url);
     if (!NS_FAILED(rv)) {
       urlToShare = [NSURL URLWithString:nsCocoaUtils::ToNSString(url)];
@@ -267,148 +240,150 @@ static char sIdentifierAssociationKey;
     rv = mTouchBarHelper->GetActiveTitle(title);
     if (!NS_FAILED(rv)) {
       titleToShare = nsCocoaUtils::ToNSString(title);
     }
   }
 
   // If the user has gotten this far, they have clicked the share button so it
   // is logged.
-  Telemetry::AccumulateCategorical(
-    Telemetry::LABELS_TOUCHBAR_BUTTON_PRESSES::Share);
+  Telemetry::AccumulateCategorical(Telemetry::LABELS_TOUCHBAR_BUTTON_PRESSES::Share);
 
-  return @[urlToShare, titleToShare];
+  return @[ urlToShare, titleToShare ];
 }
 
-- (NSArray<NSSharingService*>*)sharingServicePicker:
-                           (NSSharingServicePicker*)aSharingServicePicker
-                            sharingServicesForItems:
-                                          (NSArray*)aItems
-                            proposedSharingServices:
-                       (NSArray<NSSharingService*>*)aProposedServices
-{
+- (NSArray<NSSharingService*>*)sharingServicePicker:(NSSharingServicePicker*)aSharingServicePicker
+                            sharingServicesForItems:(NSArray*)aItems
+                            proposedSharingServices:(NSArray<NSSharingService*>*)aProposedServices {
   // redundant services
   NSArray* excludedServices = @[
     @"com.apple.share.System.add-to-safari-reading-list",
   ];
 
   NSArray* sharingServices = [aProposedServices
-    filteredArrayUsingPredicate:
-      [NSPredicate predicateWithFormat:@"NOT (name IN %@)", excludedServices]];
+      filteredArrayUsingPredicate:[NSPredicate
+                                      predicateWithFormat:@"NOT (name IN %@)", excludedServices]];
 
   return sharingServices;
 }
 
 @end
 
 @implementation TouchBarInput
-- (NSString*)key { return mKey; }
-- (NSString*)title { return mTitle; }
-- (NSImage*)image { return mImage; }
-- (NSString*)type { return mType; }
-- (NSColor*)color { return mColor; }
-- (BOOL)isDisabled { return mDisabled; }
-- (NSTouchBarItemIdentifier)nativeIdentifier { return mNativeIdentifier; }
-- (nsCOMPtr<nsITouchBarInputCallback>)callback { return mCallback; }
-- (void)setKey:(NSString*)aKey
-{
+- (NSString*)key {
+  return mKey;
+}
+- (NSString*)title {
+  return mTitle;
+}
+- (NSImage*)image {
+  return mImage;
+}
+- (NSString*)type {
+  return mType;
+}
+- (NSColor*)color {
+  return mColor;
+}
+- (BOOL)isDisabled {
+  return mDisabled;
+}
+- (NSTouchBarItemIdentifier)nativeIdentifier {
+  return mNativeIdentifier;
+}
+- (nsCOMPtr<nsITouchBarInputCallback>)callback {
+  return mCallback;
+}
+- (void)setKey:(NSString*)aKey {
   [aKey retain];
   [mKey release];
   mKey = aKey;
 }
 
-- (void)setTitle:(NSString*)aTitle
-{
+- (void)setTitle:(NSString*)aTitle {
   [aTitle retain];
   [mTitle release];
   mTitle = aTitle;
 }
 
-- (void)setImage:(NSImage*)aImage
-{
+- (void)setImage:(NSImage*)aImage {
   [aImage retain];
   [mImage release];
   mImage = aImage;
 }
 
-- (void)setType:(NSString*)aType
-{
+- (void)setType:(NSString*)aType {
   [aType retain];
   [mType release];
   mType = aType;
 }
 
-- (void)setColor:(NSColor*)aColor
-{
+- (void)setColor:(NSColor*)aColor {
   [aColor retain];
   [mColor release];
   mColor = aColor;
 }
 
-- (void)setDisabled:(BOOL)aDisabled { mDisabled = aDisabled; }
+- (void)setDisabled:(BOOL)aDisabled {
+  mDisabled = aDisabled;
+}
 
-- (void)setNativeIdentifier:(NSTouchBarItemIdentifier)aNativeIdentifier
-{
+- (void)setNativeIdentifier:(NSTouchBarItemIdentifier)aNativeIdentifier {
   [aNativeIdentifier retain];
   [mNativeIdentifier release];
   mNativeIdentifier = aNativeIdentifier;
 }
 
-- (void)setCallback:(nsCOMPtr<nsITouchBarInputCallback>)aCallback
-{
+- (void)setCallback:(nsCOMPtr<nsITouchBarInputCallback>)aCallback {
   mCallback = aCallback;
 }
 
 - (id)initWithKey:(NSString*)aKey
             title:(NSString*)aTitle
             image:(NSString*)aImage
-            type:(NSString*)aType
-        callback:(nsCOMPtr<nsITouchBarInputCallback>)aCallback
-           color:(uint32_t)aColor
-        disabled:(BOOL)aDisabled
-{
+             type:(NSString*)aType
+         callback:(nsCOMPtr<nsITouchBarInputCallback>)aCallback
+            color:(uint32_t)aColor
+         disabled:(BOOL)aDisabled {
   if (self = [super init]) {
     [self setKey:aKey];
     [self setTitle:aTitle];
     [self setImage:[nsTouchBar getTouchBarIconNamed:aImage]];
     [self setType:aType];
     [self setCallback:aCallback];
     if (aColor) {
-      [self setColor:[NSColor colorWithDisplayP3Red:((aColor>>16)&0xFF)/255.0
-                                            green:((aColor>>8)&0xFF)/255.0
-                                             blue:((aColor)&0xFF)/255.0
-                                            alpha:1.0]];
+      [self setColor:[NSColor colorWithDisplayP3Red:((aColor >> 16) & 0xFF) / 255.0
+                                              green:((aColor >> 8) & 0xFF) / 255.0
+                                               blue:((aColor)&0xFF) / 255.0
+                                              alpha:1.0]];
     }
     [self setDisabled:aDisabled];
 
     NSTouchBarItemIdentifier TypeIdentifier = @"";
     if ([aType isEqualToString:@"scrubber"]) {
       TypeIdentifier = ScrubberIdentifier;
     } else if ([aType isEqualToString:@"mainButton"]) {
       TypeIdentifier = CustomMainButtonIdentifier;
     } else {
       TypeIdentifier = CustomButtonIdentifier;
     }
 
     if (!aKey) {
       [self setNativeIdentifier:TypeIdentifier];
     } else if ([aKey isEqualToString:@"share"]) {
-      [self setNativeIdentifier:
-        [TypeIdentifier stringByAppendingPathExtension:aKey]];
+      [self setNativeIdentifier:[TypeIdentifier stringByAppendingPathExtension:aKey]];
     } else {
-      [self setNativeIdentifier:
-        [TypeIdentifier stringByAppendingPathExtension:aKey]];
+      [self setNativeIdentifier:[TypeIdentifier stringByAppendingPathExtension:aKey]];
     }
   }
 
   return self;
 }
 
-- (TouchBarInput*)initWithXPCOM:(nsCOMPtr<nsITouchBarInput>)aInput
-{
+- (TouchBarInput*)initWithXPCOM:(nsCOMPtr<nsITouchBarInput>)aInput {
   nsAutoString keyStr;
   nsresult rv = aInput->GetKey(keyStr);
   if (NS_FAILED(rv)) {
     return nil;
   }
 
   nsAutoString titleStr;
   rv = aInput->GetTitle(titleStr);
@@ -450,18 +425,17 @@ static char sIdentifierAssociationKey;
                      title:nsCocoaUtils::ToNSString(titleStr)
                      image:nsCocoaUtils::ToNSString(imageStr)
                       type:nsCocoaUtils::ToNSString(typeStr)
                   callback:callback
                      color:colorInt
                   disabled:(BOOL)disabled];
 }
 
-- (void)dealloc
-{
+- (void)dealloc {
   [mKey release];
   [mTitle release];
   [mImage release];
   [mType release];
   [mColor release];
   [mNativeIdentifier release];
   [super dealloc];
 }
--- a/widget/cocoa/nsTouchBarUpdater.mm
+++ b/widget/cocoa/nsTouchBarUpdater.mm
@@ -7,39 +7,35 @@
 #include "nsTouchBar.h"
 #include "nsITouchBarInput.h"
 #include "nsTouchBarUpdater.h"
 
 #include "nsCocoaWindow.h"
 #include "nsIBaseWindow.h"
 #include "nsIWidget.h"
 
-#if !defined(MAC_OS_X_VERSION_10_12_2) || \
-    MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12_2
-@interface BaseWindow(NSTouchBarProvider)
-@property (strong) NSTouchBar* touchBar;
+#if !defined(MAC_OS_X_VERSION_10_12_2) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12_2
+@interface BaseWindow (NSTouchBarProvider)
+@property(strong) NSTouchBar* touchBar;
 @end
 #endif
 
 NS_IMPL_ISUPPORTS(nsTouchBarUpdater, nsITouchBarUpdater);
 
 NS_IMETHODIMP
-nsTouchBarUpdater::UpdateTouchBarInput(nsIBaseWindow* aWindow,
-                                       nsITouchBarInput* aInput)
-{
+nsTouchBarUpdater::UpdateTouchBarInput(nsIBaseWindow* aWindow, nsITouchBarInput* aInput) {
   nsCOMPtr<nsIWidget> widget = nullptr;
   aWindow->GetMainWidget(getter_AddRefs(widget));
   if (!widget) {
     return NS_ERROR_FAILURE;
   }
   BaseWindow* cocoaWin = (BaseWindow*)widget->GetNativeData(NS_NATIVE_WINDOW);
   if (!cocoaWin) {
     return NS_ERROR_FAILURE;
   }
 
   if ([cocoaWin respondsToSelector:@selector(touchBar)]) {
-    TouchBarInput* convertedInput =
-      [[TouchBarInput alloc] initWithXPCOM:aInput];
+    TouchBarInput* convertedInput = [[TouchBarInput alloc] initWithXPCOM:aInput];
     [(nsTouchBar*)cocoaWin.touchBar updateItem:convertedInput];
   }
-  
+
   return NS_OK;
 }
--- a/widget/gtk/gtk3drawing.cpp
+++ b/widget/gtk/gtk3drawing.cpp
@@ -376,19 +376,16 @@ static void CalculateToolbarButtonSpacin
 
   if (!aMetrics->firstButton) {
     aMetrics->buttonMargin.left += buttonSpacing;
   }
   if (!aMetrics->lastButton) {
     aMetrics->buttonMargin.right += buttonSpacing;
   }
 
-  aMetrics->iconXPosition += aMetrics->buttonMargin.left;
-  aMetrics->iconYPosition += aMetrics->buttonMargin.top;
-
   aMetrics->minSizeWithBorderMargin.width +=
       aMetrics->buttonMargin.right + aMetrics->buttonMargin.left;
   aMetrics->minSizeWithBorderMargin.height +=
       aMetrics->buttonMargin.top + aMetrics->buttonMargin.bottom;
 }
 
 int GetGtkHeaderBarButtonLayout(WidgetNodeType* aButtonLayout,
                                 int aMaxButtonNums,
@@ -405,35 +402,48 @@ int GetGtkHeaderBarButtonLayout(WidgetNo
   GtkSettings* settings = gtk_settings_get_for_screen(gdk_screen_get_default());
   g_object_get(settings, "gtk-decoration-layout", &decorationLayout, nullptr);
 
   // Use a default layout
   if (!decorationLayout) {
     decorationLayout = "menu:minimize,maximize,close";
   }
 
+  // "minimize,maximize,close:" layout means buttons are on the opposite
+  // titlebar side. close button is always there.
+  bool reversedButtonsPlacement = false;
+  const char *closeButton = strstr(decorationLayout, "close");
+  const char *separator = strchr(decorationLayout, ':');
+  if (closeButton != nullptr && separator != nullptr) {
+    reversedButtonsPlacement = closeButton < separator;
+  }
+
   // We support only default button order now:
-  // minimize/maximize/close
+  // minimize/maximize/close for right placement
+  // close/minimize/maximize for left placement
   int activeButtonNums = 0;
   if (aButtonLayout) {
+    if (reversedButtonsPlacement &&
+        strstr(decorationLayout, "close") != nullptr) {
+      aButtonLayout[activeButtonNums++] = MOZ_GTK_HEADER_BAR_BUTTON_CLOSE;
+    }
     if (strstr(decorationLayout, "minimize") != nullptr) {
       aButtonLayout[activeButtonNums++] = MOZ_GTK_HEADER_BAR_BUTTON_MINIMIZE;
     }
     if (strstr(decorationLayout, "maximize") != nullptr) {
       aButtonLayout[activeButtonNums++] = MOZ_GTK_HEADER_BAR_BUTTON_MAXIMIZE;
     }
-    if (strstr(decorationLayout, "close") != nullptr) {
+    if (!reversedButtonsPlacement &&
+        strstr(decorationLayout, "close") != nullptr) {
       aButtonLayout[activeButtonNums++] = MOZ_GTK_HEADER_BAR_BUTTON_CLOSE;
     }
   }
 
-  // "minimize,maximize,close:menu" layout means buttons are on the opposite
-  // titlebar side.
   if (aReversedButtonsPlacement) {
-    *aReversedButtonsPlacement = strstr(decorationLayout, ":menu") != nullptr;
+    *aReversedButtonsPlacement = reversedButtonsPlacement;
   }
 
   return activeButtonNums;
 }
 
 static void EnsureToolbarMetrics(void) {
   if (!sToolbarMetrics.initialized) {
     // Make sure we have clean cache after theme reset, etc.
--- a/xpcom/threads/nsThreadManager.cpp
+++ b/xpcom/threads/nsThreadManager.cpp
@@ -212,18 +212,18 @@ nsresult nsThreadManager::Init() {
       env_var_flag
           ? (env_var_flag[0] ? open(env_var_flag, flags, mode) : STDERR_FILENO)
           : 0;
 #endif
 
   nsCOMPtr<nsIIdlePeriod> idlePeriod = new MainThreadIdlePeriod();
 
   mMainThread =
-    CreateMainThread<ThreadEventQueue<PrioritizedEventQueue<EventQueue>>,
-                     EventQueue>(idlePeriod);
+      CreateMainThread<ThreadEventQueue<PrioritizedEventQueue<EventQueue>>,
+                       EventQueue>(idlePeriod);
 
   nsresult rv = mMainThread->InitCurrentThread();
   if (NS_FAILED(rv)) {
     mMainThread = nullptr;
     return rv;
   }
 
   // We need to keep a pointer to the current thread, so we can satisfy