Merge mozilla-central to autoland. a=merge on a CLOSED TREE
authorRazvan Maries <rmaries@mozilla.com>
Tue, 05 Feb 2019 18:59:13 +0200
changeset 514676 14d45a5d898d8f40dfd7bff01d17dc0a59192ff9
parent 514675 954ae98c066e4f06b1f4de68dbe53034efb37aee (current diff)
parent 514579 c4f1b630a4816cf58c997a06dad2696638956989 (diff)
child 514677 b74ecf5173c27076d61aa925dcf5a0157c1caea7
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge mozilla-central to autoland. a=merge on a CLOSED TREE
browser/components/aboutconfig/content/aboutconfig.html
dom/canvas/WebGLContext.h
dom/canvas/WebGLShaderValidator.cpp
layout/base/PresShell.cpp
layout/style/GeckoBindings.cpp
modules/libpref/init/all.js
moz.configure
taskcluster/ci/toolchain/linux.yml
taskcluster/ci/toolchain/macosx.yml
taskcluster/ci/toolchain/windows.yml
xpcom/threads/nsILabelableRunnable.cpp
xpcom/threads/nsILabelableRunnable.h
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -504,19 +504,16 @@ pref("browser.bookmarks.autoExportHTML",
 pref("browser.bookmarks.max_backups",             15);
 
 // Whether menu should close after Ctrl-click, middle-click, etc.
 pref("browser.bookmarks.openInTabClosesMenu", true);
 
 // Scripts & Windows prefs
 pref("dom.disable_open_during_load",              true);
 pref("javascript.options.showInConsole",          true);
-#ifdef DEBUG
-pref("general.warnOnAboutConfig",                 false);
-#endif
 
 // This is the pref to control the location bar, change this to true to
 // force this - this makes the origin of popup windows more obvious to avoid
 // spoofing. We would rather not do it by default because it affects UE for web
 // applications, but without it there isn't a really good way to prevent chrome
 // spoofing, see bug 337344
 pref("dom.disable_window_open_feature.location",  true);
 // allow JS to move and resize existing windows
@@ -1809,17 +1806,14 @@ pref("prio.enabled", true);
 
 // Discovery prefs
 pref("browser.discovery.enabled", true);
 pref("browser.discovery.containers.enabled", true);
 pref("browser.discovery.sites", "addons.mozilla.org");
 
 pref("browser.engagement.recent_visited_origins.expiry", 86400); // 24 * 60 * 60 (24 hours in seconds)
 
-// Show the warning page for the new about config. Will replace general.warnOnAboutConfig.
-#ifdef NIGHTLY_BUILD
 pref("browser.aboutConfig.showWarning", true);
-#endif
 
 #if defined(XP_WIN) && defined(MOZ_LAUNCHER_PROCESS)
 // Launcher process is disabled by default, will be selectively enabled via SHIELD
 pref("browser.launcherProcess.enabled", false);
 #endif // defined(XP_WIN) && defined(MOZ_LAUNCHER_PROCESS)
--- a/browser/base/content/test/static/browser_all_files_referenced.js
+++ b/browser/base/content/test/static/browser_all_files_referenced.js
@@ -8,16 +8,20 @@
 // Slow on asan builds.
 requestLongerTimeout(5);
 
 ChromeUtils.defineModuleGetter(this, "ActorManagerParent",
                                "resource://gre/modules/ActorManagerParent.jsm");
 
 var isDevtools = SimpleTest.harnessParameters.subsuite == "devtools";
 
+// This list should contain only path prefixes. It is meant to stop the test
+// from reporting things that *are* referenced, but for which the test can't
+// find any reference because the URIs are constructed programatically.
+// If you need to whitelist specific files, please use the 'whitelist' object.
 var gExceptionPaths = [
   "chrome://browser/content/defaultthemes/",
   "resource://app/defaults/settings/blocklists/",
   "resource://app/defaults/settings/main/",
   "resource://app/defaults/settings/pinning/",
   "resource://app/defaults/preferences/",
   "resource://gre/modules/commonjs/",
   "resource://gre/defaults/pref/",
@@ -36,30 +40,28 @@ var gExceptionPaths = [
   "resource://pdf.js/web/images/",
 
   // Exclude all the metadata paths under the country metadata folder because these
   // paths will be concatenated in FormAutofillUtils.jsm based on different country/region.
   "resource://formautofill/addressmetadata/",
 
   // Exclude all search-plugins because they aren't referenced by filename
   "resource://search-plugins/",
-
-  // Previous version of "about:config" kept for risk mitigation as a hidden
-  // page accessed using a direct chrome URL, will be removed in the future.
-  "chrome://global/content/config.js",
-  "chrome://global/content/config.xul",
 ];
 
 // These are not part of the omni.ja file, so we find them only when running
 // the test on a non-packaged build.
 if (AppConstants.platform == "macosx") {
   gExceptionPaths.push("resource://gre/res/cursors/");
   gExceptionPaths.push("resource://gre/res/touchbar/");
 }
 
+// Each whitelist entry should have a comment indicating which file is
+// referencing the whitelisted file in a way that the test can't detect, or a
+// bug number to remove or use the file if it is indeed currently unreferenced.
 var whitelist = [
   // browser/extensions/pdfjs/content/PdfStreamConverter.jsm
   {file: "chrome://pdf.js/locale/chrome.properties"},
   {file: "chrome://pdf.js/locale/viewer.properties"},
 
   // security/manager/pki/resources/content/device_manager.js
   {file: "chrome://pippki/content/load_device.xul"},
 
@@ -170,20 +172,20 @@ var whitelist = [
   // find the references)
   {file: "chrome://devtools/skin/images/aboutdebugging-firefox-aurora.svg",
    isFromDevTools: true},
   {file: "chrome://devtools/skin/images/aboutdebugging-firefox-beta.svg",
    isFromDevTools: true},
   {file: "chrome://devtools/skin/images/aboutdebugging-firefox-release.svg",
    isFromDevTools: true},
   {file: "chrome://devtools/skin/images/next.svg", isFromDevTools: true},
-   // Feature gates are available but not used yet - Bug 1479127
-   {file: "resource://gre-resources/featuregates/FeatureGate.jsm"},
-   {file: "resource://gre-resources/featuregates/FeatureGateImplementation.jsm"},
-   {file: "resource://gre-resources/featuregates/feature_definitions.json"},
+  // Feature gates are available but not used yet - Bug 1479127
+  {file: "resource://gre-resources/featuregates/FeatureGate.jsm"},
+  {file: "resource://gre-resources/featuregates/FeatureGateImplementation.jsm"},
+  {file: "resource://gre-resources/featuregates/feature_definitions.json"},
 ];
 
 whitelist = new Set(whitelist.filter(item =>
   ("isFromDevTools" in item) == isDevtools &&
   (!item.skipUnofficial || !AppConstants.MOZILLA_OFFICIAL) &&
   (!item.platforms || item.platforms.includes(AppConstants.platform))
 ).map(item => item.file));
 
--- a/browser/components/aboutconfig/content/aboutconfig.css
+++ b/browser/components/aboutconfig/content/aboutconfig.css
@@ -30,17 +30,17 @@ body.config-warning {
   box-sizing: border-box;
   width: 100%;
   background-color: var(--in-content-page-background);
   padding: 10px;
   padding-bottom: 0;
   min-width: 644px;
 }
 
-#search {
+#about-config-search {
   box-sizing: border-box;
   width: 100%;
   background-image: url("chrome://global/skin/icons/search-textbox.svg");
   background-repeat: no-repeat;
   background-position: 9px center;
   background-size: 12px 12px;
   padding-left: 30px;
   z-index: 1;
--- a/browser/components/aboutconfig/content/aboutconfig.html
+++ b/browser/components/aboutconfig/content/aboutconfig.html
@@ -36,10 +36,21 @@
                data-l10n-id="about-config-warning-checkbox"></label>
       </div>
 
       <div class="button-container">
         <button autofocus onclick="onWarningButtonClick();"
                 data-l10n-id="about-config-warning-button"></button>
       </div>
     </div>
+
+    <template id="main">
+      <div id="search-container">
+        <!-- Use a unique ID to prevent showing autocomplete results from other
+             browser pages with similarly named fields. -->
+        <input type="text" id="about-config-search"
+               data-l10n-id="about-config-search">
+      </div>
+
+      <table id="prefs"></table>
+    </template>
   </body>
 </html>
--- a/browser/components/aboutconfig/content/aboutconfig.js
+++ b/browser/components/aboutconfig/content/aboutconfig.js
@@ -309,47 +309,40 @@ let gPrefObserver = {
 };
 
 if (!Preferences.get("browser.aboutConfig.showWarning")) {
   // When showing the filtered preferences directly, remove the warning elements
   // immediately to prevent flickering, but wait to filter the preferences until
   // the value of the textbox has been restored from previous sessions.
   document.addEventListener("DOMContentLoaded", loadPrefs, { once: true });
   window.addEventListener("load", () => {
-    if (document.getElementById("search").value) {
+    if (document.getElementById("about-config-search").value) {
       filterPrefs();
     }
   }, { once: true });
 }
 
 function onWarningButtonClick() {
   Services.prefs.setBoolPref("browser.aboutConfig.showWarning",
     document.getElementById("showWarningNextTime").checked);
   loadPrefs();
 }
 
 function loadPrefs() {
   document.body.className = "config-background";
   [...document.styleSheets].find(s => s.title == "infop").disabled = true;
 
+  let { content } = document.getElementById("main");
   document.body.textContent = "";
-  let searchContainer = document.createElement("div");
-  searchContainer.id = "search-container";
-  let search = document.createElement("input");
-  search.type = "text";
-  search.id = "search";
-  document.l10n.setAttributes(search, "about-config-search");
-  searchContainer.appendChild(search);
-  document.body.appendChild(searchContainer);
+  document.body.appendChild(content);
+
+  let search = document.getElementById("about-config-search");
+  let prefs = document.getElementById("prefs");
   search.focus();
 
-  let prefs = document.createElement("table");
-  prefs.id = "prefs";
-  document.body.appendChild(prefs);
-
   for (let name of Services.prefs.getChildList("")) {
     new PrefRow(name);
   }
 
   search.addEventListener("keypress", event => {
     switch (event.key) {
       case "Escape":
         search.value = "";
@@ -393,17 +386,17 @@ function loadPrefs() {
 }
 
 function filterPrefs() {
   if (gPrefInEdit) {
     gPrefInEdit.endEdit();
   }
   gDeletedPrefs.clear();
 
-  let searchName = document.getElementById("search").value.trim();
+  let searchName = document.getElementById("about-config-search").value.trim();
   gFilterString = searchName.toLowerCase();
   let prefArray = [...gExistingPrefs.values()];
   if (gFilterString) {
     prefArray = prefArray.filter(pref => pref.matchesFilter);
   }
   prefArray.sort((a, b) => a.name > b.name);
   if (searchName && !gExistingPrefs.has(searchName)) {
     prefArray.push(new PrefRow(searchName));
--- a/browser/components/aboutconfig/test/browser/head.js
+++ b/browser/components/aboutconfig/test/browser/head.js
@@ -106,17 +106,17 @@ class AboutConfigTest {
     return this.document.getElementById("showWarningNextTime");
   }
 
   get bypassWarningButton() {
     return this.document.querySelector("button.primary");
   }
 
   get searchInput() {
-    return this.document.getElementById("search");
+    return this.document.getElementById("about-config-search");
   }
 
   get prefsTable() {
     return this.document.getElementById("prefs");
   }
 
   /**
    * Array of AboutConfigRowTest objects, one for each row in the main table.
--- a/browser/components/moz.build
+++ b/browser/components/moz.build
@@ -26,16 +26,17 @@ with Files("safebrowsing/**"):
     BUG_COMPONENT = ("Toolkit", "Safe Browsing")
 
 with Files('controlcenter/**'):
     BUG_COMPONENT = ('Firefox', 'General')
 
 
 DIRS += [
     'about',
+    'aboutconfig',
     'attribution',
     'contextualidentity',
     'customizableui',
     'dirprovider',
     'downloads',
     'enterprisepolicies',
     'extensions',
     'library',
@@ -56,17 +57,16 @@ DIRS += [
     'urlbar',
     'translation',
 ]
 
 DIRS += ['build']
 
 if CONFIG['NIGHTLY_BUILD']:
     DIRS += [
-        'aboutconfig',
         'payments',
     ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     DIRS += ['touchbar']
 
 XPIDL_SOURCES += [
     'nsIBrowserHandler.idl',
--- a/browser/components/sessionstore/test/browser_393716.js
+++ b/browser/components/sessionstore/test/browser_393716.js
@@ -56,25 +56,25 @@ add_task(async function test_set_tabstat
   ss.setTabState(tab, JSON.stringify(state));
   await promiseBrowserLoaded(tab.linkedBrowser);
 
   // verify the correctness of the restored tab
   ok(ss.getCustomTabValue(tab, key2) == value2 && tab.linkedBrowser.currentURI.spec == URL,
      "the tab's state was correctly restored");
 
   // add text data
-  await setInputValue(tab.linkedBrowser, {id: "search", value: value3});
+  await setInputValue(tab.linkedBrowser, {id: "about-config-search", value: value3});
 
   // duplicate the tab
   let tab2 = ss.duplicateTab(window, tab);
   await promiseTabRestored(tab2);
 
   // verify the correctness of the duplicated tab
   ok(ss.getCustomTabValue(tab2, key2) == value2 &&
      tab2.linkedBrowser.currentURI.spec == URL,
      "correctly duplicated the tab's state");
-  let textbox = await getInputValue(tab2.linkedBrowser, {id: "search"});
+  let textbox = await getInputValue(tab2.linkedBrowser, {id: "about-config-search"});
   is(textbox, value3, "also duplicated text data");
 
   // clean up
   gBrowser.removeTab(tab2);
   gBrowser.removeTab(tab);
 });
--- a/build/win32/autobinscope.py
+++ b/build/win32/autobinscope.py
@@ -41,17 +41,18 @@ except KeyError:
     sys.exit(0)
 
 try:
     proc = subprocess.Popen([
         binscope_path,
         "/NoLogo",
         "/Target", binary_path,
         "/SymPath", symbol_path,
-        "/Checks", "ATLVersionCheck",
+        # ATLVersionCheck triggers a crash in msdia120: bug 1525113
+        "/SkippedChecks", "ATLVersionCheck",
         "/Checks", "ATLVulnCheck",
         # We do not ship in the Windows Store
         "/SkippedChecks", "AppContainerCheck",
         # The CompilerVersionCheck doesn't like clang-cl (we would need to set MinimumCompilerVersion)  # NOQA: E501
         # But we check the compiler in our build system anyway, so this doesn't seem useful
         "/SkippedChecks", "CompilerVersionCheck",
         "/Checks", "DBCheck",
         "/Checks", "DefaultGSCookieCheck",
@@ -63,17 +64,18 @@ try:
         "/Checks", "GSFriendlyInitCheck",
         # We are not safebuffers-clean, bug 1449951
         "/SkippedChecks", "GSFunctionSafeBuffersCheck",
         "/Checks", "HighEntropyVACheck",
         "/Checks", "NXCheck",
         "/Checks", "RSA32Check",
         "/Checks", "SafeSEHCheck",
         "/Checks", "SharedSectionCheck",
-        "/Checks", "VB6Check",
+        # VB6Check triggers a crash in msdia120: bug 1525113
+        "/SkippedChecks", "VB6Check",
         "/Checks", "WXCheck"
     ], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 
 except WindowsError, (errno, strerror):
     if errno != 2 and errno != 3:
         print("TEST-UNEXPECTED-FAIL | autobinscope.py | Unexpected error %d : %s" (
             errno, strerror))
         sys.exit(0)
--- a/docshell/base/nsAboutRedirector.cpp
+++ b/docshell/base/nsAboutRedirector.cpp
@@ -67,17 +67,17 @@ static const RedirEntry kRedirMap[] = {
     {"about", "chrome://global/content/aboutAbout.xhtml", 0},
     {"addons", "chrome://mozapps/content/extensions/extensions.xul",
      nsIAboutModule::ALLOW_SCRIPT},
     {"buildconfig", "chrome://global/content/buildconfig.html",
      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT},
     {"checkerboard", "chrome://global/content/aboutCheckerboard.xhtml",
      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
          nsIAboutModule::ALLOW_SCRIPT},
-#if !defined(NIGHTLY_BUILD) || !defined(MOZ_BUILD_APP_IS_BROWSER)
+#ifndef MOZ_BUILD_APP_IS_BROWSER
     {"config", "chrome://global/content/config.xul", 0},
 #endif
 #ifdef MOZ_CRASHREPORTER
     {"crashes", "chrome://global/content/crashes.xhtml", 0},
 #endif
     {"credits", "https://www.mozilla.org/credits/",
      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT},
     {"license", "chrome://global/content/license.html",
--- a/docshell/build/components.conf
+++ b/docshell/build/components.conf
@@ -24,17 +24,17 @@ about_pages = [
     'serviceworkers',
     'srcdoc',
     'support',
     'telemetry',
     'url-classifier',
     'webrtc',
 ]
 
-if not defined('NIGHTLY_BUILD') or buildconfig.substs['MOZ_BUILD_APP'] != 'browser':
+if buildconfig.substs['MOZ_BUILD_APP'] != 'browser':
     about_pages.append('config')
 if defined('MOZ_CRASHREPORTER'):
     about_pages.append('crashes')
 if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] != 'android':
     about_pages.append('profiles')
 
 Headers = ['/docshell/build/nsDocShellModule.h']
 
--- a/docshell/moz.build
+++ b/docshell/moz.build
@@ -2,16 +2,19 @@
 # vim: set filetype=python:
 # 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/.
 
 with Files('**'):
     BUG_COMPONENT = ('Core', 'Document Navigation')
 
+if CONFIG['MOZ_BUILD_APP'] == 'browser':
+    DEFINES['MOZ_BUILD_APP_IS_BROWSER'] = True
+
 DIRS += [
     'base',
     'shistory',
     'build',
     'resources/content',
 ]
 
 XPCSHELL_TESTS_MANIFESTS += [
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -1241,17 +1241,16 @@ Document::Document(const char* aContentT
       mHasUnsafeInlineCSP(false),
       mBFCacheDisallowed(false),
       mHasHadDefaultView(false),
       mStyleSheetChangeEventsEnabled(false),
       mIsSrcdocDocument(false),
       mDidDocumentOpen(false),
       mHasDisplayDocument(false),
       mFontFaceSetDirty(true),
-      mGetUserFontSetCalled(false),
       mDidFireDOMContentLoaded(true),
       mHasScrollLinkedEffect(false),
       mFrameRequestCallbacksScheduled(false),
       mIsTopLevelContentDocument(false),
       mIsContentDocument(false),
       mDidCallBeginLoad(false),
       mAllowPaymentRequest(false),
       mEncodingMenuDisabled(false),
@@ -11596,57 +11595,25 @@ nsAutoSyncOperation::~nsAutoSyncOperatio
     doc->SetIsInSyncOperation(false);
   }
   CycleCollectedJSContext* ccjs = CycleCollectedJSContext::Get();
   if (ccjs) {
     ccjs->SetMicroTaskLevel(mMicroTaskLevel);
   }
 }
 
-gfxUserFontSet* Document::GetUserFontSet(bool aFlushUserFontSet) {
-  // We want to initialize the user font set lazily the first time the
-  // user asks for it, rather than building it too early and forcing
-  // rule cascade creation.  Thus we try to enforce the invariant that
-  // we *never* build the user font set until the first call to
-  // GetUserFontSet.  However, once it's been requested, we can't wait
-  // for somebody to call GetUserFontSet in order to rebuild it (see
-  // comments below in MarkUserFontSetDirty for why).
-#ifdef DEBUG
-  bool userFontSetGottenBefore = mGetUserFontSetCalled;
-#endif
-  // Set mGetUserFontSetCalled up front, so that FlushUserFontSet will actually
-  // flush.
-  mGetUserFontSetCalled = true;
-  if (mFontFaceSetDirty && aFlushUserFontSet) {
-    // If this assertion fails, and there have actually been changes to
-    // @font-face rules, then we will call StyleChangeReflow in
-    // FlushUserFontSet.  If we're in the middle of reflow,
-    // that's a bad thing to do, and the caller was responsible for
-    // flushing first.  If we're not (e.g., in frame construction), it's
-    // ok.
-    NS_ASSERTION(!userFontSetGottenBefore || !GetShell() ||
-                     !GetShell()->IsReflowLocked(),
-                 "FlushUserFontSet should have been called first");
-    FlushUserFontSet();
-  }
-
+gfxUserFontSet* Document::GetUserFontSet() {
   if (!mFontFaceSet) {
     return nullptr;
   }
 
   return mFontFaceSet->GetUserFontSet();
 }
 
 void Document::FlushUserFontSet() {
-  if (!mGetUserFontSetCalled) {
-    return;  // No one cares about this font set yet, but we want to be careful
-             // to not unset our mFontFaceSetDirty bit, so when someone really
-             // does we'll create it.
-  }
-
   if (!mFontFaceSetDirty) {
     return;
   }
 
   mFontFaceSetDirty = false;
 
   if (gfxPlatform::GetPlatform()->DownloadableFontsEnabled()) {
     nsTArray<nsFontFaceRuleContainer> rules;
@@ -11673,32 +11640,30 @@ void Document::FlushUserFontSet() {
       if (nsPresContext* presContext = shell->GetPresContext()) {
         presContext->UserFontSetUpdated();
       }
     }
   }
 }
 
 void Document::MarkUserFontSetDirty() {
-  if (!mGetUserFontSetCalled) {
-    // We want to lazily build the user font set the first time it's
-    // requested (so we don't force creation of rule cascades too
-    // early), so don't do anything now.
-    return;
-  }
-
+  if (mFontFaceSetDirty) {
+    return;
+  }
   mFontFaceSetDirty = true;
+  if (nsIPresShell* shell = GetShell()) {
+    shell->EnsureStyleFlush();
+  }
 }
 
 FontFaceSet* Document::Fonts() {
   if (!mFontFaceSet) {
     nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(GetScopeObject());
     mFontFaceSet = new FontFaceSet(window, this);
-    GetUserFontSet();  // this will cause the user font set to be
-                       // created/updated
+    FlushUserFontSet();
   }
   return mFontFaceSet;
 }
 
 void Document::ReportHasScrollLinkedEffect() {
   if (mHasScrollLinkedEffect) {
     // We already did this once for this document, don't do it again.
     return;
--- a/dom/base/Document.h
+++ b/dom/base/Document.h
@@ -3334,17 +3334,17 @@ class Document : public nsINode,
 
     nsWeakPtr weakNode = do_GetWeakReference(node);
 
     if (weakNode) {
       mBlockedNodesByClassifier.AppendElement(weakNode);
     }
   }
 
-  gfxUserFontSet* GetUserFontSet(bool aFlushUserFontSet = true);
+  gfxUserFontSet* GetUserFontSet();
   void FlushUserFontSet();
   void MarkUserFontSetDirty();
   mozilla::dom::FontFaceSet* GetFonts() { return mFontFaceSet; }
 
   // FontFaceSource
   mozilla::dom::FontFaceSet* Fonts();
 
   bool DidFireDOMContentLoaded() const { return mDidFireDOMContentLoaded; }
@@ -4060,19 +4060,16 @@ class Document : public nsINode,
   // be a resource document.  Normally this is the same as !!mDisplayDocument,
   // but mDisplayDocument is cleared during Unlink.  mHasDisplayDocument is
   // valid in the document's destructor.
   bool mHasDisplayDocument : 1;
 
   // Is the current mFontFaceSet valid?
   bool mFontFaceSetDirty : 1;
 
-  // Has GetUserFontSet() been called?
-  bool mGetUserFontSetCalled : 1;
-
   // True if we have fired the DOMContentLoaded event, or don't plan to fire one
   // (e.g. we're not being parsed at all).
   bool mDidFireDOMContentLoaded : 1;
 
   // True if ReportHasScrollLinkedEffect() has been called.
   bool mHasScrollLinkedEffect : 1;
 
   // True if we have frame request callbacks scheduled with the refresh driver.
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -3481,16 +3481,18 @@ bool CanvasRenderingContext2D::SetFontIn
   // device pixels, to avoid being affected by page zoom. nsFontMetrics will
   // convert nsFont size in app units to device pixels for the font group, so
   // here we first apply to the size the equivalent of a conversion from device
   // pixels to CSS pixels, to adjust for the difference in expectations from
   // other nsFontMetrics clients.
   resizedFont.size =
       (fontStyle->mSize * c->AppUnitsPerDevPixel()) / AppUnitsPerCSSPixel();
 
+  c->Document()->FlushUserFontSet();
+
   nsFontMetrics::Params params;
   params.language = fontStyle->mLanguage;
   params.explicitLanguage = fontStyle->mExplicitLanguage;
   params.userFontSet = c->GetUserFontSet();
   params.textPerf = c->GetTextPerfMetrics();
   RefPtr<nsFontMetrics> metrics =
       c->DeviceContext()->GetMetricsFor(resizedFont, params);
 
@@ -4021,16 +4023,17 @@ nsresult CanvasRenderingContext2D::DrawO
 
   MOZ_ASSERT(!presShell->IsDestroying(),
              "GetCurrentFontStyle() should have returned null if the presshell "
              "is being destroyed");
 
   nsPresContext* presContext = presShell->GetPresContext();
 
   // ensure user font set is up to date
+  presContext->Document()->FlushUserFontSet();
   currentFontStyle->SetUserFontSet(presContext->GetUserFontSet());
 
   if (currentFontStyle->GetStyle()->size == 0.0F) {
     if (aWidth) {
       *aWidth = 0;
     }
     return NS_OK;
   }
--- a/dom/canvas/WebGLContext.h
+++ b/dom/canvas/WebGLContext.h
@@ -1519,16 +1519,17 @@ class WebGLContext : public nsICanvasRen
   uint32_t mGLMaxProgramTexelOffset = 0;
 
   uint32_t mGLMaxViewportDims[2];
 
  public:
   GLenum LastColorAttachmentEnum() const {
     return LOCAL_GL_COLOR_ATTACHMENT0 + mGLMaxColorAttachments - 1;
   }
+  const auto& GLMaxDrawBuffers() const { return mGLMaxDrawBuffers; }
 
   const decltype(mOptions)& Options() const { return mOptions; }
 
  protected:
   // Texture sizes are often not actually the GL values. Let's be explicit that
   // these are implementation limits.
   uint32_t mGLMaxTextureSize = 0;
   uint32_t mGLMaxCubeMapTextureSize = 0;
--- a/dom/canvas/WebGLContextDraw.cpp
+++ b/dom/canvas/WebGLContextDraw.cpp
@@ -306,16 +306,61 @@ const webgl::CachedDrawFetchLimits* Vali
       // Technically we don't know that this will be updated yet, but we can
       // speculatively mark it.
       buffer->ResetLastUpdateFenceId();
     }
   }
 
   // -
 
+  const auto& fragOutputs = linkInfo->fragOutputs;
+  const auto fnValidateFragOutputType =
+      [&](const uint8_t loc, const webgl::TextureBaseType dstBaseType) {
+        const auto itr = fragOutputs.find(loc);
+        if (MOZ_UNLIKELY(itr == fragOutputs.end())) {
+          webgl->ErrorInvalidOperation(
+              "Program has no frag output at location %u, but"
+              " destination draw buffer has an attached"
+              " image.",
+              uint32_t(loc));
+          return false;
+        }
+
+        const auto& info = itr->second;
+        const auto& srcBaseType = info.baseType;
+        if (MOZ_UNLIKELY(dstBaseType != srcBaseType)) {
+          const auto& srcStr = ToString(srcBaseType);
+          const auto& dstStr = ToString(dstBaseType);
+          webgl->ErrorInvalidOperation(
+              "Program frag output at location %u is type %s,"
+              " but destination draw buffer is type %s.",
+              uint32_t(loc), srcStr, dstStr);
+          return false;
+        }
+        return true;
+      };
+
+  if (!webgl->mRasterizerDiscardEnabled) {
+    if (fb) {
+      for (const auto& attach : fb->ColorDrawBuffers()) {
+        const auto i =
+            uint8_t(attach->mAttachmentPoint - LOCAL_GL_COLOR_ATTACHMENT0);
+        const auto& imageInfo = attach->GetImageInfo();
+        if (!imageInfo) continue;
+        const auto& dstBaseType = imageInfo->mFormat->format->baseType;
+        if (!fnValidateFragOutputType(i, dstBaseType)) return nullptr;
+      }
+    } else {
+      if (!fnValidateFragOutputType(0, webgl::TextureBaseType::Float))
+        return nullptr;
+    }
+  }
+
+  // -
+
   const auto fetchLimits = linkInfo->GetDrawFetchLimits();
   if (!fetchLimits) return nullptr;
 
   if (instanceCount > fetchLimits->maxInstances) {
     webgl->ErrorInvalidOperation(
         "Instance fetch requires %u, but attribs only"
         " supply %u.",
         instanceCount, uint32_t(fetchLimits->maxInstances));
--- a/dom/canvas/WebGLProgram.cpp
+++ b/dom/canvas/WebGLProgram.cpp
@@ -10,16 +10,17 @@
 #include "mozilla/dom/WebGL2RenderingContextBinding.h"
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 #include "mozilla/RefPtr.h"
 #include "nsPrintfCString.h"
 #include "WebGLActiveInfo.h"
 #include "WebGLBuffer.h"
 #include "WebGLContext.h"
 #include "WebGLShader.h"
+#include "WebGLShaderValidator.h"
 #include "WebGLTransformFeedback.h"
 #include "WebGLUniformLocation.h"
 #include "WebGLValidateStrings.h"
 #include "WebGLVertexArray.h"
 
 namespace mozilla {
 
 /* If `name`: "foo[3]"
@@ -156,16 +157,48 @@ webgl::UniformInfo::UniformInfo(WebGLAct
       mIsShadowSampler(IsShadowSampler(mActiveInfo->mElemType)) {
   if (mSamplerTexList) {
     mSamplerValues.assign(mActiveInfo->mElemCount, 0);
   }
 }
 
 //////////
 
+static webgl::TextureBaseType FragOutputBaseType(const GLenum type) {
+  switch (type) {
+    case LOCAL_GL_FLOAT:
+    case LOCAL_GL_FLOAT_VEC2:
+    case LOCAL_GL_FLOAT_VEC3:
+    case LOCAL_GL_FLOAT_VEC4:
+      return webgl::TextureBaseType::Float;
+
+    case LOCAL_GL_INT:
+    case LOCAL_GL_INT_VEC2:
+    case LOCAL_GL_INT_VEC3:
+    case LOCAL_GL_INT_VEC4:
+      return webgl::TextureBaseType::Int;
+
+    case LOCAL_GL_UNSIGNED_INT:
+    case LOCAL_GL_UNSIGNED_INT_VEC2:
+    case LOCAL_GL_UNSIGNED_INT_VEC3:
+    case LOCAL_GL_UNSIGNED_INT_VEC4:
+      return webgl::TextureBaseType::UInt;
+
+    default:
+      break;
+  }
+
+  const auto& str = EnumString(type);
+  gfxCriticalError() << "Unhandled enum for FragOutputBaseType: "
+                     << str.c_str();
+  return webgl::TextureBaseType::Float;
+}
+
+// -
+
 //#define DUMP_SHADERVAR_MAPPINGS
 
 static RefPtr<const webgl::LinkedProgramInfo> QueryProgramInfo(
     WebGLProgram* prog, gl::GLContext* gl) {
   WebGLContext* const webgl = prog->mContext;
 
   RefPtr<webgl::LinkedProgramInfo> info(new webgl::LinkedProgramInfo(prog));
 
@@ -433,17 +466,76 @@ static RefPtr<const webgl::LinkedProgram
       const RefPtr<WebGLActiveInfo> activeInfo = new WebGLActiveInfo(
           webgl, elemCount, elemType, isArray, baseUserName, mappedName);
       info->transformFeedbackVaryings.push_back(activeInfo);
     }
   }
 
   // Frag outputs
 
-  prog->EnumerateFragOutputs(info->fragDataMap);
+  {
+    const auto& fragShader = prog->FragShader();
+    const auto& handle = fragShader->Validator()->Handle();
+    const auto version = sh::GetShaderVersion(handle);
+
+    const auto fnAddInfo = [&](const webgl::FragOutputInfo& x) {
+      info->fragOutputs.insert({x.loc, x});
+    };
+
+    if (version == 300) {
+      const auto& fragOutputs = sh::GetOutputVariables(handle);
+      if (fragOutputs) {
+        for (const auto& cur : *fragOutputs) {
+          auto loc = cur.location;
+          if (loc == -1) loc = 0;
+
+          const auto info = webgl::FragOutputInfo{
+              uint8_t(loc), nsCString(cur.name.c_str()),
+              nsCString(cur.mappedName.c_str()), FragOutputBaseType(cur.type)};
+          if (!cur.isArray()) {
+            fnAddInfo(info);
+            continue;
+          }
+          MOZ_ASSERT(cur.arraySizes.size() == 1);
+          for (uint32_t i = 0; i < cur.arraySizes[0]; ++i) {
+            const auto indexStr = nsPrintfCString("[%u]", i);
+
+            auto userName = info.userName;
+            userName.Append(indexStr);
+            auto mappedName = info.mappedName;
+            mappedName.Append(indexStr);
+
+            const auto indexedInfo = webgl::FragOutputInfo{
+                uint8_t(info.loc + i), userName, mappedName, info.baseType};
+            fnAddInfo(indexedInfo);
+          }
+        }
+      }
+    } else {
+      // ANGLE's translator doesn't tell us about non-user frag outputs. :(
+
+      const auto& translatedSource = fragShader->TranslatedSource();
+      uint32_t drawBuffers = 1;
+      if (translatedSource.Find("(gl_FragData[1]") != -1 ||
+          translatedSource.Find("(webgl_FragData[1]") != -1) {
+        // The matching with the leading '(' prevents cleverly-named user vars
+        // breaking this. Since ANGLE initializes all outputs, if this is an MRT
+        // shader, FragData[1] will be present. FragData[0] is valid for non-MRT
+        // shaders.
+        drawBuffers = webgl->GLMaxDrawBuffers();
+      }
+
+      for (uint32_t i = 0; i < drawBuffers; ++i) {
+        const auto& name = nsPrintfCString("gl_FragData[%u]", i);
+        const auto info = webgl::FragOutputInfo{uint8_t(i), name, name,
+                                                webgl::TextureBaseType::Float};
+        fnAddInfo(info);
+      }
+    }
+  }
 
   return info;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 
 webgl::LinkedProgramInfo::LinkedProgramInfo(WebGLProgram* prog)
     : prog(prog),
@@ -744,53 +836,35 @@ GLint WebGLProgram::GetAttribLocation(co
   const NS_LossyConvertUTF16toASCII userName(userName_wide);
 
   const webgl::AttribInfo* info;
   if (!LinkInfo()->FindAttrib(userName, &info)) return -1;
 
   return GLint(info->mLoc);
 }
 
-static GLint GetFragDataByUserName(const WebGLProgram* prog,
-                                   const nsCString& userName) {
-  nsCString mappedName;
-  if (!prog->LinkInfo()->MapFragDataName(userName, &mappedName)) return -1;
-
-  return prog->mContext->gl->fGetFragDataLocation(prog->mGLName,
-                                                  mappedName.BeginReading());
-}
-
 GLint WebGLProgram::GetFragDataLocation(const nsAString& userName_wide) const {
   if (!ValidateGLSLVariableName(userName_wide, mContext)) return -1;
 
   if (!IsLinked()) {
     mContext->ErrorInvalidOperation("`program` must be linked.");
     return -1;
   }
 
   const NS_LossyConvertUTF16toASCII userName(userName_wide);
-#ifdef XP_MACOSX
-  const auto& gl = mContext->gl;
-  if (gl->WorkAroundDriverBugs()) {
-    // OSX doesn't return locs for indexed names, just the base names.
-    // Indicated by failure in:
-    // conformance2/programs/gl-get-frag-data-location.html
-    bool isArray;
-    size_t arrayIndex;
-    nsCString baseUserName;
-    if (!ParseName(userName, &baseUserName, &isArray, &arrayIndex)) return -1;
-
-    if (arrayIndex >= mContext->mGLMaxDrawBuffers) return -1;
-
-    const auto baseLoc = GetFragDataByUserName(this, baseUserName);
-    const auto loc = baseLoc + GLint(arrayIndex);
-    return loc;
+  auto userNameId0 = nsCString(userName);
+  userNameId0.AppendLiteral("[0]");
+  const auto& fragOutputs = LinkInfo()->fragOutputs;
+  for (const auto& pair : fragOutputs) {
+    const auto& info = pair.second;
+    if (info.userName == userName || info.userName == userNameId0) {
+      return info.loc;
+    }
   }
-#endif
-  return GetFragDataByUserName(this, userName);
+  return -1;
 }
 
 void WebGLProgram::GetProgramInfoLog(nsAString* const out) const {
   CopyASCIItoUTF16(mLinkLog, *out);
 }
 
 static GLint GetProgramiv(gl::GLContext* gl, GLuint program, GLenum pname) {
   GLint ret = 0;
@@ -1539,23 +1613,16 @@ bool WebGLProgram::UnmapUniformBlockName
       !mFragShader->UnmapUniformBlockName(baseMappedName, &baseUserName)) {
     return false;
   }
 
   AssembleName(baseUserName, isArray, arrayIndex, out_userName);
   return true;
 }
 
-void WebGLProgram::EnumerateFragOutputs(
-    std::map<nsCString, const nsCString>& out_FragOutputs) const {
-  MOZ_ASSERT(mFragShader);
-
-  mFragShader->EnumerateFragOutputs(out_FragOutputs);
-}
-
 ////////////////////////////////////////////////////////////////////////////////
 
 bool IsBaseName(const nsCString& name) {
   if (!name.Length()) return true;
 
   return name[name.Length() - 1] != ']';  // Doesn't end in ']'.
 }
 
@@ -1593,39 +1660,16 @@ bool webgl::LinkedProgramInfo::FindUnifo
   const auto& baseMappedName = info->mActiveInfo->mBaseMappedName;
   AssembleName(baseMappedName, isArray, arrayIndex, out_mappedName);
 
   *out_arrayIndex = arrayIndex;
   *out_info = info;
   return true;
 }
 
-bool webgl::LinkedProgramInfo::MapFragDataName(
-    const nsCString& userName, nsCString* const out_mappedName) const {
-  // FS outputs can be arrays, but not structures.
-
-  if (fragDataMap.empty()) {
-    // No mappings map from validation, so just forward it.
-    *out_mappedName = userName;
-    return true;
-  }
-
-  nsCString baseUserName;
-  bool isArray;
-  size_t arrayIndex;
-  if (!ParseName(userName, &baseUserName, &isArray, &arrayIndex)) return false;
-
-  const auto itr = fragDataMap.find(baseUserName);
-  if (itr == fragDataMap.end()) return false;
-
-  const auto& baseMappedName = itr->second;
-  AssembleName(baseMappedName, isArray, arrayIndex, out_mappedName);
-  return true;
-}
-
 ////////////////////////////////////////////////////////////////////////////////
 
 JSObject* WebGLProgram::WrapObject(JSContext* js,
                                    JS::Handle<JSObject*> givenProto) {
   return dom::WebGLProgram_Binding::Wrap(js, this, givenProto);
 }
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(WebGLProgram, mVertShader, mFragShader)
--- a/dom/canvas/WebGLProgram.h
+++ b/dom/canvas/WebGLProgram.h
@@ -72,16 +72,23 @@ struct UniformBlockInfo final {
   UniformBlockInfo(WebGLContext* webgl, const nsACString& userName,
                    const nsACString& mappedName, uint32_t dataSize)
       : mUserName(userName),
         mMappedName(mappedName),
         mDataSize(dataSize),
         mBinding(&webgl->mIndexedUniformBufferBindings[0]) {}
 };
 
+struct FragOutputInfo final {
+  const uint8_t loc;
+  const nsCString userName;
+  const nsCString mappedName;
+  const TextureBaseType baseType;
+};
+
 struct CachedDrawFetchLimits final {
   uint64_t maxVerts;
   uint64_t maxInstances;
 };
 
 struct LinkedProgramInfo final : public RefCounted<LinkedProgramInfo>,
                                  public SupportsWeakPtr<LinkedProgramInfo>,
                                  public CacheInvalidator {
@@ -94,48 +101,42 @@ struct LinkedProgramInfo final : public 
 
   WebGLProgram* const prog;
   const GLenum transformFeedbackBufferMode;
 
   std::vector<AttribInfo> attribs;
   std::vector<UniformInfo*> uniforms;            // Owns its contents.
   std::vector<UniformBlockInfo*> uniformBlocks;  // Owns its contents.
   std::vector<RefPtr<WebGLActiveInfo>> transformFeedbackVaryings;
+  std::unordered_map<uint8_t, const FragOutputInfo> fragOutputs;
 
   // Needed for draw call validation.
   std::vector<UniformInfo*> uniformSamplers;
 
   mutable std::vector<size_t> componentsPerTFVert;
 
   bool attrib0Active;
 
   //////
 
-  // The maps for the frag data names to the translated names.
-  std::map<nsCString, const nsCString> fragDataMap;
-
-  //////
-
   mutable CacheWeakMap<const WebGLVertexArray*, CachedDrawFetchLimits>
       mDrawFetchCache;
 
   const CachedDrawFetchLimits* GetDrawFetchLimits() const;
 
   //////
 
   explicit LinkedProgramInfo(WebGLProgram* prog);
   ~LinkedProgramInfo();
 
   bool FindAttrib(const nsCString& userName,
                   const AttribInfo** const out_info) const;
   bool FindUniform(const nsCString& userName, nsCString* const out_mappedName,
                    size_t* const out_arrayIndex,
                    UniformInfo** const out_info) const;
-  bool MapFragDataName(const nsCString& userName,
-                       nsCString* const out_mappedName) const;
 };
 
 }  // namespace webgl
 
 class WebGLProgram final : public nsWrapperCache,
                            public WebGLRefCountedObject<WebGLProgram>,
                            public LinkedListElement<WebGLProgram> {
   friend class WebGLTransformFeedback;
@@ -201,16 +202,18 @@ class WebGLProgram final : public nsWrap
       std::map<nsCString, const nsCString>& out_FragOutputs) const;
 
   bool IsLinked() const { return mMostRecentLinkInfo; }
 
   const webgl::LinkedProgramInfo* LinkInfo() const {
     return mMostRecentLinkInfo.get();
   }
 
+  const auto& FragShader() const { return mFragShader; }
+
   WebGLContext* GetParentObject() const { return mContext; }
 
   virtual JSObject* WrapObject(JSContext* js,
                                JS::Handle<JSObject*> givenProto) override;
 
  private:
   ~WebGLProgram();
 
--- a/dom/canvas/WebGLShader.cpp
+++ b/dom/canvas/WebGLShader.cpp
@@ -341,26 +341,16 @@ bool WebGLShader::UnmapUniformBlockName(
   if (!mValidator) {
     *out_baseUserName = baseMappedName;
     return true;
   }
 
   return mValidator->UnmapUniformBlockName(baseMappedName, out_baseUserName);
 }
 
-void WebGLShader::EnumerateFragOutputs(
-    std::map<nsCString, const nsCString>& out_FragOutputs) const {
-  out_FragOutputs.clear();
-
-  if (!mValidator) {
-    return;
-  }
-  mValidator->EnumerateFragOutputs(out_FragOutputs);
-}
-
 void WebGLShader::MapTransformFeedbackVaryings(
     const std::vector<nsString>& varyings,
     std::vector<std::string>* out_mappedVaryings) const {
   MOZ_ASSERT(mType == LOCAL_GL_VERTEX_SHADER);
   MOZ_ASSERT(out_mappedVaryings);
 
   out_mappedVaryings->clear();
   out_mappedVaryings->reserve(varyings.size());
--- a/dom/canvas/WebGLShader.h
+++ b/dom/canvas/WebGLShader.h
@@ -55,22 +55,21 @@ class WebGLShader final : public nsWrapp
                                nsCString* const out_userName,
                                bool* const out_isArray) const;
   bool FindUniformByMappedName(const nsACString& mappedName,
                                nsCString* const out_userName,
                                bool* const out_isArray) const;
   bool UnmapUniformBlockName(const nsACString& baseMappedName,
                              nsCString* const out_baseUserName) const;
 
-  void EnumerateFragOutputs(
-      std::map<nsCString, const nsCString>& out_FragOutputs) const;
-
   bool IsCompiled() const {
     return mTranslationSuccessful && mCompilationSuccessful;
   }
+  const auto* Validator() const { return mValidator.get(); }
+  const auto& TranslatedSource() const { return mTranslatedSource; }
 
  private:
   void BindAttribLocation(GLuint prog, const nsCString& userName,
                           GLuint index) const;
   void MapTransformFeedbackVaryings(
       const std::vector<nsString>& varyings,
       std::vector<std::string>* out_mappedVaryings) const;
 
--- a/dom/canvas/WebGLShaderValidator.cpp
+++ b/dom/canvas/WebGLShaderValidator.cpp
@@ -575,22 +575,10 @@ bool ShaderValidator::UnmapUniformBlockN
       *out_baseUserName = interface.name.data();
       return true;
     }
   }
 
   return false;
 }
 
-void ShaderValidator::EnumerateFragOutputs(
-    std::map<nsCString, const nsCString>& out_FragOutputs) const {
-  const auto* fragOutputs = sh::GetOutputVariables(mHandle);
-
-  if (fragOutputs) {
-    for (const auto& fragOutput : *fragOutputs) {
-      out_FragOutputs.insert({nsCString(fragOutput.name.c_str()),
-                              nsCString(fragOutput.mappedName.c_str())});
-    }
-  }
-}
-
 }  // namespace webgl
 }  // namespace mozilla
--- a/dom/canvas/WebGLShaderValidator.h
+++ b/dom/canvas/WebGLShaderValidator.h
@@ -1,20 +1,21 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef WEBGL_SHADER_VALIDATOR_H_
 #define WEBGL_SHADER_VALIDATOR_H_
 
-#include "GLSLANG/ShaderLang.h"
+#include <string>
+
 #include "GLDefs.h"
+#include "GLSLANG/ShaderLang.h"
 #include "nsString.h"
-#include <string>
 
 namespace mozilla {
 namespace webgl {
 
 class ShaderValidator final {
   const ShHandle mHandle;
   const ShCompileOptions mCompileOptions;
   const int mMaxVaryingVectors;
@@ -38,16 +39,17 @@ class ShaderValidator final {
   ~ShaderValidator();
 
   bool ValidateAndTranslate(const char* source);
   void GetInfoLog(nsACString* out) const;
   void GetOutput(nsACString* out) const;
   bool CanLinkTo(const ShaderValidator* prev, nsCString* const out_log) const;
   size_t CalcNumSamplerUniforms() const;
   size_t NumAttributes() const;
+  const auto& Handle() const { return mHandle; }
 
   bool FindAttribUserNameByMappedName(
       const std::string& mappedName,
       const std::string** const out_userName) const;
 
   bool FindAttribMappedNameByUserName(
       const std::string& userName,
       const std::string** const out_mappedName) const;
@@ -60,19 +62,16 @@ class ShaderValidator final {
                                std::string* const out_userName,
                                bool* const out_isArray) const;
   bool FindUniformByMappedName(const std::string& mappedName,
                                std::string* const out_userName,
                                bool* const out_isArray) const;
   bool UnmapUniformBlockName(const nsACString& baseMappedName,
                              nsCString* const out_baseUserName) const;
 
-  void EnumerateFragOutputs(
-      std::map<nsCString, const nsCString>& out_FragOutputs) const;
-
   bool ValidateTransformFeedback(
       const std::vector<nsString>& userNames, uint32_t maxComponents,
       nsCString* const out_errorText,
       std::vector<std::string>* const out_mappedNames);
 };
 
 }  // namespace webgl
 }  // namespace mozilla
--- a/dom/canvas/test/test_invalid_mime_type_blob.html
+++ b/dom/canvas/test/test_invalid_mime_type_blob.html
@@ -36,23 +36,22 @@ function asyncBlob() {
   const IMAGE = atob("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAA" +
                      "ACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=");
 
   let bytes = new Array(IMAGE.length);
   for (let i = 0; i < IMAGE.length; i++) {
     bytes[i] = IMAGE.charCodeAt(i);
   }
 
-  let array = [];
-  for (let i = 0; i < 20000; ++i) {
-    array.push(new Uint8Array(bytes));
+  let blob = new Blob([new Uint8Array(bytes)], { type: "text/html"});
+  while (blob.size <= 1024*1024) {
+    blob = new Blob([blob, blob], { type: "text/html"});
   }
 
-  let blob = new Blob(array, { type: "text/html"});
-  ok(blob.size > 1000000, "More than 1mb");
+  ok(blob.size > 1024 * 1024, "More than 1mb");
 
   let bc = new BroadcastChannel('a');
   bc.onmessage = e => {
     window.createImageBitmap(e.data)
     .then(imageBitmap => {
       ok(true, "Image created!");
       is(imageBitmap.width, 1, "Image is 1x1");
       is(imageBitmap.height, 1, "Image is 1x1");
@@ -73,13 +72,14 @@ function next() {
     SimpleTest.finish();
     return;
   }
 
   let test = tests.shift();
   test();
 }
 
+SimpleTest.requestLongerTimeout(3); // slow on Android
 SimpleTest.waitForExplicitFinish();
 next();
 </script>
 </body>
 </html>
--- a/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-draw-buffers.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/extensions/webgl-draw-buffers.html
@@ -541,17 +541,17 @@ function runDrawTests() {
   ext.drawBuffersWEBGL(nones);
   gl.useProgram(redProgram);
   wtu.clearAndDrawUnitQuad(gl);
 
   drawBuffersUtils.checkAttachmentsForColor(attachments, [0, 255, 0, 255]);
 
   debug("test that gl_FragColor does not broadcast unless extension is enabled in fragment shader");
   gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
-  ext.drawBuffersWEBGL(bufs);
+  ext.drawBuffersWEBGL([gl.COLOR_ATTACHMENT0]); // While the WG debates whether how to handle this.
   gl.useProgram(redProgram);
   wtu.drawUnitQuad(gl);
 
   drawBuffersUtils.checkAttachmentsForColorFn(attachments, function(attachment, index) {
     return (index == 0) ? [255, 0, 0, 255] : [0, 255, 0, 255];
   });
 
   debug("test that gl_FragColor broadcasts if extension is enabled in fragment shader");
--- a/dom/canvas/test/webgl-conf/checkout/conformance2/rendering/draw-buffers.html
+++ b/dom/canvas/test/webgl-conf/checkout/conformance2/rendering/draw-buffers.html
@@ -353,29 +353,29 @@ function runDrawTests() {
   gl.useProgram(redProgram);
   wtu.clearAndDrawUnitQuad(gl);
 
   drawBuffersUtils.checkAttachmentsForColor(attachments, [0, 255, 0, 255]);
 
   // GLES3 spec section 3.9.2 Shader Outputs
   debug("test that gl_FragColor only writes to color number zero");
   gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
-  gl.drawBuffers(bufs);
+  gl.drawBuffers([gl.COLOR_ATTACHMENT0]);
   gl.useProgram(blueProgramESSL1);
   wtu.drawUnitQuad(gl);
 
   drawBuffersUtils.checkAttachmentsForColorFn(attachments, function(attachment, index) {
     return (index == 0) ? [0, 0, 255, 255] : [0, 255, 0, 255];
   });
 
   // If there is only a single output, the location defaults to zero if not specified.
   // See GLSL ES Spec 3.00.4, Section 4.3.8.2, Output Layout Qualifiers.
   debug("test that an OpenGL ES Shading Language 3.00 shader with a single output color defaults to color number zero");
   gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
-  gl.drawBuffers(bufs);
+  gl.drawBuffers([gl.COLOR_ATTACHMENT0]);
   gl.useProgram(redProgram);
   wtu.drawUnitQuad(gl);
 
   drawBuffersUtils.checkAttachmentsForColorFn(attachments, function(attachment, index) {
     return (index == 0) ? [255, 0, 0, 255] : [0, 255, 0, 255];
   });
 
   if (maxUsable > 1) {
--- a/dom/canvas/test/webgl-conf/generated-mochitest.ini
+++ b/dom/canvas/test/webgl-conf/generated-mochitest.ini
@@ -5344,17 +5344,16 @@ subsuite = webgl2-core
 [generated/test_2_conformance2__rendering__multisampling-fragment-evaluation.html]
 subsuite = webgl2-core
 [generated/test_2_conformance2__rendering__out-of-bounds-index-buffers-after-copying.html]
 subsuite = webgl2-core
 [generated/test_2_conformance2__rendering__read-draw-when-missing-image.html]
 subsuite = webgl2-core
 [generated/test_2_conformance2__rendering__rendering-sampling-feedback-loop.html]
 subsuite = webgl2-core
-fail-if = 1
 [generated/test_2_conformance2__rendering__rgb-format-support.html]
 subsuite = webgl2-core
 [generated/test_2_conformance2__rendering__texture-switch-performance.html]
 subsuite = webgl2-core
 skip-if = 1
 [generated/test_2_conformance2__rendering__uniform-block-buffer-size.html]
 subsuite = webgl2-core
 [generated/test_2_conformance2__samplers__multi-context-sampler-test.html]
--- a/dom/canvas/test/webgl-conf/mochitest-errata.ini
+++ b/dom/canvas/test/webgl-conf/mochitest-errata.ini
@@ -155,19 +155,16 @@ fail-if = 1
 fail-if = 1
 [generated/test_2_conformance2__transform_feedback__same-buffer-two-binding-points.html]
 fail-if = 1
 [generated/test_2_conformance2__transform_feedback__simultaneous_binding.html]
 fail-if = 1
 [generated/test_conformance__extensions__webgl-draw-buffers-feedback-loop.html]
 # Bad test.
 fail-if = 1
-[generated/test_2_conformance2__rendering__rendering-sampling-feedback-loop.html]
-# Bad test.
-fail-if = 1
 
 ########################################################################
 # Complicated
 
 [generated/test_conformance__context__context-attributes-alpha-depth-stencil-antialias.html]
 # Asserts on linux debug. Crashes on Android.
 skip-if = (os == 'linux') || (os == 'android')
 
--- a/ipc/glue/BackgroundChildImpl.cpp
+++ b/ipc/glue/BackgroundChildImpl.cpp
@@ -751,33 +751,16 @@ BackgroundChildImpl::AllocPServiceWorker
   return dom::AllocServiceWorkerRegistrationChild();
 }
 
 bool BackgroundChildImpl::DeallocPServiceWorkerRegistrationChild(
     PServiceWorkerRegistrationChild* aActor) {
   return dom::DeallocServiceWorkerRegistrationChild(aActor);
 }
 
-bool BackgroundChildImpl::GetMessageSchedulerGroups(
-    const Message& aMsg, SchedulerGroupSet& aGroups) {
-  if (aMsg.type() == layout::PVsync::MessageType::Msg_Notify__ID) {
-    MOZ_ASSERT(NS_IsMainThread());
-    aGroups.Clear();
-    if (dom::TabChild::HasVisibleTabs()) {
-      for (auto iter = dom::TabChild::GetVisibleTabs().ConstIter();
-           !iter.Done(); iter.Next()) {
-        aGroups.Put(iter.Get()->GetKey()->TabGroup());
-      }
-    }
-    return true;
-  }
-
-  return false;
-}
-
 dom::PEndpointForReportChild* BackgroundChildImpl::AllocPEndpointForReportChild(
     const nsString& aGroupName, const PrincipalInfo& aPrincipalInfo) {
   return new dom::EndpointForReportChild();
 }
 
 bool BackgroundChildImpl::DeallocPEndpointForReportChild(
     PEndpointForReportChild* aActor) {
   MOZ_ASSERT(aActor);
--- a/ipc/glue/BackgroundChildImpl.h
+++ b/ipc/glue/BackgroundChildImpl.h
@@ -256,19 +256,16 @@ class BackgroundChildImpl : public PBack
       PWebAuthnTransactionChild* aActor) override;
 
   virtual PHttpBackgroundChannelChild* AllocPHttpBackgroundChannelChild(
       const uint64_t& aChannelId) override;
 
   virtual bool DeallocPHttpBackgroundChannelChild(
       PHttpBackgroundChannelChild* aActor) override;
 
-  bool GetMessageSchedulerGroups(const Message& aMsg,
-                                 SchedulerGroupSet& aGroups) override;
-
   virtual PMIDIPortChild* AllocPMIDIPortChild(
       const MIDIPortInfo& aPortInfo, const bool& aSysexEnabled) override;
   virtual bool DeallocPMIDIPortChild(PMIDIPortChild*) override;
 
   virtual PMIDIManagerChild* AllocPMIDIManagerChild() override;
   virtual bool DeallocPMIDIManagerChild(PMIDIManagerChild*) override;
 
   virtual PServiceWorkerChild* AllocPServiceWorkerChild(
--- a/ipc/glue/MessageChannel.cpp
+++ b/ipc/glue/MessageChannel.cpp
@@ -2037,26 +2037,16 @@ MessageChannel::MessageTask::GetPriority
       break;
     default:
       MOZ_ASSERT(false);
       break;
   }
   return NS_OK;
 }
 
-bool MessageChannel::MessageTask::GetAffectedSchedulerGroups(
-    SchedulerGroupSet& aGroups) {
-  if (!mChannel) {
-    return false;
-  }
-
-  mChannel->AssertWorkerThread();
-  return mChannel->mListener->GetMessageSchedulerGroups(mMessage, aGroups);
-}
-
 void MessageChannel::DispatchMessage(Message&& aMsg) {
   AssertWorkerThread();
   mMonitor->AssertCurrentThreadOwns();
 
   Maybe<AutoNoJSAPI> nojsapi;
   if (ScriptSettingsInitialized() && NS_IsMainThread()) nojsapi.emplace();
 
   nsAutoPtr<Message> reply;
--- a/ipc/glue/MessageChannel.h
+++ b/ipc/glue/MessageChannel.h
@@ -17,17 +17,16 @@
 #include "mozilla/Monitor.h"
 #include "mozilla/MozPromise.h"
 #include "mozilla/Vector.h"
 #if defined(OS_WIN)
 #  include "mozilla/ipc/Neutering.h"
 #endif  // defined(OS_WIN)
 #include "mozilla/ipc/Transport.h"
 #include "MessageLink.h"
-#include "nsILabelableRunnable.h"
 #include "nsThreadUtils.h"
 
 #include <deque>
 #include <functional>
 #include <map>
 #include <math.h>
 #include <stack>
 #include <vector>
@@ -555,36 +554,33 @@ class MessageChannel : HasResultCodes, M
     MOZ_ASSERT(mWorkerThread, "Channel hasn't been opened yet");
     MOZ_RELEASE_ASSERT(mWorkerThread != GetCurrentVirtualThread(),
                        "on worker thread but should not be!");
   }
 
  private:
   class MessageTask : public CancelableRunnable,
                       public LinkedListElement<RefPtr<MessageTask>>,
-                      public nsIRunnablePriority,
-                      public nsILabelableRunnable {
+                      public nsIRunnablePriority {
    public:
     explicit MessageTask(MessageChannel* aChannel, Message&& aMessage);
 
     NS_DECL_ISUPPORTS_INHERITED
 
     NS_IMETHOD Run() override;
     nsresult Cancel() override;
     NS_IMETHOD GetPriority(uint32_t* aPriority) override;
     void Post();
     void Clear();
 
     bool IsScheduled() const { return mScheduled; }
 
     Message& Msg() { return mMessage; }
     const Message& Msg() const { return mMessage; }
 
-    bool GetAffectedSchedulerGroups(SchedulerGroupSet& aGroups) override;
-
    private:
     MessageTask() = delete;
     MessageTask(const MessageTask&) = delete;
     ~MessageTask() {}
 
     MessageChannel* mChannel;
     Message mMessage;
     bool mScheduled : 1;
--- a/ipc/glue/ProtocolUtils.h
+++ b/ipc/glue/ProtocolUtils.h
@@ -29,17 +29,16 @@
 #include "mozilla/Maybe.h"
 #include "mozilla/MozPromise.h"
 #include "mozilla/Mutex.h"
 #include "mozilla/NotNull.h"
 #include "mozilla/Scoped.h"
 #include "mozilla/UniquePtr.h"
 #include "MainThreadUtils.h"
 #include "nsICrashReporter.h"
-#include "nsILabelableRunnable.h"
 
 #if defined(ANDROID) && defined(DEBUG)
 #  include <android/log.h>
 #endif
 
 template <typename T>
 class nsTHashtable;
 template <typename T>
@@ -446,18 +445,16 @@ class IToplevelProtocol : public IProtoc
     IDMap<Shmem::SharedMemory*> mShmemMap;
 
     Mutex mEventTargetMutex;
     IDMap<nsCOMPtr<nsIEventTarget>> mEventTargetMap;
 
     MessageChannel mChannel;
   };
 
-  using SchedulerGroupSet = nsILabelableRunnable::SchedulerGroupSet;
-
   void SetTransport(UniquePtr<Transport> aTrans) { mTrans = std::move(aTrans); }
 
   Transport* GetTransport() const { return mTrans.get(); }
 
   ProtocolId GetProtocolId() const { return mProtocolId; }
 
   base::ProcessId OtherPid() const final;
   void SetOtherProcessId(base::ProcessId aOtherPid);
@@ -551,25 +548,16 @@ class IToplevelProtocol : public IProtoc
    */
   virtual bool HandleWindowsMessages(const Message& aMsg) const { return true; }
 
   virtual void OnEnteredSyncSend() {}
   virtual void OnExitedSyncSend() {}
 
   virtual void ProcessRemoteNativeEventsInInterruptCall() {}
 
-  // Override this method in top-level protocols to change the SchedulerGroups
-  // that a message might affect. This should be used only as a last resort
-  // when it's difficult to determine an EventTarget ahead of time. See the
-  // comment in nsILabelableRunnable.h for more information.
-  virtual bool GetMessageSchedulerGroups(const Message& aMsg,
-                                         SchedulerGroupSet& aGroups) {
-    return false;
-  }
-
   virtual void OnChannelReceivedMessage(const Message& aMsg) {}
 
   bool IsMainThreadProtocol() const { return mIsMainThreadProtocol; }
   void SetIsMainThreadProtocol() { mIsMainThreadProtocol = NS_IsMainThread(); }
 
   already_AddRefed<nsIEventTarget> GetMessageEventTarget(const Message& aMsg) {
     return DowncastState()->GetMessageEventTarget(aMsg);
   }
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -1152,19 +1152,17 @@ void PresShell::Destroy() {
   gfxTextPerfMetrics* tp;
   if (mPresContext && (tp = mPresContext->GetTextPerfMetrics())) {
     tp->Accumulate();
     if (tp->cumulative.numChars > 0) {
       LogTextPerfStats(tp, this, tp->cumulative, 0.0, eLog_totals, nullptr);
     }
   }
   if (mPresContext) {
-    const bool mayFlushUserFontSet = false;
-    gfxUserFontSet* fs = mPresContext->GetUserFontSet(mayFlushUserFontSet);
-    if (fs) {
+    if (gfxUserFontSet* fs = mPresContext->GetUserFontSet()) {
       uint32_t fontCount;
       uint64_t fontSize;
       fs->GetLoadStatistics(fontCount, fontSize);
       Telemetry::Accumulate(Telemetry::WEBFONT_PER_PAGE, fontCount);
       Telemetry::Accumulate(Telemetry::WEBFONT_SIZE_PER_PAGE,
                             uint32_t(fontSize / 1024));
     } else {
       Telemetry::Accumulate(Telemetry::WEBFONT_PER_PAGE, 0);
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -9578,30 +9578,27 @@ static nsRect ComputeHTMLReferenceRect(n
   return StaticPrefs::layout_css_control_characters_visible()
              ? NS_STYLE_CONTROL_CHARACTER_VISIBILITY_VISIBLE
              : NS_STYLE_CONTROL_CHARACTER_VISIBILITY_HIDDEN;
 }
 
 /* static */
 already_AddRefed<nsFontMetrics> nsLayoutUtils::GetMetricsFor(
     nsPresContext* aPresContext, bool aIsVertical,
-    const nsStyleFont* aStyleFont, nscoord aFontSize, bool aUseUserFontSet,
-    FlushUserFontSet aFlushUserFontSet) {
+    const nsStyleFont* aStyleFont, nscoord aFontSize, bool aUseUserFontSet) {
   nsFont font = aStyleFont->mFont;
   font.size = aFontSize;
   gfxFont::Orientation orientation =
       aIsVertical ? gfxFont::eVertical : gfxFont::eHorizontal;
   nsFontMetrics::Params params;
   params.language = aStyleFont->mLanguage;
   params.explicitLanguage = aStyleFont->mExplicitLanguage;
   params.orientation = orientation;
-  params.userFontSet = aUseUserFontSet
-                           ? aPresContext->GetUserFontSet(aFlushUserFontSet ==
-                                                          FlushUserFontSet::Yes)
-                           : nullptr;
+  params.userFontSet =
+      aUseUserFontSet ? aPresContext->GetUserFontSet() : nullptr;
   params.textPerf = aPresContext->GetTextPerfMetrics();
   return aPresContext->DeviceContext()->GetMetricsFor(font, params);
 }
 
 /* static */ void nsLayoutUtils::FixupNoneGeneric(
     nsFont* aFont, const nsPresContext* aPresContext, uint8_t aGenericFontID,
     const nsFont* aDefaultVariableFont) {
   bool useDocumentFonts =
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -2940,25 +2940,21 @@ class nsLayoutUtils {
 
   static nsPoint ComputeOffsetToUserSpace(nsDisplayListBuilder* aBuilder,
                                           nsIFrame* aFrame);
 
   // Return the default value to be used for -moz-control-character-visibility,
   // from preferences.
   static uint8_t ControlCharVisibilityDefault();
 
-  enum class FlushUserFontSet {
-    Yes,
-    No,
-  };
-
+  // Callers are responsible to ensure the user-font-set is up-to-date if
+  // aUseUserFontSet is true.
   static already_AddRefed<nsFontMetrics> GetMetricsFor(
       nsPresContext* aPresContext, bool aIsVertical,
-      const nsStyleFont* aStyleFont, nscoord aFontSize, bool aUseUserFontSet,
-      FlushUserFontSet aFlushUserFontSet);
+      const nsStyleFont* aStyleFont, nscoord aFontSize, bool aUseUserFontSet);
 
   /**
    * Appropriately add the correct font if we are using DocumentFonts or
    * overriding for XUL
    */
   static void FixupNoneGeneric(nsFont* aFont, const nsPresContext* aPresContext,
                                uint8_t aGenericFontID,
                                const nsFont* aDefaultVariableFont);
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -1859,18 +1859,18 @@ bool nsPresContext::HasAuthorSpecifiedRu
   if (pseudoType == CSSPseudoElementType::InheritingAnonBox ||
       pseudoType == CSSPseudoElementType::NonInheritingAnonBox) {
     return false;
   }
   return Servo_HasAuthorSpecifiedRules(computedStyle, elem, pseudoType,
                                        aRuleTypeMask, UseDocumentColors());
 }
 
-gfxUserFontSet* nsPresContext::GetUserFontSet(bool aFlushUserFontSet) {
-  return mDocument->GetUserFontSet(aFlushUserFontSet);
+gfxUserFontSet* nsPresContext::GetUserFontSet() {
+  return mDocument->GetUserFontSet();
 }
 
 void nsPresContext::UserFontSetUpdated(gfxUserFontEntry* aUpdatedFont) {
   if (!mShell) return;
 
   // Note: this method is called without a font when rules in the userfont set
   // are updated, which may occur during reflow as a result of the lazy
   // initialization of the userfont set. It would be better to avoid a full
--- a/layout/base/nsPresContext.h
+++ b/layout/base/nsPresContext.h
@@ -896,17 +896,17 @@ class nsPresContext : public nsISupports
   }
 
   // This method should be used instead of directly accessing mPaintFlashing,
   // as that value may be out of date when mPaintFlashingInitialized is false.
   bool GetPaintFlashing() const;
 
   bool SuppressingResizeReflow() const { return mSuppressResizeReflow; }
 
-  gfxUserFontSet* GetUserFontSet(bool aFlushUserFontSet = true);
+  gfxUserFontSet* GetUserFontSet();
 
   // Should be called whenever the set of fonts available in the user
   // font set changes (e.g., because a new font loads, or because the
   // user font set is changed and fonts become unavailable).
   void UserFontSetUpdated(gfxUserFontEntry* aUpdatedFont = nullptr);
 
   gfxMissingFontRecorder* MissingFontRecorder() { return mMissingFonts.get(); }
 
--- a/layout/style/GeckoBindings.cpp
+++ b/layout/style/GeckoBindings.cpp
@@ -2047,18 +2047,17 @@ GeckoFontMetrics Gecko_GetFontMetrics(Ra
   // to be performed immediately after the traversal is finished.  This
   // works well for starting downloadable font loads, since we don't have
   // those fonts available to get metrics for anyway.  Platform fonts and
   // ArrayBuffer-backed FontFace objects are handled synchronously.
 
   nsPresContext* presContext = const_cast<nsPresContext*>(aPresContext);
   presContext->SetUsesExChUnits(true);
   RefPtr<nsFontMetrics> fm = nsLayoutUtils::GetMetricsFor(
-      presContext, aIsVertical, aFont, aFontSize, aUseUserFontSet,
-      nsLayoutUtils::FlushUserFontSet::No);
+      presContext, aIsVertical, aFont, aFontSize, aUseUserFontSet);
 
   ret.mXSize = fm->XHeight();
   gfxFloat zeroWidth = fm->GetThebesFontGroup()
                            ->GetFirstValidFont()
                            ->GetMetrics(fm->Orientation())
                            .zeroOrAveCharWidth;
   ret.mChSize = NS_round(aPresContext->AppUnitsPerDevPixel() * zeroWidth);
   return ret;
--- a/layout/style/ServoStyleSet.cpp
+++ b/layout/style/ServoStyleSet.cpp
@@ -346,19 +346,17 @@ void ServoStyleSet::SetAuthorStyleDisabl
   // to rebuild stylist for this change. But we have bug around this, and we
   // may want to rethink how things should work. See bug 1437785.
   SetStylistStyleSheetsDirty();
 }
 
 already_AddRefed<ComputedStyle> ServoStyleSet::ResolveStyleFor(
     Element* aElement, LazyComputeBehavior aMayCompute) {
   if (aMayCompute == LazyComputeBehavior::Allow) {
-    PreTraverseSync();
-    return ResolveStyleLazilyInternal(aElement,
-                                      CSSPseudoElementType::NotPseudo);
+    return ResolveStyleLazily(aElement, CSSPseudoElementType::NotPseudo);
   }
 
   return ResolveServoStyle(*aElement);
 }
 
 const ServoElementSnapshotTable& ServoStyleSet::Snapshots() {
   MOZ_ASSERT(GetPresContext(), "Styling a document without a shell?");
   return GetPresContext()->RestyleManager()->Snapshots();
@@ -373,16 +371,22 @@ void ServoStyleSet::ResolveMappedAttrDec
 }
 
 void ServoStyleSet::PreTraverseSync() {
   // Get the Document's root element to ensure that the cache is valid before
   // calling into the (potentially-parallel) Servo traversal, where a cache hit
   // is necessary to avoid a data race when updating the cache.
   mozilla::Unused << mDocument->GetRootElement();
 
+  // FIXME(emilio): This shouldn't be needed in theory, the call to the same
+  // function in PresShell should do the work, but as it turns out we
+  // ProcessPendingRestyles() twice, and runnables from frames just constructed
+  // can end up doing editing stuff, which adds stylesheets etc...
+  mDocument->FlushUserFontSet();
+
   ResolveMappedAttrDeclarationBlocks();
 
   nsMediaFeatures::InitSystemMetrics();
 
   LookAndFeel::NativeInit();
 
   mDocument->CacheAllKnownLangPrefs();
 
@@ -531,17 +535,16 @@ already_AddRefed<ComputedStyle> ServoSty
   MOZ_ASSERT(computedValues);
   return computedValues.forget();
 }
 
 already_AddRefed<ComputedStyle> ServoStyleSet::ResolveStyleLazily(
     Element* aElement, CSSPseudoElementType aPseudoType,
     StyleRuleInclusion aRuleInclusion) {
   PreTraverseSync();
-
   return ResolveStyleLazilyInternal(aElement, aPseudoType, aRuleInclusion);
 }
 
 already_AddRefed<ComputedStyle>
 ServoStyleSet::ResolveInheritingAnonymousBoxStyle(
     nsAtom* aPseudoTag, ComputedStyle* aParentContext) {
   MOZ_ASSERT(nsCSSAnonBoxes::IsAnonBox(aPseudoTag) &&
              !nsCSSAnonBoxes::IsNonInheritingAnonBox(aPseudoTag));
--- a/media/audioipc/README_MOZILLA
+++ b/media/audioipc/README_MOZILLA
@@ -1,8 +1,8 @@
 The source from this directory was copied from the audioipc-2
 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 audioipc-2 git repository is: https://github.com/djg/audioipc-2.git
 
-The git commit ID used was 572d6a6a16501cde726dcc09604a0cbc895d93e3 (2018-10-23 16:43:12 +1300)
+The git commit ID used was c2148b95128f5e54ef1d18e5e457a2fa45e7ac43 (2019-02-05 15:18:22 +1300)
--- a/media/audioipc/audioipc/src/lib.rs
+++ b/media/audioipc/audioipc/src/lib.rs
@@ -28,16 +28,17 @@ extern crate tokio_core;
 #[macro_use]
 extern crate tokio_io;
 extern crate tokio_uds;
 
 mod async;
 mod cmsg;
 pub mod codec;
 pub mod core;
+#[allow(deprecated)]
 pub mod errors;
 pub mod fd_passing;
 pub mod frame;
 pub mod messages;
 mod msg;
 pub mod rpc;
 pub mod shm;
 
--- a/media/audioipc/audioipc/src/messages.rs
+++ b/media/audioipc/audioipc/src/messages.rs
@@ -224,17 +224,19 @@ pub enum ClientMessage {
     StreamPanningSet,
     StreamCurrentDevice(Device),
 
     Error(c_int),
 }
 
 #[derive(Debug, Deserialize, Serialize)]
 pub enum CallbackReq {
-    Data(isize, usize),
+    Data { nframes: isize,
+           input_frame_size: usize,
+           output_frame_size: usize },
     State(ffi::cubeb_state),
 }
 
 #[derive(Debug, Deserialize, Serialize)]
 pub enum CallbackResp {
     Data(isize),
     State,
 }
--- a/media/audioipc/client/src/stream.rs
+++ b/media/audioipc/client/src/stream.rs
@@ -64,21 +64,22 @@ struct CallbackServer {
 impl rpc::Server for CallbackServer {
     type Request = CallbackReq;
     type Response = CallbackResp;
     type Future = CpuFuture<Self::Response, ()>;
     type Transport = Framed<UnixStream, LengthDelimitedCodec<Self::Response, Self::Request>>;
 
     fn process(&mut self, req: Self::Request) -> Self::Future {
         match req {
-            CallbackReq::Data(nframes, frame_size) => {
+            CallbackReq::Data { nframes, input_frame_size, output_frame_size } => {
                 trace!(
-                    "stream_thread: Data Callback: nframes={} frame_size={}",
+                    "stream_thread: Data Callback: nframes={} input_fs={} output_fs={}",
                     nframes,
-                    frame_size
+                    input_frame_size,
+                    output_frame_size,
                 );
 
                 // Clone values that need to be moved into the cpu pool thread.
                 let input_shm = match self.input_shm {
                     Some(ref shm) => unsafe { Some(shm.clone_view()) },
                     None => None,
                 };
                 let mut output_shm = match self.output_shm {
@@ -87,24 +88,24 @@ impl rpc::Server for CallbackServer {
                 };
                 let user_ptr = self.user_ptr;
                 let cb = self.data_cb.unwrap();
 
                 self.cpu_pool.spawn_fn(move || {
                     // TODO: This is proof-of-concept. Make it better.
                     let input_ptr: *const u8 = match input_shm {
                         Some(shm) => shm
-                            .get_slice(nframes as usize * frame_size)
+                            .get_slice(nframes as usize * input_frame_size)
                             .unwrap()
                             .as_ptr(),
                         None => ptr::null(),
                     };
                     let output_ptr: *mut u8 = match output_shm {
                         Some(ref mut shm) => shm
-                            .get_mut_slice(nframes as usize * frame_size)
+                            .get_mut_slice(nframes as usize * output_frame_size)
                             .unwrap()
                             .as_mut_ptr(),
                         None => ptr::null_mut(),
                     };
 
                     set_in_callback(true);
                     let nframes = unsafe {
                         cb(
--- a/media/audioipc/server/src/lib.rs
+++ b/media/audioipc/server/src/lib.rs
@@ -29,16 +29,17 @@ use std::error::Error;
 use std::os::raw::c_void;
 use std::os::unix::io::IntoRawFd;
 use std::os::unix::net;
 use std::ptr;
 use tokio_uds::UnixStream;
 
 mod server;
 
+#[allow(deprecated)]
 pub mod errors {
     error_chain! {
         links {
             AudioIPC(::audioipc::errors::Error, ::audioipc::errors::ErrorKind);
         }
         foreign_links {
             Cubeb(::cubeb::Error);
             Io(::std::io::Error);
--- a/media/audioipc/server/src/server.rs
+++ b/media/audioipc/server/src/server.rs
@@ -77,45 +77,35 @@ struct ServerStreamCallbacks {
     input_shm: SharedMemWriter,
     /// Shared memory buffer for receiving output data from client
     output_shm: SharedMemReader,
     /// RPC interface to callback server running in client
     rpc: rpc::ClientProxy<CallbackReq, CallbackResp>,
 }
 
 impl ServerStreamCallbacks {
-    fn data_callback(&mut self, input: &[u8], output: &mut [u8]) -> isize {
-        trace!("Stream data callback: {} {}", input.len(), output.len());
+    fn data_callback(&mut self, input: &[u8], output: &mut [u8], nframes: isize) -> isize {
+        trace!("Stream data callback: {} {} {}", nframes, input.len(), output.len());
 
-        // FFI wrapper (data_cb_c) converted buffers to [u8] slices but len is frames *not* bytes.
-        // Convert slices to correct length now we have {input,output}_frame_size available.
-        let real_input = unsafe {
-            let nbytes = input.len() * self.input_frame_size as usize;
-            slice::from_raw_parts(input.as_ptr(), nbytes)
-        };
-        let real_output = unsafe {
-            let nbytes = output.len() * self.output_frame_size as usize;
-            slice::from_raw_parts_mut(output.as_mut_ptr(), nbytes)
-        };
-
-        self.input_shm.write(real_input).unwrap();
+        self.input_shm.write(input).unwrap();
 
         let r = self
             .rpc
-            .call(CallbackReq::Data(
-                output.len() as isize,
-                self.output_frame_size as usize,
-            )).wait();
+            .call(CallbackReq::Data {
+                nframes: nframes,
+                input_frame_size: self.input_frame_size as usize,
+                output_frame_size: self.output_frame_size as usize,
+            }).wait();
 
         match r {
             Ok(CallbackResp::Data(frames)) => {
                 if frames >= 0 {
                     let nbytes = frames as usize * self.output_frame_size as usize;
                     trace!("Reslice output to {}", nbytes);
-                    self.output_shm.read(&mut real_output[..nbytes]).unwrap();
+                    self.output_shm.read(&mut output[..nbytes]).unwrap();
                 }
                 frames
             }
             _ => {
                 debug!("Unexpected message {:?} during data_callback", r);
                 -1
             }
         }
@@ -431,24 +421,26 @@ unsafe extern "C" fn data_cb_c(
     output_buffer: *mut c_void,
     nframes: c_long,
 ) -> c_long {
     let ok = panic::catch_unwind(|| {
         let cbs = &mut *(user_ptr as *mut ServerStreamCallbacks);
         let input = if input_buffer.is_null() {
             &[]
         } else {
-            slice::from_raw_parts(input_buffer as *const u8, nframes as usize)
+            let nbytes = nframes * cbs.input_frame_size as c_long;
+            slice::from_raw_parts(input_buffer as *const u8, nbytes as usize)
         };
         let output: &mut [u8] = if output_buffer.is_null() {
             &mut []
         } else {
-            slice::from_raw_parts_mut(output_buffer as *mut u8, nframes as usize)
+            let nbytes = nframes * cbs.output_frame_size as c_long;
+            slice::from_raw_parts_mut(output_buffer as *mut u8, nbytes as usize)
         };
-        cbs.data_callback(input, output) as c_long
+        cbs.data_callback(input, output, nframes as isize) as c_long
     });
     ok.unwrap_or(0)
 }
 
 unsafe extern "C" fn state_cb_c(
     _: *mut ffi::cubeb_stream,
     user_ptr: *mut c_void,
     state: ffi::cubeb_state,
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -18,17 +18,19 @@ pref("keyword.enabled", false);
 pref("general.useragent.compatMode.firefox", false);
 
 // This pref exists only for testing purposes. In order to disable all
 // overrides by default, don't initialize UserAgentOverrides.jsm.
 pref("general.useragent.site_specific_overrides", true);
 
 pref("general.config.obscure_value", 13); // for MCD .cfg files
 
+#ifndef MOZ_BUILD_APP_IS_BROWSER
 pref("general.warnOnAboutConfig", true);
+#endif
 
 // maximum number of dated backups to keep at any time
 pref("browser.bookmarks.max_backups",       5);
 
 pref("browser.cache.disk.enable",           true);
 // Does the user want smart-sizing?
 pref("browser.cache.disk.smart_size.enabled", true);
 // Size (in KB) explicitly set by the user. Used when smart_size.enabled == false
--- a/modules/libpref/moz.build
+++ b/modules/libpref/moz.build
@@ -44,11 +44,14 @@ DEFINES['OS_ARCH'] = CONFIG['OS_ARCH']
 DEFINES['MOZ_WIDGET_TOOLKIT'] = CONFIG['MOZ_WIDGET_TOOLKIT']
 if CONFIG['MOZ_ENABLE_WEBRENDER']:
     DEFINES['MOZ_ENABLE_WEBRENDER'] = True
 
 if CONFIG['NIGHTLY_BUILD']:
     DEFINES['ENABLE_WASM_REFTYPES'] = True
     DEFINES['ENABLE_WASM_GC'] = True
 
+if CONFIG['MOZ_BUILD_APP'] == 'browser':
+    DEFINES['MOZ_BUILD_APP_IS_BROWSER'] = True
+
 FINAL_TARGET_PP_FILES += [
     'greprefs.js',
 ]
--- a/moz.configure
+++ b/moz.configure
@@ -436,19 +436,23 @@ def tup_include(build_backends, build_pr
 
 include(tup_include)
 
 # watchman detection
 # ==============================================================
 
 option(env='WATCHMAN', nargs=1, help='Path to the watchman program')
 
-@depends('WATCHMAN')
+@depends(host, 'WATCHMAN')
 @checking('for watchman', callback=lambda w: w.path if w else 'not found')
-def watchman(prog):
+def watchman(host, prog):
+    # On Windows, `watchman` is only supported on 64-bit hosts.
+    if host.os == 'WINNT' and host.cpu != 'x86_64':
+        return
+
     if not prog:
         prog = find_program('watchman')
 
     if not prog:
         return
 
     # `watchman version` will talk to the Watchman daemon service.
     # This can hang due to permissions problems. e.g.
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -933,16 +933,17 @@ class RunProgram(MachCommandBase):
             if sys.platform.startswith('win') and \
                'MOZ_LAUNCHER_PROCESS' in self.defines:
                 args.append('-wait-for-browser')
 
             no_profile_option_given = \
                 all(p not in params for p in ['-profile', '--profile', '-P'])
             if no_profile_option_given and not noprofile:
                 prefs = {
+                   'browser.aboutConfig.showWarning': False,
                    'browser.shell.checkDefaultBrowser': False,
                    'general.warnOnAboutConfig': False,
                 }
                 prefs.update(self._mach_context.settings.runprefs)
                 prefs.update([p.split('=', 1) for p in setpref])
                 for pref in prefs:
                     prefs[pref] = Preferences.cast(prefs[pref])
 
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/android.yml
@@ -0,0 +1,66 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+job-defaults:
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        docker-image: {in-tree: android-build}
+        max-run-time: 1800
+
+linux64-android-sdk-linux-repack:
+    description: "Android SDK (Linux) repack toolchain build"
+    treeherder:
+        symbol: TL(android-sdk-linux)
+    worker:
+        artifacts:
+            - name: project/gecko/android-sdk
+              path: /builds/worker/project/gecko/android-sdk/
+              type: directory
+    run:
+        script: repack-android-sdk-linux.sh
+        resources:
+            - 'python/mozboot/**/*android*'
+        toolchain-artifact: project/gecko/android-sdk/android-sdk-linux.tar.xz
+        toolchain-alias: android-sdk-linux
+
+linux64-android-ndk-linux-repack:
+    description: "Android NDK (Linux) repack toolchain build"
+    treeherder:
+        symbol: TL(android-ndk-linux)
+    worker:
+        artifacts:
+            - name: project/gecko/android-ndk
+              path: /builds/worker/project/gecko/android-ndk/
+              type: directory
+    run:
+        script: repack-android-ndk-linux.sh
+        resources:
+            - 'python/mozboot/**/*android*'
+        toolchain-artifact: project/gecko/android-ndk/android-ndk.tar.xz
+        toolchain-alias: android-ndk-linux
+
+linux64-android-gradle-dependencies:
+    description: "Android Gradle dependencies toolchain task"
+    treeherder:
+        symbol: TL(gradle-dependencies)
+    worker:
+        env:
+            GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-online"
+    run:
+        script: android-gradle-dependencies.sh
+        sparse-profile: null
+        resources:
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+            - 'taskcluster/scripts/misc/android-gradle-dependencies/**'
+            - '*.gradle'
+            - 'mobile/android/**/*.gradle'
+            - 'mobile/android/config/mozconfigs/android-api-16-gradle-dependencies/**'
+            - 'mobile/android/config/mozconfigs/common*'
+            - 'mobile/android/gradle.configure'
+        toolchain-artifact: public/build/android-gradle-dependencies.tar.xz
+        toolchain-alias: android-gradle-dependencies
+    toolchains:
+        # Aliases aren't allowed for toolchains depending on toolchains.
+        - linux64-android-sdk-linux-repack
+        - linux64-node
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/cbindgen.yml
@@ -0,0 +1,55 @@
+# 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/.
+
+job-defaults:
+    description: "cbindgen toolchain build"
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 3600
+    run:
+        script: build-cbindgen.sh
+        resources:
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-artifact: public/build/cbindgen.tar.xz
+
+linux64-cbindgen:
+    treeherder:
+        symbol: TL(cbindgen)
+    worker:
+        max-run-time: 1800
+    run:
+        arguments: ['x86_64-unknown-linux-gnu']
+    toolchains:
+        - linux64-rust-1.28
+
+macosx64-cbindgen:
+    treeherder:
+        symbol: TM(cbindgen)
+    worker:
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
+    run-on-projects:
+        - trunk
+        - try
+    run:
+        arguments: ['x86_64-apple-darwin']
+        tooltool-downloads: internal
+    toolchains:
+        - linux64-cctools-port
+        - linux64-clang-7
+        - linux64-llvm-dsymutil
+        - linux64-rust-macos-1.31
+
+win64-cbindgen:
+    treeherder:
+        symbol: TW64(cbindgen)
+    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
+    worker:
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/sccache-build.manifest"
+    run:
+        arguments: ['x86_64-pc-windows-msvc']
+        toolchain-artifact: public/build/cbindgen.tar.bz2
+    toolchains:
+        - win64-rust-1.28
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/cctools-port.yml
@@ -0,0 +1,40 @@
+# 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/.
+
+job-defaults:
+    description: "cctools-port toolchain build"
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 1800
+    run:
+        resources:
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+
+linux64-cctools-port:
+    treeherder:
+        symbol: TL(cctools)
+    run:
+        script: build-cctools-port.sh
+        toolchain-artifact: public/build/cctools.tar.xz
+    toolchains:
+        - linux64-clang-7
+
+macosx64-cctools-port:
+    description: "cctools-port toolchain build"
+    treeherder:
+        symbol: TM(cctools)
+    worker:
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
+    run-on-projects:
+        - trunk
+        - try
+    run:
+        script: build-cctools-port-macosx.sh
+        tooltool-downloads: internal
+        toolchain-artifact: public/build/cctools.tar.bz2
+    toolchains:
+        - linux64-cctools-port
+        - linux64-clang-7
+        - linux64-node
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/clang-tidy.yml
@@ -0,0 +1,97 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+job-defaults:
+    description: "Clang-tidy build"
+    index:
+        product: static-analysis
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux-large
+    worker:
+        max-run-time: 3600
+    run:
+        toolchain-artifact: public/build/clang-tidy.tar.xz
+        resources:
+            - 'build/clang-plugin/**/*.cpp'
+            - 'build/clang-plugin/**/*.h'
+            - 'build/clang-plugin/*.inc'
+            - 'build/clang-plugin/*.py'
+            - 'build/clang-plugin/moz.build'
+            - 'build/clang-plugin/Makefile.in'
+            - 'build/build-clang/build-clang.py'
+    run-on-projects:
+        - trunk
+        - try
+
+linux64-clang-tidy:
+    index:
+        job-name: linux64-clang-tidy
+    treeherder:
+        symbol: TL(clang-tidy)
+    run:
+        script: build-clang-tidy-linux.sh
+        resources:
+            - 'build/build-clang/clang-tidy-linux64.json'
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+    toolchains:
+        - linux64-gcc-4.9
+
+macosx64-clang-tidy:
+    index:
+        job-name: macosx64-clang-tidy
+    treeherder:
+        symbol: TM(clang-tidy)
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux-large
+    worker:
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
+    run:
+        using: toolchain-script
+        script: build-clang-tidy-macosx.sh
+        tooltool-downloads: internal
+        resources:
+            - 'build/build-clang/clang-tidy-macosx64.json'
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+    toolchains:
+        - linux64-cctools-port
+        - linux64-clang-7
+        - linux64-gcc-4.9
+        - linux64-node
+
+win32-clang-tidy:
+    description: "Clang-tidy toolchain build"
+    index:
+        job-name: win32-clang-tidy
+    treeherder:
+        symbol: TW32(clang-tidy)
+        tier: 2
+    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
+    worker:
+        max-run-time: 7200
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/build-clang-cl.manifest"
+    run:
+        script: build-clang-tidy32-windows.sh
+        resources:
+            - 'build/build-clang/clang-tidy-win32.json'
+            - 'taskcluster/scripts/misc/build-clang-windows-helper32.sh'
+        toolchain-artifact: public/build/clang-tidy.tar.bz2
+
+win64-clang-tidy:
+    description: "Clang-tidy toolchain build"
+    index:
+        job-name: win64-clang-tidy
+    treeherder:
+        symbol: TW64(clang-tidy)
+        tier: 2
+    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
+    worker:
+        max-run-time: 7200
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/build-clang-cl.manifest"
+    run:
+        script: build-clang-tidy64-windows.sh
+        resources:
+            - 'build/build-clang/clang-tidy-win64.json'
+            - 'taskcluster/scripts/misc/build-clang-windows-helper64.sh'
+        toolchain-artifact: public/build/clang-tidy.tar.bz2
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/clang.yml
@@ -0,0 +1,152 @@
+# 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/.
+
+job-defaults:
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux-xlarge
+    worker:
+        max-run-time: 7200
+    run:
+        resources:
+            - 'build/build-clang/build-clang.py'
+
+linux64-clang-3.9:
+    description: "Clang 3.9 toolchain build"
+    treeherder:
+        symbol: TL(clang3.9)
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux-large
+    run:
+        script: build-clang-3.9-linux.sh
+        resources:
+            - 'build/build-clang/clang-3.9-linux64.json'
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-artifact: public/build/clang.tar.xz
+    toolchains:
+        - linux64-gcc-4.9
+
+linux64-clang-7:
+    description: "Clang 7 toolchain build"
+    treeherder:
+        symbol: TL(clang7)
+    run:
+        using: toolchain-script
+        script: build-clang-7-linux.sh
+        resources:
+            - 'build/build-clang/build-clang.py'
+            - 'build/build-clang/clang-7-linux64.json'
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-alias: linux64-clang
+        toolchain-artifact: public/build/clang.tar.xz
+    toolchains:
+        - linux64-gcc-4.9
+
+linux64-clang-trunk-mingw-x86:
+    description: "MinGW-Clang Trunk x86 toolchain build"
+    treeherder:
+        symbol: TMW(clang-x86)
+    run:
+        script: build-clang-trunk-mingw.sh
+        arguments: [
+            'x86'
+        ]
+        resources:
+            - 'build/build-clang/clang-trunk-mingw.json'
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-artifact: public/build/clangmingw.tar.xz
+    toolchains:
+        - linux64-gcc-4.9
+
+linux64-clang-trunk-mingw-x64:
+    description: "MinGW-Clang Trunk x64 toolchain build"
+    treeherder:
+        symbol: TMW(clang-x64)
+        tier: 2
+    run:
+        script: build-clang-trunk-mingw.sh
+        arguments: [
+            'x64'
+        ]
+        resources:
+            - 'build/build-clang/clang-trunk-mingw.json'
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-artifact: public/build/clangmingw.tar.xz
+    toolchains:
+        - linux64-gcc-4.9
+
+linux64-clang-7-android-cross:
+    description: "Clang 7 toolchain build"
+    treeherder:
+        symbol: TL(clang7-android)
+    run:
+        using: toolchain-script
+        script: build-clang-7-android.sh
+        resources:
+            - 'build/build-clang/clang-7-android.json'
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-alias: linux64-clang-android-cross
+        toolchain-artifact: public/build/clang.tar.xz
+    toolchains:
+        - linux64-gcc-4.9
+        - linux64-android-ndk-linux-repack
+
+linux64-clang-7-macosx-cross:
+    description: "Clang 7 toolchain build with MacOS Compiler RT libs"
+    treeherder:
+        symbol: TL(clang7-macosx-cross)
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 3600
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
+    run:
+        script: build-clang-7-linux-macosx-cross.sh
+        resources:
+            - 'build/build-clang/clang-7-macosx64.json'
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-alias: linux64-clang-macosx-cross
+        toolchain-artifact: public/build/clang.tar.xz
+        tooltool-downloads: internal
+    toolchains:
+        - linux64-cctools-port
+        - linux64-clang-7
+        - linux64-gcc-4.9
+
+macosx64-clang:
+    description: "Clang toolchain build"
+    treeherder:
+        symbol: TM(clang)
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux-large
+    worker:
+        max-run-time: 3600
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
+    run-on-projects:
+        - trunk
+        - try
+    run:
+        script: build-clang-macosx.sh
+        tooltool-downloads: internal
+        resources:
+            - 'build/build-clang/clang-7-macosx64.json'
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-artifact: public/build/clang.tar.xz
+    toolchains:
+        - linux64-cctools-port
+        - linux64-clang-7
+        - linux64-gcc-4.9
+        - linux64-node
+
+win64-clang-cl:
+    description: "Clang-cl toolchain build"
+    treeherder:
+        symbol: TW64(clang-cl)
+    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
+    worker:
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/build-clang-cl.manifest"
+    run:
+        script: build-clang64-windows.sh
+        resources:
+            - 'build/build-clang/clang-win64.json'
+            - 'taskcluster/scripts/misc/build-clang-windows-helper64.sh'
+        toolchain-artifact: public/build/clang.tar.bz2
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/gcc.yml
@@ -0,0 +1,79 @@
+# 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/.
+
+job-defaults:
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 3600
+    run:
+        resources:
+            - 'build/unix/build-gcc/build-gcc.sh'
+        toolchain-artifact: public/build/gcc.tar.xz
+
+linux64-gcc-4.9:
+    description: "GCC 4.9 toolchain build"
+    treeherder:
+        symbol: TL(gcc4.9)
+    run:
+        script: build-gcc-4.9-linux.sh
+    fetches:
+        fetch:
+            - binutils-2.25.1
+            - cloog-0.18.1
+            - gcc-4.9.4
+            - gmp-5.1.3
+            - isl-0.12.2
+            - mpc-0.8.2
+            - mpfr-3.1.5
+
+linux64-gcc-6:
+    description: "GCC 6 toolchain build"
+    treeherder:
+        symbol: TL(gcc6)
+    run:
+        script: build-gcc-6-linux.sh
+        toolchain-alias: linux64-gcc
+    fetches:
+        fetch:
+            - binutils-2.28.1
+            - gcc-6.4.0
+            - gmp-5.1.3
+            - isl-0.15
+            - mpc-0.8.2
+            - mpfr-3.1.5
+
+linux64-gcc-7:
+    description: "GCC 7 toolchain build"
+    treeherder:
+        symbol: TL(gcc7)
+    run:
+        script: build-gcc-7-linux.sh
+    fetches:
+        fetch:
+            - binutils-2.28.1
+            - gcc-7.3.0
+            - gmp-6.1.0
+            - isl-0.16.1
+            - mpc-1.0.3
+            - mpfr-3.1.4
+
+linux64-gcc-sixgill:
+    description: "sixgill GCC plugin build"
+    treeherder:
+        symbol: TL(sixgill)
+    run:
+        script: build-gcc-sixgill-plugin-linux.sh
+        resources:
+            - 'taskcluster/scripts/misc/build-gcc-sixgill-plugin-linux.sh'
+        toolchain-artifact: public/build/sixgill.tar.xz
+    toolchains:
+        - linux64-gcc-6
+    fetches:
+        fetch:
+            - binutils-2.28.1
+            - isl-0.15
+            - gcc-6.4.0
+            - gmp-5.1.3
+            - mpc-0.8.2
+            - mpfr-3.1.5
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/gn.yml
@@ -0,0 +1,52 @@
+# 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/.
+
+job-defaults:
+    description: "gn toolchain build"
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 1800
+    run-on-projects:
+        - trunk
+        - try
+    run:
+        tooltool-downloads: public
+        resources:
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+            - 'taskcluster/scripts/misc/build-gn-common.sh'
+        toolchain-artifact: public/build/gn.tar.xz
+
+linux64-gn:
+    treeherder:
+        symbol: TL(gn)
+    run:
+        script: build-gn-linux.sh
+    toolchains:
+        - linux64-gcc-4.9
+
+macosx64-gn:
+    treeherder:
+        symbol: TM(gn)
+    worker:
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
+    run:
+        script: build-gn-macosx.sh
+        tooltool-downloads: internal
+    toolchains:
+        - linux64-cctools-port
+        - linux64-clang-7
+        - linux64-node
+
+win32-gn:
+    treeherder:
+        symbol: TW32(gn)
+    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
+    worker:
+        max-run-time: 3600
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/gn-build.manifest"
+    run:
+        script: build-gn-win32.sh
+        toolchain-artifact: public/build/gn.tar.bz2
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/grcov.yml
@@ -0,0 +1,44 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+job-defaults:
+    description: "grcov toolchain build"
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 1800
+    run:
+        script: build-grcov.sh
+        resources:
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-artifact: public/build/grcov.tar.xz
+
+linux64-grcov:
+    treeherder:
+        symbol: TL(grcov)
+    toolchains:
+        - linux64-rust-1.28
+        - linux64-clang-7
+
+macosx64-grcov:
+    treeherder:
+        symbol: TM(grcov)
+    run-on-projects:
+        - trunk
+        - try
+    toolchains:
+        - linux64-rust-1.28
+        - linux64-clang-7
+
+win64-grcov:
+    treeherder:
+        symbol: TW64(grcov)
+    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
+    worker:
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/sccache-build.manifest"
+    run:
+        toolchain-artifact: public/build/grcov.tar.bz2
+    toolchains:
+        - win64-rust-1.28
+        - win64-clang-cl
--- a/taskcluster/ci/toolchain/kind.yml
+++ b/taskcluster/ci/toolchain/kind.yml
@@ -10,14 +10,32 @@ kind-dependencies:
 transforms:
    - taskgraph.transforms.try_job:transforms
    - taskgraph.transforms.use_toolchains:transforms
    - taskgraph.transforms.job:transforms
    - taskgraph.transforms.cached_tasks:transforms
    - taskgraph.transforms.task:transforms
 
 job-defaults:
+   treeherder:
+      kind: build
+      platform: toolchains/opt
+      tier: 1
    run-on-projects: []
+   run:
+      using: toolchain-script
 
 jobs-from:
-   - linux.yml
-   - macosx.yml
-   - windows.yml
+   - android.yml
+   - cbindgen.yml
+   - cctools-port.yml
+   - clang-tidy.yml
+   - clang.yml
+   - gcc.yml
+   - gn.yml
+   - grcov.yml
+   - mingw.yml
+   - minidump_stackwalk.yml
+   - misc.yml
+   - node.yml
+   - rust.yml
+   - rust-size.yml
+   - sccache.yml
deleted file mode 100755
--- a/taskcluster/ci/toolchain/linux.yml
+++ /dev/null
@@ -1,975 +0,0 @@
-# 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/.
-
-job-defaults:
-    worker:
-        docker-image: {in-tree: toolchain-build}
-
-linux64-clang-3.9:
-    description: "Clang 3.9 toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(clang3.9)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux-large
-    worker:
-        max-run-time: 7200
-    run:
-        using: toolchain-script
-        script: build-clang-3.9-linux.sh
-        resources:
-            - 'build/build-clang/build-clang.py'
-            - 'build/build-clang/clang-3.9-linux64.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/clang.tar.xz
-    toolchains:
-        - linux64-gcc-4.9
-
-linux64-clang-7:
-    description: "Clang 7 toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(clang7)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux-xlarge
-    worker:
-        max-run-time: 7200
-    run:
-        using: toolchain-script
-        script: build-clang-7-linux.sh
-        resources:
-            - 'build/build-clang/build-clang.py'
-            - 'build/build-clang/clang-7-linux64.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-alias: linux64-clang
-        toolchain-artifact: public/build/clang.tar.xz
-    toolchains:
-        - linux64-gcc-4.9
-
-linux64-clang-trunk-mingw-x86:
-    description: "MinGW-Clang Trunk x86 toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TMW(clang-x86)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux-xlarge
-    worker:
-        max-run-time: 7200
-    run:
-        using: toolchain-script
-        script: build-clang-trunk-mingw.sh
-        arguments: [
-            'x86'
-        ]
-        resources:
-            - 'build/build-clang/build-clang.py'
-            - 'build/build-clang/clang-trunk-mingw.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/clangmingw.tar.xz
-    toolchains:
-        - linux64-gcc-4.9
-
-linux64-clang-trunk-mingw-x64:
-    description: "MinGW-Clang Trunk x64 toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TMW(clang-x64)
-        tier: 2
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux-xlarge
-    worker:
-        max-run-time: 7200
-    run:
-        using: toolchain-script
-        script: build-clang-trunk-mingw.sh
-        arguments: [
-            'x64'
-        ]
-        resources:
-            - 'build/build-clang/build-clang.py'
-            - 'build/build-clang/clang-trunk-mingw.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/clangmingw.tar.xz
-    toolchains:
-        - linux64-gcc-4.9
-
-linux64-clang-7-android-cross:
-    description: "Clang 7 toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(clang7-android)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux-xlarge
-    worker:
-        max-run-time: 7200
-    run:
-        using: toolchain-script
-        script: build-clang-7-android.sh
-        resources:
-            - 'build/build-clang/build-clang.py'
-            - 'build/build-clang/clang-7-android.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-alias: linux64-clang-android-cross
-        toolchain-artifact: public/build/clang.tar.xz
-    toolchains:
-        - linux64-gcc-4.9
-        - linux64-android-ndk-linux-repack
-
-linux64-clang-7-macosx-cross:
-    description: "Clang 7 toolchain build with MacOS Compiler RT libs"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(clang7-macosx-cross)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 3600
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
-    run:
-        using: toolchain-script
-        script: build-clang-7-linux-macosx-cross.sh
-        resources:
-            - 'build/build-clang/build-clang.py'
-            - 'build/build-clang/clang-7-macosx64.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-alias: linux64-clang-macosx-cross
-        toolchain-artifact: public/build/clang.tar.xz
-        tooltool-downloads: internal
-    toolchains:
-        - linux64-cctools-port
-        - linux64-clang-7
-        - linux64-gcc-4.9
-
-linux64-clang-tidy:
-    description: "Clang-tidy build"
-    index:
-        product: static-analysis
-        job-name: linux64-clang-tidy
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(clang-tidy)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux-large
-    worker:
-        max-run-time: 3600
-    run:
-        using: toolchain-script
-        script: build-clang-tidy-linux.sh
-        resources:
-            - 'build/clang-plugin/**/*.cpp'
-            - 'build/clang-plugin/**/*.h'
-            - 'build/clang-plugin/*.inc'
-            - 'build/clang-plugin/*.py'
-            - 'build/clang-plugin/moz.build'
-            - 'build/clang-plugin/Makefile.in'
-            - 'build/build-clang/build-clang.py'
-            - 'build/build-clang/clang-tidy-linux64.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/clang-tidy.tar.xz
-    run-on-projects:
-        - trunk
-        - try
-    toolchains:
-        - linux64-gcc-4.9
-
-linux64-infer:
-    description: "infer build"
-    index:
-        product: static-analysis
-        job-name: linux64-infer
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(infer)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: static-analysis-build}
-        max-run-time: 3600
-    run:
-        using: toolchain-script
-        script: build-infer-linux.sh
-        resources:
-            - 'build/build-infer/build-infer.py'
-            - 'build/build-infer/infer-linux64.json'
-        toolchain-artifact: public/build/infer.tar.xz
-
-linux64-gcc-4.9:
-    description: "GCC 4.9 toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(gcc4.9)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 3600
-    run:
-        using: toolchain-script
-        script: build-gcc-4.9-linux.sh
-        resources:
-            - 'build/unix/build-gcc/build-gcc.sh'
-        toolchain-artifact: public/build/gcc.tar.xz
-    fetches:
-        fetch:
-            - binutils-2.25.1
-            - cloog-0.18.1
-            - gcc-4.9.4
-            - gmp-5.1.3
-            - isl-0.12.2
-            - mpc-0.8.2
-            - mpfr-3.1.5
-
-linux64-gcc-6:
-    description: "GCC 6 toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(gcc6)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 3600
-    run:
-        using: toolchain-script
-        script: build-gcc-6-linux.sh
-        resources:
-            - 'build/unix/build-gcc/build-gcc.sh'
-        toolchain-alias: linux64-gcc
-        toolchain-artifact: public/build/gcc.tar.xz
-    fetches:
-        fetch:
-            - binutils-2.28.1
-            - gcc-6.4.0
-            - gmp-5.1.3
-            - isl-0.15
-            - mpc-0.8.2
-            - mpfr-3.1.5
-
-linux64-gcc-7:
-    description: "GCC 7 toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(gcc7)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 3600
-    run:
-        using: toolchain-script
-        script: build-gcc-7-linux.sh
-        resources:
-            - 'build/unix/build-gcc/build-gcc.sh'
-        toolchain-artifact: public/build/gcc.tar.xz
-    fetches:
-        fetch:
-            - binutils-2.28.1
-            - gcc-7.3.0
-            - gmp-6.1.0
-            - isl-0.16.1
-            - mpc-1.0.3
-            - mpfr-3.1.4
-
-linux64-gcc-sixgill:
-    description: "sixgill GCC plugin build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(sixgill)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 3600
-    run:
-        using: toolchain-script
-        script: build-gcc-sixgill-plugin-linux.sh
-        resources:
-            - 'build/unix/build-gcc/build-gcc.sh'
-            - 'taskcluster/scripts/misc/build-gcc-sixgill-plugin-linux.sh'
-        toolchain-artifact: public/build/sixgill.tar.xz
-    toolchains:
-        - linux64-gcc-6
-    fetches:
-        fetch:
-            - binutils-2.28.1
-            - isl-0.15
-            - gcc-6.4.0
-            - gmp-5.1.3
-            - mpc-0.8.2
-            - mpfr-3.1.5
-
-linux64-llvm-dsymutil:
-    description: "llvm-dsymutil toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(dsymutil)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: build-llvm-dsymutil.sh
-        toolchain-artifact: public/build/llvm-dsymutil.tar.xz
-    toolchains:
-        - linux64-gcc-4.9
-
-linux64-binutils:
-    description: "Binutils toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(binutil)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 3600
-    run:
-        using: toolchain-script
-        script: build-binutils-linux.sh
-        resources:
-            - 'build/unix/build-binutils/build-binutils.sh'
-        toolchain-artifact: public/build/binutils.tar.xz
-    fetches:
-        fetch:
-            - binutils-2.31.1
-
-linux64-cctools-port:
-    description: "cctools-port toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(cctools)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: build-cctools-port.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/cctools.tar.xz
-    toolchains:
-        - linux64-clang-7
-
-linux64-hfsplus:
-    description: "hfsplus toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(hfs+)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: build-hfsplus-linux.sh
-        resources:
-            - 'build/unix/build-hfsplus/build-hfsplus.sh'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/hfsplus-tools.tar.xz
-    toolchains:
-        - linux64-clang-7
-
-linux64-libdmg:
-    description: "libdmg-hfsplus toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(libdmg-hfs+)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: build-libdmg-hfsplus.sh
-        toolchain-artifact: public/build/dmg.tar.xz
-
-linux64-node:
-    description: "Node repack toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(node)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: toolchain-build}
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: repack-node.sh
-        arguments: ['linux64']
-        toolchain-artifact: public/build/node.tar.xz
-
-linux64-android-sdk-linux-repack:
-    description: "Android SDK (Linux) repack toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(android-sdk-linux)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: android-build}
-        max-run-time: 1800
-        artifacts:
-            - name: project/gecko/android-sdk
-              path: /builds/worker/project/gecko/android-sdk/
-              type: directory
-    run:
-        using: toolchain-script
-        script: repack-android-sdk-linux.sh
-        resources:
-            - 'python/mozboot/**/*android*'
-        toolchain-artifact: project/gecko/android-sdk/android-sdk-linux.tar.xz
-        toolchain-alias: android-sdk-linux
-
-linux64-android-ndk-linux-repack:
-    description: "Android NDK (Linux) repack toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(android-ndk-linux)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: android-build}
-        max-run-time: 1800
-        artifacts:
-            - name: project/gecko/android-ndk
-              path: /builds/worker/project/gecko/android-ndk/
-              type: directory
-    run:
-        using: toolchain-script
-        script: repack-android-ndk-linux.sh
-        resources:
-            - 'python/mozboot/**/*android*'
-        toolchain-artifact: project/gecko/android-ndk/android-ndk.tar.xz
-        toolchain-alias: android-ndk-linux
-
-linux64-android-gradle-dependencies:
-    description: "Android Gradle dependencies toolchain task"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(gradle-dependencies)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: android-build}
-        env:
-            GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-online"
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: android-gradle-dependencies.sh
-        sparse-profile: null
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-            - 'taskcluster/scripts/misc/android-gradle-dependencies/**'
-            - '*.gradle'
-            - 'mobile/android/**/*.gradle'
-            - 'mobile/android/config/mozconfigs/android-api-16-gradle-dependencies/**'
-            - 'mobile/android/config/mozconfigs/common*'
-            - 'mobile/android/gradle.configure'
-        toolchain-artifact: public/build/android-gradle-dependencies.tar.xz
-        toolchain-alias: android-gradle-dependencies
-    toolchains:
-        # Aliases aren't allowed for toolchains depending on toolchains.
-        - linux64-android-sdk-linux-repack
-        - linux64-node
-
-linux64-rust-1.28:
-    description: "rust repack"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(rust-1.28)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 7200
-        env:
-            UPLOAD_DIR: artifacts
-    run:
-        using: toolchain-script
-        script: repack_rust.py
-        arguments: [
-            '--channel', '1.28.0',
-            '--host', 'x86_64-unknown-linux-gnu',
-            '--target', 'x86_64-unknown-linux-gnu',
-            '--target', 'i686-unknown-linux-gnu',
-        ]
-        toolchain-artifact: public/build/rustc.tar.xz
-
-linux64-rust-1.31:
-    description: "rust repack"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(rust-1.31)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 7200
-        env:
-            UPLOAD_DIR: artifacts
-    run:
-        using: toolchain-script
-        script: repack_rust.py
-        arguments: [
-            '--channel', '1.31.0',
-            '--host', 'x86_64-unknown-linux-gnu',
-            '--target', 'x86_64-unknown-linux-gnu',
-            '--target', 'i686-unknown-linux-gnu',
-        ]
-        toolchain-artifact: public/build/rustc.tar.xz
-
-linux64-rust-1.32:
-    description: "rust repack"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(rust)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 7200
-        env:
-            UPLOAD_DIR: artifacts
-    run:
-        using: toolchain-script
-        script: repack_rust.py
-        arguments: [
-            '--channel', '1.32.0',
-            '--host', 'x86_64-unknown-linux-gnu',
-            '--target', 'x86_64-unknown-linux-gnu',
-            '--target', 'i686-unknown-linux-gnu',
-        ]
-        toolchain-alias: linux64-rust
-        toolchain-artifact: public/build/rustc.tar.xz
-
-linux64-rust-nightly:
-    description: "rust nightly repack"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(rust-nightly)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 7200
-        env:
-            UPLOAD_DIR: artifacts
-    run:
-        using: toolchain-script
-        script: repack_rust.py
-        arguments: [
-            '--channel', 'nightly-2018-10-05',
-            '--host', 'x86_64-unknown-linux-gnu',
-            '--target', 'x86_64-unknown-linux-gnu',
-            '--target', 'i686-unknown-linux-gnu',
-        ]
-        toolchain-artifact: public/build/rustc.tar.xz
-
-linux64-rust-macos-1.31:
-    description: "rust repack with macos-cross support"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(rust-macos-1.31)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 7200
-        env:
-            UPLOAD_DIR: artifacts
-    run:
-        using: toolchain-script
-        script: repack_rust.py
-        arguments: [
-            '--channel', '1.31.0',
-            '--host', 'x86_64-unknown-linux-gnu',
-            '--target', 'x86_64-unknown-linux-gnu',
-            '--target', 'x86_64-apple-darwin',
-        ]
-        toolchain-artifact: public/build/rustc.tar.xz
-
-linux64-rust-macos-1.32:
-    description: "rust repack with macos-cross support"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(rust-macos)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 7200
-        env:
-            UPLOAD_DIR: artifacts
-    run:
-        using: toolchain-script
-        script: repack_rust.py
-        arguments: [
-            '--channel', '1.32.0',
-            '--host', 'x86_64-unknown-linux-gnu',
-            '--target', 'x86_64-unknown-linux-gnu',
-            '--target', 'x86_64-apple-darwin',
-        ]
-        toolchain-alias: linux64-rust-macos
-        toolchain-artifact: public/build/rustc.tar.xz
-
-linux64-rust-nightly-macos:
-    description: "rust nightly repack with macos-cross support"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(rust-nightly-macos)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 7200
-        env:
-            UPLOAD_DIR: artifacts
-    run:
-        using: toolchain-script
-        script: repack_rust.py
-        arguments: [
-            '--channel', 'nightly-2018-10-05',
-            '--host', 'x86_64-unknown-linux-gnu',
-            '--target', 'x86_64-unknown-linux-gnu',
-            '--target', 'x86_64-apple-darwin',
-        ]
-        toolchain-artifact: public/build/rustc.tar.xz
-
-linux64-rust-android-1.32:
-    description: "rust repack with android-cross support"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(rust-android)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 7200
-        env:
-            UPLOAD_DIR: artifacts
-    run:
-        using: toolchain-script
-        script: repack_rust.py
-        arguments: [
-            '--channel', '1.32.0',
-            '--host', 'x86_64-unknown-linux-gnu',
-            '--target', 'x86_64-unknown-linux-gnu',
-            '--target', 'armv7-linux-androideabi',
-            '--target', 'aarch64-linux-android',
-            '--target', 'i686-linux-android',
-            '--target', 'x86_64-linux-android',
-        ]
-        toolchain-alias: linux64-rust-android
-        toolchain-artifact: public/build/rustc.tar.xz
-
-linux64-sccache:
-    description: "sccache toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(sccache)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: build-sccache.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/sccache2.tar.xz
-    toolchains:
-        - linux64-rust-1.28
-        - linux64-binutils
-
-linux64-cbindgen:
-    description: "cbindgen toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(cbindgen)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: build-cbindgen.sh
-        arguments: ['x86_64-unknown-linux-gnu']
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/cbindgen.tar.xz
-    toolchains:
-        - linux64-rust-1.28
-
-linux64-rust-size:
-    description: "rust-size toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(rust-size)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: build-rust-size.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/rust-size.tar.xz
-    toolchains:
-        - linux64-rust-1.28
-
-linux64-grcov:
-    description: "grcov toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(grcov)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: build-grcov.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/grcov.tar.xz
-    toolchains:
-        - linux64-rust-1.28
-        - linux64-clang-7
-
-linux64-gn:
-    description: "gn toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(gn)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: build-gn-linux.sh
-        tooltool-downloads: public
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-            - 'taskcluster/scripts/misc/build-gn-common.sh'
-        toolchain-artifact: public/build/gn.tar.xz
-    run-on-projects:
-        - trunk
-        - try
-    toolchains:
-        - linux64-gcc-4.9
-
-linux64-tup:
-    description: "tup toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(tup)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 3600
-    run:
-        using: toolchain-script
-        script: build-tup-linux.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/tup.tar.xz
-    run-on-projects:
-        - trunk
-        - try
-    toolchains:
-        - linux64-gcc-4.9
-
-linux64-upx:
-    description: "UPX build for MinGW32 Cross Compile"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TMW(upx)
-        tier: 2
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: mingw32-build}
-        max-run-time: 3600
-    run:
-        using: toolchain-script
-        script: build-upx.sh
-        toolchain-artifact: public/build/upx.tar.xz
-
-linux64-wine:
-    description: "Wine build for MinGW32 Cross Compile"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TMW(wine)
-        tier: 2
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: mingw32-build}
-        max-run-time: 10800
-    run:
-        using: toolchain-script
-        script: build-wine.sh
-        toolchain-artifact: public/build/wine.tar.xz
-
-linux64-mingw32-gcc:
-    description: "GCC toolchain build for MinGW32 Cross Compile"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TMW(mingw32-gcc)
-        tier: 2
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: mingw32-build}
-        max-run-time: 10800
-    run:
-        using: toolchain-script
-        script: build-gcc-mingw32.sh
-        resources:
-            - 'build/unix/build-gcc/build-gcc.sh'
-        toolchain-artifact: public/build/mingw32.tar.xz
-    fetches:
-        fetch:
-            - binutils-2.27
-            - gcc-6.4.0
-            - gmp-5.1.3
-            - isl-0.15
-            - mpc-0.8.2
-            - mpfr-3.1.5
-
-linux64-mingw32-nsis:
-    description: "NSIS build for MinGW32 Cross Compile"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TMW(mingw32-nsis)
-        tier: 2
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: mingw32-build}
-        max-run-time: 3600
-    run:
-        using: toolchain-script
-        script: build-mingw32-nsis.sh
-        resources:
-            - 'build/unix/build-gcc/build-gcc.sh'
-            - 'taskcluster/scripts/misc/build-gcc-mingw32.sh'
-        toolchain-artifact: public/build/nsis.tar.xz
-    toolchains:
-        - linux64-mingw32-gcc
-
-linux64-mingw-fxc2-x86:
-    description: "fxc2.exe x86 build for MinGW Cross Compile"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TMW(mingw-fxc2-x86)
-        tier: 2
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: mingw32-build}
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: build-mingw-fxc2-x86.sh
-        resources:
-            - 'build/build-clang/build-clang.py'
-            - 'build/build-clang/clang-trunk-mingw.json'
-            - 'taskcluster/scripts/misc/build-clang-trunk-mingw.sh'
-        toolchain-artifact: public/build/fxc2.tar.xz
-    toolchains:
-        - linux64-clang-trunk-mingw-x86
-
-linux64-custom-v8:
-    description: "Custom v8 build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(custom-v8)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: custom-v8}
-        max-run-time: 3600
-    run:
-        using: toolchain-script
-        script: build-custom-v8.sh
-        arguments: [
-            d8.zip,
-            is_debug=false,
-            target_cpu="x64"
-        ]
-        toolchain-artifact: public/build/d8.zip
-
-wrench-deps:
-    description: "Downloads all the crates needed for building wrench"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: WR(wrench-deps)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: webrender}
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: wrench-deps-vendoring.sh
-        sparse-profile: null  # need all of gfx/wr checked out for this script
-        resources:
-            - 'gfx/wr/Cargo.lock'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/wrench-deps.tar.bz2
-    toolchains:
-        - linux64-rust-1.32  # whatever m-c is built with
-
-linux64-minidump-stackwalk:
-    description: "minidump_stackwalk toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TL(stackwalk)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: build-minidump-stackwalk.sh
-        sparse-profile: null
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/minidump_stackwalk.tar.xz
-    toolchains:
-        - linux64-clang-7
-        - linux64-binutils
-        - linux64-rust-1.31
deleted file mode 100644
--- a/taskcluster/ci/toolchain/macosx.yml
+++ /dev/null
@@ -1,211 +0,0 @@
-# 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/.
-
-job-defaults:
-    worker:
-        docker-image: {in-tree: toolchain-build}
-    run-on-projects:
-        - trunk
-        - try
-
-macosx64-clang:
-    description: "Clang toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TM(clang)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux-large
-    worker:
-        max-run-time: 3600
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
-    run:
-        using: toolchain-script
-        script: build-clang-macosx.sh
-        tooltool-downloads: internal
-        resources:
-            - 'build/build-clang/build-clang.py'
-            - 'build/build-clang/clang-7-macosx64.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/clang.tar.xz
-    toolchains:
-        - linux64-cctools-port
-        - linux64-clang-7
-        - linux64-gcc-4.9
-        - linux64-node
-
-macosx64-clang-tidy:
-    description: "Clang-tidy build"
-    index:
-        product: static-analysis
-        job-name: macosx64-clang-tidy
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TM(clang-tidy)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux-large
-    worker:
-        max-run-time: 3600
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
-    run:
-        using: toolchain-script
-        script: build-clang-tidy-macosx.sh
-        tooltool-downloads: internal
-        resources:
-            - 'build/clang-plugin/**/*.cpp'
-            - 'build/clang-plugin/**/*.h'
-            - 'build/clang-plugin/*.inc'
-            - 'build/clang-plugin/*.py'
-            - 'build/clang-plugin/moz.build'
-            - 'build/clang-plugin/Makefile.in'
-            - 'build/build-clang/build-clang.py'
-            - 'build/build-clang/clang-tidy-macosx64.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/clang-tidy.tar.xz
-    toolchains:
-        - linux64-cctools-port
-        - linux64-clang-7
-        - linux64-gcc-4.9
-        - linux64-node
-
-macosx64-cctools-port:
-    description: "cctools-port toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TM(cctools)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 1800
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
-    run:
-        using: toolchain-script
-        script: build-cctools-port-macosx.sh
-        tooltool-downloads: internal
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/cctools.tar.bz2
-    toolchains:
-        - linux64-cctools-port
-        - linux64-clang-7
-        - linux64-node
-
-macosx64-gn:
-    description: "gn toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TM(gn)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 1800
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
-    run:
-        using: toolchain-script
-        script: build-gn-macosx.sh
-        tooltool-downloads: internal
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-            - 'taskcluster/scripts/misc/build-gn-common.sh'
-        toolchain-artifact: public/build/gn.tar.xz
-    toolchains:
-        - linux64-cctools-port
-        - linux64-clang-7
-        - linux64-node
-
-macosx64-node:
-    description: "Node repack toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TM(node)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: toolchain-build}
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: repack-node.sh
-        arguments: ['macosx64']
-        toolchain-artifact: public/build/node.tar.xz
-
-macosx64-grcov:
-    description: "grcov toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TM(grcov)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: build-grcov.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/grcov.tar.xz
-    toolchains:
-        - linux64-rust-1.28
-        - linux64-clang-7
-
-macosx64-cbindgen:
-    description: "cbindgen toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TM(cbindgen)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 3600
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
-    run:
-        using: toolchain-script
-        script: build-cbindgen.sh
-        arguments: ['x86_64-apple-darwin']
-        tooltool-downloads: internal
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/cbindgen.tar.xz
-    toolchains:
-        - linux64-cctools-port
-        - linux64-clang-7
-        - linux64-llvm-dsymutil
-        - linux64-rust-macos-1.31
-
-macosx64-minidump-stackwalk:
-    description: "minidump_stackwalk toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TM(stackwalk)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        max-run-time: 1800
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
-    run:
-        using: toolchain-script
-        script: build-minidump-stackwalk.sh
-        sparse-profile: null
-        arguments: ['macosx64']
-        tooltool-downloads: internal
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/minidump_stackwalk.tar.xz
-    toolchains:
-        - linux64-cctools-port
-        - linux64-clang-7
-        - linux64-rust-macos-1.31
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/mingw.yml
@@ -0,0 +1,79 @@
+# 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/.
+
+job-defaults:
+    treeherder:
+        tier: 2
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        docker-image: {in-tree: mingw32-build}
+        max-run-time: 3600
+
+linux64-upx:
+    description: "UPX build for MinGW32 Cross Compile"
+    treeherder:
+        symbol: TMW(upx)
+    run:
+        script: build-upx.sh
+        toolchain-artifact: public/build/upx.tar.xz
+
+linux64-wine:
+    description: "Wine build for MinGW32 Cross Compile"
+    treeherder:
+        symbol: TMW(wine)
+    worker:
+        max-run-time: 10800
+    run:
+        script: build-wine.sh
+        toolchain-artifact: public/build/wine.tar.xz
+
+linux64-mingw32-gcc:
+    description: "GCC toolchain build for MinGW32 Cross Compile"
+    treeherder:
+        symbol: TMW(mingw32-gcc)
+    worker:
+        max-run-time: 10800
+    run:
+        script: build-gcc-mingw32.sh
+        resources:
+            - 'build/unix/build-gcc/build-gcc.sh'
+        toolchain-artifact: public/build/mingw32.tar.xz
+    fetches:
+        fetch:
+            - binutils-2.27
+            - gcc-6.4.0
+            - gmp-5.1.3
+            - isl-0.15
+            - mpc-0.8.2
+            - mpfr-3.1.5
+
+linux64-mingw32-nsis:
+    description: "NSIS build for MinGW32 Cross Compile"
+    treeherder:
+        symbol: TMW(mingw32-nsis)
+    run:
+        script: build-mingw32-nsis.sh
+        resources:
+            - 'build/unix/build-gcc/build-gcc.sh'
+            - 'taskcluster/scripts/misc/build-gcc-mingw32.sh'
+        toolchain-artifact: public/build/nsis.tar.xz
+    toolchains:
+        - linux64-mingw32-gcc
+
+linux64-mingw-fxc2-x86:
+    description: "fxc2.exe x86 build for MinGW Cross Compile"
+    treeherder:
+        symbol: TMW(mingw-fxc2-x86)
+    worker:
+        max-run-time: 1800
+    run:
+        using: toolchain-script
+        script: build-mingw-fxc2-x86.sh
+        resources:
+            - 'build/build-clang/build-clang.py'
+            - 'build/build-clang/clang-trunk-mingw.json'
+            - 'taskcluster/scripts/misc/build-clang-trunk-mingw.sh'
+        toolchain-artifact: public/build/fxc2.tar.xz
+    toolchains:
+        - linux64-clang-trunk-mingw-x86
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/minidump_stackwalk.yml
@@ -0,0 +1,51 @@
+# 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/.
+
+job-defaults:
+    description: "minidump_stackwalk toolchain build"
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 1800
+    run:
+        script: build-minidump-stackwalk.sh
+        sparse-profile: null
+        resources:
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-artifact: public/build/minidump_stackwalk.tar.xz
+    run-on-projects:
+        - trunk
+        - try
+
+linux64-minidump-stackwalk:
+    treeherder:
+        symbol: TL(stackwalk)
+    toolchains:
+        - linux64-clang-7
+        - linux64-binutils
+        - linux64-rust-1.31
+
+macosx64-minidump-stackwalk:
+    treeherder:
+        symbol: TM(stackwalk)
+    worker:
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
+    run:
+        arguments: ['macosx64']
+        tooltool-downloads: internal
+    toolchains:
+        - linux64-cctools-port
+        - linux64-clang-7
+        - linux64-rust-macos-1.31
+
+win32-minidump-stackwalk:
+    treeherder:
+        symbol: TW32(stackwalk)
+    worker:
+        docker-image: {in-tree: mingw32-build}
+    run:
+        arguments: ['mingw32']
+    toolchains:
+        - linux64-clang-trunk-mingw-x86
+        - mingw32-rust-1.31
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/misc.yml
@@ -0,0 +1,120 @@
+# 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/.
+
+job-defaults:
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 1800
+
+linux64-infer:
+    description: "infer build"
+    index:
+        product: static-analysis
+        job-name: linux64-infer
+    treeherder:
+        symbol: TL(infer)
+    worker:
+        docker-image: {in-tree: static-analysis-build}
+        max-run-time: 3600
+    run:
+        script: build-infer-linux.sh
+        resources:
+            - 'build/build-infer/build-infer.py'
+            - 'build/build-infer/infer-linux64.json'
+        toolchain-artifact: public/build/infer.tar.xz
+
+linux64-llvm-dsymutil:
+    description: "llvm-dsymutil toolchain build"
+    treeherder:
+        symbol: TL(dsymutil)
+    run:
+        script: build-llvm-dsymutil.sh
+        toolchain-artifact: public/build/llvm-dsymutil.tar.xz
+    toolchains:
+        - linux64-gcc-4.9
+
+linux64-binutils:
+    description: "Binutils toolchain build"
+    treeherder:
+        symbol: TL(binutil)
+    worker:
+        max-run-time: 3600
+    run:
+        script: build-binutils-linux.sh
+        resources:
+            - 'build/unix/build-binutils/build-binutils.sh'
+        toolchain-artifact: public/build/binutils.tar.xz
+    fetches:
+        fetch:
+            - binutils-2.31.1
+
+linux64-hfsplus:
+    description: "hfsplus toolchain build"
+    treeherder:
+        symbol: TL(hfs+)
+    run:
+        script: build-hfsplus-linux.sh
+        resources:
+            - 'build/unix/build-hfsplus/build-hfsplus.sh'
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-artifact: public/build/hfsplus-tools.tar.xz
+    toolchains:
+        - linux64-clang-7
+
+linux64-libdmg:
+    description: "libdmg-hfsplus toolchain build"
+    treeherder:
+        symbol: TL(libdmg-hfs+)
+    run:
+        script: build-libdmg-hfsplus.sh
+        toolchain-artifact: public/build/dmg.tar.xz
+
+linux64-tup:
+    description: "tup toolchain build"
+    treeherder:
+        symbol: TL(tup)
+    worker:
+        max-run-time: 3600
+    run:
+        script: build-tup-linux.sh
+        resources:
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-artifact: public/build/tup.tar.xz
+    run-on-projects:
+        - trunk
+        - try
+    toolchains:
+        - linux64-gcc-4.9
+
+linux64-custom-v8:
+    description: "Custom v8 build"
+    treeherder:
+        symbol: TL(custom-v8)
+    worker:
+        docker-image: {in-tree: custom-v8}
+        max-run-time: 3600
+    run:
+        script: build-custom-v8.sh
+        arguments: [
+            d8.zip,
+            is_debug=false,
+            target_cpu="x64"
+        ]
+        toolchain-artifact: public/build/d8.zip
+
+wrench-deps:
+    description: "Downloads all the crates needed for building wrench"
+    treeherder:
+        symbol: WR(wrench-deps)
+    worker:
+        docker-image: {in-tree: webrender}
+    run:
+        script: wrench-deps-vendoring.sh
+        sparse-profile: null  # need all of gfx/wr checked out for this script
+        resources:
+            - 'gfx/wr/Cargo.lock'
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-artifact: public/build/wrench-deps.tar.bz2
+    toolchains:
+        - linux64-rust-1.32  # whatever m-c is built with
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/node.yml
@@ -0,0 +1,36 @@
+# 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/.
+
+job-defaults:
+    description: "Node repack toolchain build"
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 1800
+    run:
+        script: repack-node.sh
+        toolchain-artifact: public/build/node.tar.xz
+
+linux64-node:
+    treeherder:
+        symbol: TL(node)
+    run:
+        arguments: ['linux64']
+
+macosx64-node:
+    treeherder:
+        symbol: TM(node)
+    worker:
+        max-run-time: 1800
+    run-on-projects:
+        - trunk
+        - try
+    run:
+        arguments: ['macosx64']
+
+win64-node:
+    treeherder:
+        symbol: TW64(node)
+    run:
+        arguments: ['win64']
+        toolchain-artifact: public/build/node.tar.bz2
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/rust-size.yml
@@ -0,0 +1,33 @@
+# 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/.
+
+job-defaults:
+    description: "rust-size toolchain build"
+    worker:
+        max-run-time: 1800
+    run:
+        script: build-rust-size.sh
+        resources:
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+
+linux64-rust-size:
+    treeherder:
+        symbol: TL(rust-size)
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    run:
+        toolchain-artifact: public/build/rust-size.tar.xz
+    toolchains:
+        - linux64-rust-1.28
+
+win64-rust-size:
+    treeherder:
+        symbol: TW64(rust-size)
+    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
+    worker:
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/sccache-build.manifest"
+    run:
+        toolchain-artifact: public/build/rust-size.tar.bz2
+    toolchains:
+        - win64-rust-1.28
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/rust.yml
@@ -0,0 +1,192 @@
+# 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/.
+
+job-defaults:
+    description: "rust repack"
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 7200
+        env:
+            UPLOAD_DIR: artifacts
+    run:
+        script: repack_rust.py
+        toolchain-artifact: public/build/rustc.tar.xz
+
+linux64-rust-1.28:
+    treeherder:
+        symbol: TL(rust-1.28)
+    run:
+        arguments: [
+            '--channel', '1.28.0',
+            '--host', 'x86_64-unknown-linux-gnu',
+            '--target', 'x86_64-unknown-linux-gnu',
+            '--target', 'i686-unknown-linux-gnu',
+        ]
+
+linux64-rust-1.31:
+    treeherder:
+        symbol: TL(rust-1.31)
+    run:
+        arguments: [
+            '--channel', '1.31.0',
+            '--host', 'x86_64-unknown-linux-gnu',
+            '--target', 'x86_64-unknown-linux-gnu',
+            '--target', 'i686-unknown-linux-gnu',
+        ]
+
+linux64-rust-1.32:
+    treeherder:
+        symbol: TL(rust)
+    run:
+        arguments: [
+            '--channel', '1.32.0',
+            '--host', 'x86_64-unknown-linux-gnu',
+            '--target', 'x86_64-unknown-linux-gnu',
+            '--target', 'i686-unknown-linux-gnu',
+        ]
+        toolchain-alias: linux64-rust
+
+linux64-rust-nightly:
+    description: "rust nightly repack"
+    treeherder:
+        symbol: TL(rust-nightly)
+    run:
+        arguments: [
+            '--channel', 'nightly-2018-10-05',
+            '--host', 'x86_64-unknown-linux-gnu',
+            '--target', 'x86_64-unknown-linux-gnu',
+            '--target', 'i686-unknown-linux-gnu',
+        ]
+
+linux64-rust-macos-1.31:
+    description: "rust repack with macos-cross support"
+    treeherder:
+        symbol: TL(rust-macos-1.31)
+    run:
+        arguments: [
+            '--channel', '1.31.0',
+            '--host', 'x86_64-unknown-linux-gnu',
+            '--target', 'x86_64-unknown-linux-gnu',
+            '--target', 'x86_64-apple-darwin',
+        ]
+
+linux64-rust-macos-1.32:
+    description: "rust repack with macos-cross support"
+    treeherder:
+        symbol: TL(rust-macos)
+    run:
+        arguments: [
+            '--channel', '1.32.0',
+            '--host', 'x86_64-unknown-linux-gnu',
+            '--target', 'x86_64-unknown-linux-gnu',
+            '--target', 'x86_64-apple-darwin',
+        ]
+        toolchain-alias: linux64-rust-macos
+
+linux64-rust-nightly-macos:
+    description: "rust nightly repack with macos-cross support"
+    treeherder:
+        symbol: TL(rust-nightly-macos)
+    run:
+        arguments: [
+            '--channel', 'nightly-2018-10-05',
+            '--host', 'x86_64-unknown-linux-gnu',
+            '--target', 'x86_64-unknown-linux-gnu',
+            '--target', 'x86_64-apple-darwin',
+        ]
+
+linux64-rust-android-1.32:
+    description: "rust repack with android-cross support"
+    treeherder:
+        symbol: TL(rust-android)
+    run:
+        arguments: [
+            '--channel', '1.32.0',
+            '--host', 'x86_64-unknown-linux-gnu',
+            '--target', 'x86_64-unknown-linux-gnu',
+            '--target', 'armv7-linux-androideabi',
+            '--target', 'aarch64-linux-android',
+            '--target', 'i686-linux-android',
+            '--target', 'x86_64-linux-android',
+        ]
+        toolchain-alias: linux64-rust-android
+
+win64-rust-1.28:
+    treeherder:
+        symbol: TW64(rust-1.28)
+    run:
+        arguments: [
+            '--channel', '1.28.0',
+            '--host', 'x86_64-pc-windows-msvc',
+            '--target', 'x86_64-pc-windows-msvc',
+            '--target', 'i686-pc-windows-msvc',
+        ]
+        toolchain-artifact: public/build/rustc.tar.bz2
+
+win64-rust-1.32:
+    treeherder:
+        symbol: TW64(rust)
+    run:
+        arguments: [
+            '--channel', '1.32.0',
+            '--host', 'x86_64-pc-windows-msvc',
+            '--target', 'x86_64-pc-windows-msvc',
+            '--target', 'i686-pc-windows-msvc',
+        ]
+        toolchain-alias: win64-rust
+        toolchain-artifact: public/build/rustc.tar.bz2
+
+win64-rust-nightly:
+    description: "rust nightly repack"
+    treeherder:
+        symbol: TW64(rust-nightly)
+    run:
+        arguments: [
+            '--channel', 'nightly-2018-10-05',
+            '--host', 'x86_64-pc-windows-msvc',
+            '--target', 'x86_64-pc-windows-msvc',
+            '--target', 'i686-pc-windows-msvc',
+        ]
+        toolchain-artifact: public/build/rustc.tar.bz2
+
+win64-aarch64-rust:
+    description: "rust repack with aarch64 support"
+    treeherder:
+        symbol: TW64(rust-aarch64)
+    run:
+        arguments: [
+            '--channel', '1.32.0',
+            '--host', 'x86_64-pc-windows-msvc',
+            '--target', 'x86_64-pc-windows-msvc',
+            '--target', 'aarch64-pc-windows-msvc',
+            '--target', 'i686-pc-windows-msvc',
+        ]
+        toolchain-artifact: public/build/rustc.tar.bz2
+
+mingw32-rust-1.31:
+    treeherder:
+        symbol: TMW(rust-1.31)
+    run:
+        arguments: [
+            '--channel', '1.31.0',
+            '--host', 'x86_64-unknown-linux-gnu',
+            '--target', 'i686-unknown-linux-gnu',
+            '--target', 'i686-pc-windows-gnu',
+            '--target', 'x86_64-pc-windows-gnu',
+            '--target', 'x86_64-unknown-linux-gnu',
+        ]
+
+mingw32-rust-1.32:
+    treeherder:
+        symbol: TMW(rust)
+    run:
+        arguments: [
+            '--channel', '1.32.0',
+            '--host', 'x86_64-unknown-linux-gnu',
+            '--target', 'i686-unknown-linux-gnu',
+            '--target', 'i686-pc-windows-gnu',
+            '--target', 'x86_64-pc-windows-gnu',
+            '--target', 'x86_64-unknown-linux-gnu',
+        ]
+        toolchain-alias: mingw32-rust
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/sccache.yml
@@ -0,0 +1,38 @@
+# 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/.
+
+job-defaults:
+    description: "sccache toolchain build"
+    treeherder:
+        symbol: TL(sccache)
+    run:
+        using: toolchain-script
+        script: build-sccache.sh
+        resources:
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+
+linux64-sccache:
+    treeherder:
+        symbol: TL(sccache)
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 1800
+    run:
+        toolchain-artifact: public/build/sccache2.tar.xz
+    toolchains:
+        - linux64-rust-1.28
+        - linux64-binutils
+
+win64-sccache:
+    treeherder:
+        symbol: TW64(sccache)
+    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
+    worker:
+        max-run-time: 3600
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/sccache-build.manifest"
+    run:
+        toolchain-artifact: public/build/sccache2.tar.bz2
+    toolchains:
+        - win64-rust-1.28
deleted file mode 100755
--- a/taskcluster/ci/toolchain/windows.yml
+++ /dev/null
@@ -1,387 +0,0 @@
-# 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/.
-
-win64-clang-cl:
-    description: "Clang-cl toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TW64(clang-cl)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
-    worker:
-        max-run-time: 7200
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/build-clang-cl.manifest"
-    run:
-        using: toolchain-script
-        script: build-clang64-windows.sh
-        resources:
-            - 'build/build-clang/build-clang.py'
-            - 'build/build-clang/clang-win64.json'
-            - 'taskcluster/scripts/misc/build-clang-windows-helper64.sh'
-        toolchain-artifact: public/build/clang.tar.bz2
-
-win32-clang-tidy:
-    description: "Clang-tidy toolchain build"
-    index:
-        product: static-analysis
-        job-name: win32-clang-tidy
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TW32(clang-tidy)
-        tier: 2
-    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
-    worker:
-        max-run-time: 7200
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/build-clang-cl.manifest"
-    run:
-        using: toolchain-script
-        script: build-clang-tidy32-windows.sh
-        resources:
-            - 'build/clang-plugin/**/*.cpp'
-            - 'build/clang-plugin/**/*.h'
-            - 'build/clang-plugin/*.inc'
-            - 'build/clang-plugin/*.py'
-            - 'build/clang-plugin/moz.build'
-            - 'build/clang-plugin/Makefile.in'
-            - 'build/build-clang/build-clang.py'
-            - 'build/build-clang/clang-tidy-win32.json'
-            - 'taskcluster/scripts/misc/build-clang-windows-helper32.sh'
-        toolchain-artifact: public/build/clang-tidy.tar.bz2
-    run-on-projects:
-        - trunk
-        - try
-
-win64-clang-tidy:
-    description: "Clang-tidy toolchain build"
-    index:
-        product: static-analysis
-        job-name: win64-clang-tidy
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TW64(clang-tidy)
-        tier: 2
-    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
-    worker:
-        max-run-time: 7200
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/build-clang-cl.manifest"
-    run:
-        using: toolchain-script
-        script: build-clang-tidy64-windows.sh
-        resources:
-            - 'build/clang-plugin/**/*.cpp'
-            - 'build/clang-plugin/**/*.h'
-            - 'build/clang-plugin/*.inc'
-            - 'build/clang-plugin/*.py'
-            - 'build/clang-plugin/moz.build'
-            - 'build/clang-plugin/Makefile.in'
-            - 'build/build-clang/build-clang.py'
-            - 'build/build-clang/clang-tidy-win32.json'
-            - 'taskcluster/scripts/misc/build-clang-windows-helper64.sh'
-        toolchain-artifact: public/build/clang-tidy.tar.bz2
-
-win64-rust-1.28:
-    description: "rust repack"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TW64(rust-1.28)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: toolchain-build}
-        max-run-time: 7200
-        env:
-            UPLOAD_DIR: artifacts
-    run:
-        using: toolchain-script
-        script: repack_rust.py
-        arguments: [
-            '--channel', '1.28.0',
-            '--host', 'x86_64-pc-windows-msvc',
-            '--target', 'x86_64-pc-windows-msvc',
-            '--target', 'i686-pc-windows-msvc',
-        ]
-        toolchain-artifact: public/build/rustc.tar.bz2
-
-win64-rust-1.32:
-    description: "rust repack"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TW64(rust)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: toolchain-build}
-        max-run-time: 7200
-        env:
-            UPLOAD_DIR: artifacts
-    run:
-        using: toolchain-script
-        script: repack_rust.py
-        arguments: [
-            '--channel', '1.32.0',
-            '--host', 'x86_64-pc-windows-msvc',
-            '--target', 'x86_64-pc-windows-msvc',
-            '--target', 'i686-pc-windows-msvc',
-        ]
-        toolchain-alias: win64-rust
-        toolchain-artifact: public/build/rustc.tar.bz2
-
-win64-rust-nightly:
-    description: "rust nightly repack"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TW64(rust-nightly)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: toolchain-build}
-        max-run-time: 7200
-        env:
-            UPLOAD_DIR: artifacts
-    run:
-        using: toolchain-script
-        script: repack_rust.py
-        arguments: [
-            '--channel', 'nightly-2018-10-05',
-            '--host', 'x86_64-pc-windows-msvc',
-            '--target', 'x86_64-pc-windows-msvc',
-            '--target', 'i686-pc-windows-msvc',
-        ]
-        toolchain-artifact: public/build/rustc.tar.bz2
-
-win64-aarch64-rust:
-    description: "rust repack with aarch64 support"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TW64(rust-aarch64)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: toolchain-build}
-        max-run-time: 7200
-        env:
-            UPLOAD_DIR: artifacts
-    run:
-        using: toolchain-script
-        script: repack_rust.py
-        arguments: [
-            '--channel', '1.32.0',
-            '--host', 'x86_64-pc-windows-msvc',
-            '--target', 'x86_64-pc-windows-msvc',
-            '--target', 'aarch64-pc-windows-msvc',
-            '--target', 'i686-pc-windows-msvc',
-        ]
-        toolchain-artifact: public/build/rustc.tar.bz2
-
-win64-node:
-    description: "Node repack toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TW64(node)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: toolchain-build}
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: repack-node.sh
-        arguments: ['win64']
-        toolchain-artifact: public/build/node.tar.bz2
-
-mingw32-rust-1.31:
-    description: "rust repack"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TMW(rust-1.31)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: toolchain-build}
-        max-run-time: 7200
-        env:
-            UPLOAD_DIR: artifacts
-    run:
-        using: toolchain-script
-        script: repack_rust.py
-        arguments: [
-            '--channel', '1.31.0',
-            '--host', 'x86_64-unknown-linux-gnu',
-            '--target', 'i686-unknown-linux-gnu',
-            '--target', 'i686-pc-windows-gnu',
-            '--target', 'x86_64-pc-windows-gnu',
-            '--target', 'x86_64-unknown-linux-gnu',
-        ]
-        toolchain-artifact: public/build/rustc.tar.xz
-
-mingw32-rust-1.32:
-    description: "rust repack"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TMW(rust)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: toolchain-build}
-        max-run-time: 7200
-        env:
-            UPLOAD_DIR: artifacts
-    run:
-        using: toolchain-script
-        script: repack_rust.py
-        arguments: [
-            '--channel', '1.32.0',
-            '--host', 'x86_64-unknown-linux-gnu',
-            '--target', 'i686-unknown-linux-gnu',
-            '--target', 'i686-pc-windows-gnu',
-            '--target', 'x86_64-pc-windows-gnu',
-            '--target', 'x86_64-unknown-linux-gnu',
-        ]
-        toolchain-alias: mingw32-rust
-        toolchain-artifact: public/build/rustc.tar.xz
-
-win64-sccache:
-    description: "sccache toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TW64(sccache)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
-    worker:
-        max-run-time: 3600
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/sccache-build.manifest"
-    run:
-        using: toolchain-script
-        script: build-sccache.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/sccache2.tar.bz2
-    toolchains:
-        - win64-rust-1.28
-
-win64-cbindgen:
-    description: "cbindgen toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TW64(cbindgen)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
-    worker:
-        max-run-time: 3600
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/sccache-build.manifest"
-    run:
-        using: toolchain-script
-        script: build-cbindgen.sh
-        arguments: ['x86_64-pc-windows-msvc']
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/cbindgen.tar.bz2
-    toolchains:
-        - win64-rust-1.28
-
-win64-rust-size:
-    description: "rust-size toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TW64(rust-size)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
-    worker:
-        max-run-time: 1800
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/sccache-build.manifest"
-    run:
-        using: toolchain-script
-        script: build-rust-size.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/rust-size.tar.bz2
-    toolchains:
-        - win64-rust-1.28
-
-win64-grcov:
-    description: "grcov toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TW64(grcov)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
-    worker:
-        max-run-time: 1800
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/sccache-build.manifest"
-    run:
-        using: toolchain-script
-        script: build-grcov.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/grcov.tar.bz2
-    toolchains:
-        - win64-rust-1.28
-        - win64-clang-cl
-
-win32-gn:
-    description: "gn toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TW32(gn)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
-    worker:
-        max-run-time: 3600
-        env:
-            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/gn-build.manifest"
-    run:
-        using: toolchain-script
-        script: build-gn-win32.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-            - 'taskcluster/scripts/misc/build-gn-common.sh'
-        toolchain-artifact: public/build/gn.tar.bz2
-    run-on-projects:
-        - trunk
-        - try
-
-win32-minidump-stackwalk:
-    description: "minidump_stackwalk toolchain build"
-    treeherder:
-        kind: build
-        platform: toolchains/opt
-        symbol: TW32(stackwalk)
-        tier: 1
-    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
-    worker:
-        docker-image: {in-tree: mingw32-build}
-        max-run-time: 1800
-    run:
-        using: toolchain-script
-        script: build-minidump-stackwalk.sh
-        sparse-profile: null
-        arguments: ['mingw32']
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/minidump_stackwalk.tar.xz
-    toolchains:
-        - linux64-clang-trunk-mingw-x86
-        - mingw32-rust-1.31
--- a/taskcluster/taskgraph/transforms/job/toolchain.py
+++ b/taskcluster/taskgraph/transforms/job/toolchain.py
@@ -109,16 +109,19 @@ toolchain_defaults = {
 @run_job_using("docker-worker", "toolchain-script",
                schema=toolchain_run_schema, defaults=toolchain_defaults)
 def docker_worker_toolchain(config, job, taskdesc):
     run = job['run']
 
     worker = taskdesc['worker']
     worker['chain-of-trust'] = True
 
+    # If the task doesn't have a docker-image, set a default
+    worker.setdefault('docker-image', {'in-tree': 'toolchain-build'})
+
     # Allow the job to specify where artifacts come from, but add
     # public/build if it's not there already.
     artifacts = worker.setdefault('artifacts', [])
     if not any(artifact.get('name') == 'public/build' for artifact in artifacts):
         docker_worker_add_artifacts(config, job, taskdesc)
 
     support_vcs_checkout(config, job, taskdesc, sparse=True)
 
--- a/testing/mozbase/mozprofile/tests/test_preferences.py
+++ b/testing/mozbase/mozprofile/tests/test_preferences.py
@@ -120,26 +120,26 @@ browser.startup.homepage = http://github
 
 def test_ini_keep_case(compare_generated):
     """
     Read a preferences config file with a preference in camel-case style.
     Check that the read preference name has not been lower-cased
     """
     # write the .ini file
     _ini = """[DEFAULT]
-general.warnOnAboutConfig = False
+network.dns.disableIPv6 = True
 """
     try:
         fd, name = tempfile.mkstemp(suffix='.ini', text=True)
         os.write(fd, _ini.encode())
         os.close(fd)
         commandline = ["--preferences", name]
 
         # test the [DEFAULT] section
-        _prefs = {'general.warnOnAboutConfig': 'False'}
+        _prefs = {'network.dns.disableIPv6': 'True'}
         compare_generated(_prefs, commandline)
 
     finally:
         # cleanup
         os.remove(name)
 
 
 def test_reset_should_remove_added_prefs():
--- a/toolkit/content/tests/browser/browser_saveImageURL.js
+++ b/toolkit/content/tests/browser/browser_saveImageURL.js
@@ -31,31 +31,31 @@ add_task(async function preferred_API() 
     gBrowser,
     url: IMAGE_PAGE,
   }, async function(browser) {
     let url = await ContentTask.spawn(browser, null, async function() {
       let image = content.document.getElementById("image");
       return image.href;
     });
 
+    let filePickerPromise = waitForFilePicker();
     saveImageURL(url, "image.jpg", null, true, false, null, null, null, null,
       false, gBrowser.contentPrincipal);
     await ContentTask.spawn(gBrowser.selectedBrowser, null, async () => {
       let channel = docShell.currentDocumentChannel;
       if (channel) {
         todo(channel.QueryInterface(Ci.nsIHttpChannelInternal)
                     .channelIsForDownload);
 
         // Throttleable is the only class flag assigned to downloads.
         todo(channel.QueryInterface(Ci.nsIClassOfService).classFlags ==
              Ci.nsIClassOfService.Throttleable);
       }
     });
-
-    await waitForFilePicker();
+    await filePickerPromise;
   });
 });
 
 /**
  * Test that saveImageURL will still work when passed a document instead
  * of the aIsContentWindowPrivate argument. This is the deprecated API, and
  * will not work in apps using remote browsers having PREF_UNSAFE_FORBIDDEN
  * set to true.
@@ -84,12 +84,13 @@ add_task(async function deprecated_API()
         todo(channel.QueryInterface(Ci.nsIHttpChannelInternal)
                     .channelIsForDownload);
 
         // Throttleable is the only class flag assigned to downloads.
         todo(channel.QueryInterface(Ci.nsIClassOfService).classFlags ==
              Ci.nsIClassOfService.Throttleable);
       }
     });
+    let filePickerPromise = waitForFilePicker();
     saveImageURL(url, "image.jpg", null, true, false, null, doc, null, null);
-    await waitForFilePicker();
+    await filePickerPromise;
   });
 });
--- a/toolkit/content/widgets/autocomplete-richlistitem.js
+++ b/toolkit/content/widgets/autocomplete-richlistitem.js
@@ -78,26 +78,26 @@ MozElements.MozAutocompleteRichlistitem 
       "type",
     ];
   }
 
   get inheritedAttributeMap() {
     if (!this.__inheritedAttributeMap) {
       this.__inheritedAttributeMap = new Map([
         [ this.querySelector(".ac-type-icon"), [ "selected", "current", "type" ] ],
-      [ this.querySelector(".ac-site-icon"), [ "src=image", "selected", "type" ] ],
-      [ this.querySelector(".ac-title"), [ "selected" ] ],
-      [ this.querySelector(".ac-title-text"), [ "selected" ] ],
-      [ this.querySelector(".ac-tags"), [ "selected" ] ],
-      [ this.querySelector(".ac-tags-text"), [ "selected" ] ],
-      [ this.querySelector(".ac-separator"), [ "selected", "actiontype", "type" ] ],
-      [ this.querySelector(".ac-url"), [ "selected", "actiontype" ] ],
-      [ this.querySelector(".ac-url-text"), [ "selected" ] ],
-      [ this.querySelector(".ac-action"), [ "selected", "actiontype" ] ],
-      [ this.querySelector(".ac-action-text"), [ "selected" ] ],
+        [ this.querySelector(".ac-site-icon"), [ "src=image", "selected", "type" ] ],
+        [ this.querySelector(".ac-title"), [ "selected" ] ],
+        [ this.querySelector(".ac-title-text"), [ "selected" ] ],
+        [ this.querySelector(".ac-tags"), [ "selected" ] ],
+        [ this.querySelector(".ac-tags-text"), [ "selected" ] ],
+        [ this.querySelector(".ac-separator"), [ "selected", "actiontype", "type" ] ],
+        [ this.querySelector(".ac-url"), [ "selected", "actiontype" ] ],
+        [ this.querySelector(".ac-url-text"), [ "selected" ] ],
+        [ this.querySelector(".ac-action"), [ "selected", "actiontype" ] ],
+        [ this.querySelector(".ac-action-text"), [ "selected" ] ],
       ]);
     }
     return this.__inheritedAttributeMap;
   }
 
   attributeChangedCallback(name, oldValue, newValue) {
     if (this.isConnectedAndReady && oldValue != newValue &&
         this.constructor.observedAttributes.includes(name)) {
@@ -123,17 +123,17 @@ MozElements.MozAutocompleteRichlistitem 
         </description>
       </hbox>
       <hbox class="ac-tags" align="center">
         <description class="ac-text-overflow-container">
           <description class="ac-tags-text"></description>
         </description>
       </hbox>
       <hbox class="ac-separator" align="center">
-        <description class="ac-separator-text"></description>
+        <description class="ac-separator-text" value="—"></description>
       </hbox>
       <hbox class="ac-url" align="center">
         <description class="ac-text-overflow-container">
           <description class="ac-url-text"></description>
         </description>
       </hbox>
       <hbox class="ac-action" align="center">
         <description class="ac-text-overflow-container">
@@ -979,17 +979,17 @@ class MozAutocompleteRichlistitemInsecur
         </description>
       </vbox>
       <hbox class="ac-tags" align="center">
         <description class="ac-text-overflow-container">
           <description class="ac-tags-text"></description>
         </description>
       </hbox>
       <hbox class="ac-separator" align="center">
-        <description class="ac-separator-text"></description>
+        <description class="ac-separator-text" value="—"></description>
       </hbox>
       <hbox class="ac-url" align="center">
         <description class="ac-text-overflow-container">
           <description class="ac-url-text"></description>
         </description>
       </hbox>
       <hbox class="ac-action" align="center">
         <description class="ac-text-overflow-container">
--- a/uriloader/base/nsDocLoader.cpp
+++ b/uriloader/base/nsDocLoader.cpp
@@ -635,18 +635,18 @@ void nsDocLoader::DocLoaderIsEmpty(bool 
       nsCOMPtr<mozilla::dom::Document> doc =
           do_GetInterface(GetAsSupports(this));
       if (doc) {
         // We start loads from style resolution, so we need to flush out style
         // no matter what.  If we have user fonts, we also need to flush layout,
         // since the reflow is what starts font loads.
         mozilla::FlushType flushType = mozilla::FlushType::Style;
         // Be safe in case this presshell is in teardown now
-        nsPresContext* presContext = doc->GetPresContext();
-        if (presContext && presContext->GetUserFontSet()) {
+        doc->FlushUserFontSet();
+        if (doc->GetUserFontSet()) {
           flushType = mozilla::FlushType::Layout;
         }
         mDontFlushLayout = mIsFlushingLayout = true;
         doc->FlushPendingNotifications(flushType);
         mDontFlushLayout = mIsFlushingLayout = false;
       }
     }
 
--- a/xpcom/threads/SchedulerGroup.cpp
+++ b/xpcom/threads/SchedulerGroup.cpp
@@ -262,23 +262,16 @@ nsresult SchedulerGroup::LabeledDispatch
 SchedulerGroup::Runnable::Runnable(already_AddRefed<nsIRunnable>&& aRunnable,
                                    SchedulerGroup* aGroup,
                                    dom::DocGroup* aDocGroup)
     : mozilla::Runnable("SchedulerGroup::Runnable"),
       mRunnable(std::move(aRunnable)),
       mGroup(aGroup),
       mDocGroup(aDocGroup) {}
 
-bool SchedulerGroup::Runnable::GetAffectedSchedulerGroups(
-    SchedulerGroupSet& aGroups) {
-  aGroups.Clear();
-  aGroups.Put(Group());
-  return true;
-}
-
 dom::DocGroup* SchedulerGroup::Runnable::DocGroup() const { return mDocGroup; }
 
 #ifdef MOZ_COLLECTING_RUNNABLE_TELEMETRY
 NS_IMETHODIMP
 SchedulerGroup::Runnable::GetName(nsACString& aName) {
   // Try to get a name from the underlying runnable.
   nsCOMPtr<nsINamed> named = do_QueryInterface(mRunnable);
   if (named) {
@@ -309,10 +302,10 @@ SchedulerGroup::Runnable::Run() {
 NS_IMETHODIMP
 SchedulerGroup::Runnable::GetPriority(uint32_t* aPriority) {
   *aPriority = nsIRunnablePriority::PRIORITY_NORMAL;
   nsCOMPtr<nsIRunnablePriority> runnablePrio = do_QueryInterface(mRunnable);
   return runnablePrio ? runnablePrio->GetPriority(aPriority) : NS_OK;
 }
 
 NS_IMPL_ISUPPORTS_INHERITED(SchedulerGroup::Runnable, mozilla::Runnable,
-                            nsIRunnablePriority, nsILabelableRunnable,
+                            nsIRunnablePriority,
                             SchedulerGroup::Runnable)
--- a/xpcom/threads/SchedulerGroup.h
+++ b/xpcom/threads/SchedulerGroup.h
@@ -10,17 +10,16 @@
 #include "mozilla/AbstractEventQueue.h"
 #include "mozilla/AlreadyAddRefed.h"
 #include "mozilla/LinkedList.h"
 #include "mozilla/Queue.h"
 #include "mozilla/TaskCategory.h"
 #include "mozilla/ThreadLocal.h"
 #include "mozilla/TimeStamp.h"
 #include "nsCOMPtr.h"
-#include "nsILabelableRunnable.h"
 #include "nsISupportsImpl.h"
 #include "nsThreadUtils.h"
 
 class nsIEventTarget;
 class nsIRunnable;
 class nsISerialEventTarget;
 
 namespace mozilla {
@@ -93,24 +92,21 @@ class SchedulerGroup : public LinkedList
   // queue. Returns whether the SchedulerGroup is still in a queue after
   // DequeueEvent() returns.
   DequeueStatus DequeueEvent() {
     mEventCount--;
     return mEventCount == 0 ? NoLongerQueued : StillQueued;
   }
 
   class Runnable final : public mozilla::Runnable,
-                         public nsIRunnablePriority,
-                         public nsILabelableRunnable {
+                         public nsIRunnablePriority {
    public:
     Runnable(already_AddRefed<nsIRunnable>&& aRunnable, SchedulerGroup* aGroup,
              dom::DocGroup* aDocGroup);
 
-    bool GetAffectedSchedulerGroups(SchedulerGroupSet& aGroups) override;
-
     SchedulerGroup* Group() const { return mGroup; }
     dom::DocGroup* DocGroup() const;
 
 #ifdef MOZ_COLLECTING_RUNNABLE_TELEMETRY
     NS_IMETHOD GetName(nsACString& aName) override;
 #endif
 
     bool IsBackground() const { return mGroup->IsBackground(); }
--- a/xpcom/threads/moz.build
+++ b/xpcom/threads/moz.build
@@ -25,17 +25,16 @@ XPIDL_MODULE = 'xpcom_threads'
 XPCOM_MANIFESTS += [
     'components.conf',
 ]
 
 EXPORTS += [
     'MainThreadUtils.h',
     'nsICancelableRunnable.h',
     'nsIIdleRunnable.h',
-    'nsILabelableRunnable.h',
     'nsMemoryPressure.h',
     'nsProcess.h',
     'nsProxyRelease.h',
     'nsThread.h',
     'nsThreadManager.h',
     'nsThreadPool.h',
     'nsThreadUtils.h',
 ]
@@ -84,17 +83,16 @@ UNIFIED_SOURCES += [
     'AbstractThread.cpp',
     'BlockingResourceBase.cpp',
     'CPUUsageWatcher.cpp',
     'EventQueue.cpp',
     'InputEventStatistics.cpp',
     'LazyIdleThread.cpp',
     'MainThreadIdlePeriod.cpp',
     'nsEnvironment.cpp',
-    'nsILabelableRunnable.cpp',
     'nsMemoryPressure.cpp',
     'nsProcessCommon.cpp',
     'nsProxyRelease.cpp',
     'nsThread.cpp',
     'nsThreadManager.cpp',
     'nsThreadPool.cpp',
     'nsThreadUtils.cpp',
     'nsTimerImpl.cpp',
deleted file mode 100644
--- a/xpcom/threads/nsILabelableRunnable.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsILabelableRunnable.h"
-
-#include "mozilla/SchedulerGroup.h"
-
-bool nsILabelableRunnable::IsReadyToRun() {
-  SchedulerGroupSet groups;
-  if (!GetAffectedSchedulerGroups(groups)) {
-    // it can not be labeled right now.
-    return false;
-  }
-
-  if (groups.mSingle) {
-    MOZ_ASSERT(groups.mMulti.isNothing());
-    return !groups.mSingle->IsRunning();
-  }
-
-  if (groups.mMulti.isSome()) {
-    MOZ_ASSERT(!groups.mSingle);
-    for (auto iter = groups.mMulti.ref().ConstIter(); !iter.Done();
-         iter.Next()) {
-      if (iter.Get()->GetKey()->IsRunning()) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  // No affected groups if we are here. Then, it's ready to run.
-  return true;
-}
-
-void nsILabelableRunnable::SchedulerGroupSet::Put(
-    mozilla::SchedulerGroup* aGroup) {
-  if (mSingle) {
-    MOZ_ASSERT(mMulti.isNothing());
-    mMulti.emplace();
-    auto& multi = mMulti.ref();
-    multi.PutEntry(mSingle);
-    multi.PutEntry(aGroup);
-    mSingle = nullptr;
-    return;
-  }
-
-  if (mMulti.isSome()) {
-    MOZ_ASSERT(!mSingle);
-    mMulti.ref().PutEntry(aGroup);
-    return;
-  }
-
-  mSingle = aGroup;
-}
-
-void nsILabelableRunnable::SchedulerGroupSet::Clear() {
-  mSingle = nullptr;
-  mMulti.reset();
-}
-
-void nsILabelableRunnable::SchedulerGroupSet::SetIsRunning(bool aIsRunning) {
-  if (mSingle) {
-    MOZ_ASSERT(mMulti.isNothing());
-    mSingle->SetIsRunning(aIsRunning);
-    return;
-  }
-
-  if (mMulti.isSome()) {
-    MOZ_ASSERT(!mSingle);
-    for (auto iter = mMulti.ref().ConstIter(); !iter.Done(); iter.Next()) {
-      MOZ_ASSERT(iter.Get()->GetKey()->IsRunning() != aIsRunning);
-      iter.Get()->GetKey()->SetIsRunning(aIsRunning);
-    }
-    return;
-  }
-}
deleted file mode 100644
--- a/xpcom/threads/nsILabelableRunnable.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef nsILabelableRunnable_h
-#define nsILabelableRunnable_h
-
-#include "mozilla/Maybe.h"
-#include "mozilla/UniquePtr.h"
-#include "nsHashKeys.h"
-#include "nsISupports.h"
-#include "nsTHashtable.h"
-
-namespace mozilla {
-class SchedulerGroup;
-}
-
-#define NS_ILABELABLERUNNABLE_IID                    \
-  {                                                  \
-    0x40da1ea1, 0x0b81, 0x4249, {                    \
-      0x96, 0x46, 0x61, 0x92, 0x23, 0x39, 0xc3, 0xe8 \
-    }                                                \
-  }
-
-// In some cases, it is not possible to assign a SchedulerGroup to a runnable
-// when it is dispatched. For example, the vsync runnable affects whichever tabs
-// happen to be in the foreground when the vsync runs. The nsILabelableRunnable
-// interfaces makes it possible to query a runnable to see what SchedulerGroups
-// it could belong to if it ran right now. For vsyncs, for example, this would
-// return whichever tabs are foreground at the moment.
-//
-// This interface should be used very sparingly. In general, it is far
-// preferable to label a runnable when it is dispatched since that gives the
-// scheduler more flexibility and will improve performance.
-//
-// To use this interface, QI a runnable to nsILabelableRunnable and then call
-// GetAffectedSchedulerGroups.
-class nsILabelableRunnable : public nsISupports {
- public:
-  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ILABELABLERUNNABLE_IID);
-
-  class SchedulerGroupSet {
-    friend class nsILabelableRunnable;
-
-    using MultipleSchedulerGroups =
-        nsTHashtable<nsRefPtrHashKey<mozilla::SchedulerGroup>>;
-
-    RefPtr<mozilla::SchedulerGroup> mSingle;
-    mozilla::Maybe<MultipleSchedulerGroups> mMulti;
-
-   public:
-    void Put(mozilla::SchedulerGroup* aGroup);
-
-    void Clear();
-
-    void SetIsRunning(bool aIsRunning);
-  };
-
-  // Returns true if the runnable can be labeled right now. In this case,
-  // aGroups will contain the set of SchedulerGroups that can be affected by the
-  // runnable. If this returns false, no assumptions can be made about which
-  // SchedulerGroups are affected by the runnable.
-  virtual bool GetAffectedSchedulerGroups(SchedulerGroupSet& aGroups) = 0;
-
-  // Returns true if the runnable can be labeled right now and none of its
-  // affected scheduler groups is running.
-  bool IsReadyToRun();
-};
-
-NS_DEFINE_STATIC_IID_ACCESSOR(nsILabelableRunnable, NS_ILABELABLERUNNABLE_IID);
-
-#endif  // nsILabelableRunnable_h