Bug 1539595 - Create a separate content process type for privleged mozilla content r=nika,flod
authorTom Ritter <tom@mozilla.com>
Wed, 29 May 2019 11:31:50 +0000
changeset 476048 d97e735a0ee9e6c4e3f39b445d2653c766290826
parent 476047 7f30c1db8835cf11237b51835ca26522f8d0c06d
child 476049 69ca808a0ff34f2088beb70ffcb7fe9b6dc17782
push id36083
push usernerli@mozilla.com
push dateWed, 29 May 2019 15:58:28 +0000
treeherdermozilla-central@2bb77ed1fcc5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika, flod
bugs1539595
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1539595 - Create a separate content process type for privleged mozilla content r=nika,flod Differential Revision: https://phabricator.services.mozilla.com/D30276
browser/app/profile/firefox.js
browser/base/content/test/general/browser.ini
browser/base/content/test/general/browser_e10s_about_page_triggeringprincipal.js
browser/base/content/test/general/browser_e10s_about_process.js
browser/base/content/test/general/browser_e10s_chrome_process.js
browser/base/content/test/general/browser_e10s_javascript.js
browser/base/content/test/general/browser_e10s_switchbrowser.js
browser/base/content/test/general/file_about_child.html
browser/base/content/test/general/file_about_parent.html
browser/base/content/test/general/test_process_flags_chrome.html
browser/base/content/test/tabs/browser.ini
browser/base/content/test/tabs/browser_e10s_about_page_triggeringprincipal.js
browser/base/content/test/tabs/browser_e10s_about_process.js
browser/base/content/test/tabs/browser_e10s_chrome_process.js
browser/base/content/test/tabs/browser_e10s_javascript.js
browser/base/content/test/tabs/browser_e10s_mozillaweb_process.js
browser/base/content/test/tabs/browser_e10s_switchbrowser.js
browser/base/content/test/tabs/browser_new_tab_in_privilegedabout_process_pref.js
browser/base/content/test/tabs/browser_privilegedmozilla_process_pref.js
browser/base/content/test/tabs/file_about_child.html
browser/base/content/test/tabs/file_about_parent.html
browser/base/content/test/tabs/head.js
browser/base/content/test/tabs/test_process_flags_chrome.html
dom/ipc/ContentParent.h
mobile/android/app/mobile.js
modules/libpref/init/all.js
toolkit/locales/en-US/toolkit/global/processTypes.ftl
toolkit/modules/E10SUtils.jsm
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -493,21 +493,26 @@ pref("browser.tabs.extraDragSpace", fals
 // true   return to the tab that opened this tab (its owner)
 // false  return to the adjacent tab (old default)
 pref("browser.tabs.selectOwnerOnClose", true);
 
 pref("browser.tabs.showAudioPlayingIcon", true);
 // This should match Chromium's audio indicator delay.
 pref("browser.tabs.delayHidingAudioPlayingIconMS", 3000);
 
+#if defined(NIGHTLY_BUILD) && !defined(MOZ_ASAN)
 // Pref to control whether we use a separate privileged content process
 // for about: pages. This pref name did not age well: we will have multiple
 // types of privileged content processes, each with different privileges.
-#if defined(NIGHTLY_BUILD) && !defined(MOZ_ASAN)
+// types of privleged content processes, each with different privleges.
 pref("browser.tabs.remote.separatePrivilegedContentProcess", true);
+// Pref to control whether we use a separate privileged content process
+// for certain mozilla webpages (which are listed in the pref
+// browser.tabs.remote.separatedMozillaDomains).
+pref("browser.tabs.remote.separatePrivilegedMozillaWebContentProcess", true);
 #endif
 
 #ifdef NIGHTLY_BUILD
 pref("browser.tabs.remote.useHTTPResponseProcessSelection", true);
 #else
 // Disabled outside of nightly due to bug 1554217
 pref("browser.tabs.remote.useHTTPResponseProcessSelection", false);
 #endif
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -42,17 +42,16 @@ support-files =
   ssl_error_reports.sjs
   print_postdata.sjs
   searchSuggestionEngine.sjs
   searchSuggestionEngine.xml
   searchSuggestionEngine2.xml
   test_bug462673.html
   test_bug628179.html
   test_bug839103.html
-  test_process_flags_chrome.html
   title_test.svg
   unknownContentType_file.pif
   unknownContentType_file.pif^headers^
   video.ogg
   web_video.html
   web_video1.ogv
   web_video1.ogv^headers^
   zoom_test.html
@@ -409,31 +408,16 @@ skip-if = (os == "win" && !debug)
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_web_channel.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_zbug569342.js]
 skip-if = e10s || debug # Bug 1094240 - has findbar-related failures
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_addCertException.js]
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
-[browser_e10s_about_page_triggeringprincipal.js]
-skip-if = verify
-support-files =
-  file_about_child.html
-  file_about_parent.html
-# DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
-[browser_e10s_switchbrowser.js]
-# DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
-[browser_e10s_about_process.js]
-# DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
-[browser_e10s_chrome_process.js]
-skip-if = debug # Bug 1444565, Bug 1457887
-# DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
-[browser_e10s_javascript.js]
-# DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_blockHPKP.js]
 skip-if = verify && !debug
 uses-unsafe-cpows = true
 tags = psm
 # DO NOT ADD MORE TESTS HERE. USE A TOPICAL DIRECTORY INSTEAD.
 [browser_windowactivation.js]
 skip-if = verify
 support-files =
--- a/browser/base/content/test/tabs/browser.ini
+++ b/browser/base/content/test/tabs/browser.ini
@@ -1,29 +1,41 @@
 [DEFAULT]
 support-files =
   head.js
   dummy_page.html
   ../general/audio.ogg
   file_mediaPlayback.html
+  test_process_flags_chrome.html
 
 [browser_accessibility_indicator.js]
 skip-if = (verify && debug && (os == 'linux')) || (os == 'win' && processor == 'aarch64')
 [browser_addTab_index.js]
 [browser_allow_process_switches_despite_related_browser.js]
 [browser_audioTabIcon.js]
 tags = audiochannel
 [browser_bug_1387976_restore_lazy_tab_browser_muted_state.js]
 [browser_bug580956.js]
 [browser_close_tab_by_dblclick.js]
 [browser_contextmenu_openlink_after_tabnavigated.js]
 skip-if = (verify && debug && (os == 'linux'))
 support-files =
   test_bug1358314.html
 [browser_isLocalAboutURI.js]
+[browser_e10s_about_page_triggeringprincipal.js]
+skip-if = verify
+support-files =
+  file_about_child.html
+  file_about_parent.html
+[browser_e10s_switchbrowser.js]
+[browser_e10s_about_process.js]
+[browser_e10s_mozillaweb_process.js]
+[browser_e10s_chrome_process.js]
+skip-if = debug # Bug 1444565, Bug 1457887
+[browser_e10s_javascript.js]
 [browser_multiselect_tabs_active_tab_selected_by_default.js]
 [browser_multiselect_tabs_bookmark.js]
 [browser_multiselect_tabs_clear_selection_when_tab_switch.js]
 [browser_multiselect_tabs_close_other_tabs.js]
 [browser_multiselect_tabs_close_tabs_to_the_right.js]
 [browser_multiselect_tabs_close_using_shortcuts.js]
 [browser_multiselect_tabs_close.js]
 [browser_multiselect_tabs_copy_through_drag_and_drop.js]
@@ -49,16 +61,18 @@ skip-if = os == 'mac' # Skipped because 
 [browser_navigatePinnedTab.js]
 [browser_new_file_whitelisted_http_tab.js]
 skip-if = !e10s # Test only relevant for e10s.
 [browser_new_tab_insert_position.js]
 skip-if = (debug && os == 'linux' && bits == 32) #Bug 1455882, disabled on Linux32 for almost permafailing
 support-files = file_new_tab_page.html
 [browser_new_tab_in_privilegedabout_process_pref.js]
 skip-if = !e10s # Pref and test only relevant for e10s.
+[browser_privilegedmozilla_process_pref.js]
+skip-if = !e10s # Pref and test only relevant for e10s.
 [browser_new_web_tab_in_file_process_pref.js]
 skip-if = !e10s # Pref and test only relevant for e10s.
 [browser_newwindow_tabstrip_overflow.js]
 [browser_open_newtab_start_observer_notification.js]
 [browser_opened_file_tab_navigated_to_web.js]
 [browser_overflowScroll.js]
 [browser_paste_event_at_middle_click_on_link.js]
 tags = clipboard
rename from browser/base/content/test/general/browser_e10s_about_page_triggeringprincipal.js
rename to browser/base/content/test/tabs/browser_e10s_about_page_triggeringprincipal.js
rename from browser/base/content/test/general/browser_e10s_about_process.js
rename to browser/base/content/test/tabs/browser_e10s_about_process.js
--- a/browser/base/content/test/general/browser_e10s_about_process.js
+++ b/browser/base/content/test/tabs/browser_e10s_about_process.js
@@ -1,13 +1,8 @@
-const CHROME_PROCESS = E10SUtils.NOT_REMOTE;
-const WEB_CONTENT_PROCESS = E10SUtils.WEB_REMOTE_TYPE;
-const PRIVILEGED_CONTENT_PROCESS = E10SUtils.PRIVILEGEDABOUT_REMOTE_TYPE;
-const EXTENSION_PROCESS = E10SUtils.EXTENSION_REMOTE_TYPE;
-
 const CHROME = {
   id: "cb34538a-d9da-40f3-b61a-069f0b2cb9fb",
   path: "test-chrome",
   flags: 0,
 };
 const CANREMOTE = {
   id: "2480d3e1-9ce4-4b84-8ae3-910b9a95cbb3",
   path: "test-allowremote",
@@ -75,102 +70,66 @@ var AboutModuleFactory = {
   lockFactory(aLock) {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
   QueryInterface: ChromeUtils.generateQI([Ci.nsIFactory]),
 };
 
 add_task(async function init() {
+  SpecialPowers.setBoolPref("browser.tabs.remote.separatePrivilegedMozillaWebContentProcess", true);
   let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
   for (let module of TEST_MODULES) {
     registrar.registerFactory(Components.ID(module.id), "",
                               "@mozilla.org/network/protocol/about;1?what=" + module.path,
                               AboutModuleFactory);
   }
 });
 
 registerCleanupFunction(() => {
+  SpecialPowers.clearUserPref("browser.tabs.remote.separatePrivilegedMozillaWebContentProcess");
   let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
   for (let module of TEST_MODULES) {
     registrar.unregisterFactory(Components.ID(module.id), AboutModuleFactory);
   }
 });
 
-function test_url(url, chromeResult, webContentResult, privilegedContentResult, extensionProcessResult) {
-  is(E10SUtils.canLoadURIInRemoteType(url, /* fission */ false, CHROME_PROCESS),
-     chromeResult, "Check URL in chrome process.");
-  is(E10SUtils.canLoadURIInRemoteType(url, /* fission */ false, WEB_CONTENT_PROCESS),
-     webContentResult, "Check URL in web content process.");
-  is(E10SUtils.canLoadURIInRemoteType(url, /* fission */ false, PRIVILEGED_CONTENT_PROCESS),
-     privilegedContentResult, "Check URL in privileged content process.");
-  is(E10SUtils.canLoadURIInRemoteType(url, /* fission */ false, EXTENSION_PROCESS),
-     extensionProcessResult, "Check URL in extension process.");
-
-  is(E10SUtils.canLoadURIInRemoteType(url + "#foo", /* fission */ false, CHROME_PROCESS),
-     chromeResult, "Check URL with ref in chrome process.");
-  is(E10SUtils.canLoadURIInRemoteType(url + "#foo", /* fission */ false, WEB_CONTENT_PROCESS),
-     webContentResult, "Check URL with ref in web content process.");
-  is(E10SUtils.canLoadURIInRemoteType(url + "#foo", /* fission */ false, PRIVILEGED_CONTENT_PROCESS),
-     privilegedContentResult, "Check URL with ref in privileged content process.");
-  is(E10SUtils.canLoadURIInRemoteType(url + "#foo", /* fission */ false, EXTENSION_PROCESS),
-     extensionProcessResult, "Check URL with ref in extension process.");
-
-  is(E10SUtils.canLoadURIInRemoteType(url + "?foo", /* fission */ false, CHROME_PROCESS),
-     chromeResult, "Check URL with query in chrome process.");
-  is(E10SUtils.canLoadURIInRemoteType(url + "?foo", /* fission */ false, WEB_CONTENT_PROCESS),
-     webContentResult, "Check URL with query in web content process.");
-  is(E10SUtils.canLoadURIInRemoteType(url + "?foo", /* fission */ false, PRIVILEGED_CONTENT_PROCESS),
-     privilegedContentResult, "Check URL with query in privileged content process.");
-  is(E10SUtils.canLoadURIInRemoteType(url + "?foo", /* fission */ false, EXTENSION_PROCESS),
-     extensionProcessResult, "Check URL with query in extension process.");
-
-  is(E10SUtils.canLoadURIInRemoteType(url + "?foo#bar", /* fission */ false, CHROME_PROCESS),
-     chromeResult, "Check URL with query and ref in chrome process.");
-  is(E10SUtils.canLoadURIInRemoteType(url + "?foo#bar", /* fission */ false, WEB_CONTENT_PROCESS),
-     webContentResult, "Check URL with query and ref in web content process.");
-  is(E10SUtils.canLoadURIInRemoteType(url + "?foo#bar", /* fission */ false, PRIVILEGED_CONTENT_PROCESS),
-     privilegedContentResult, "Check URL with query and ref in privileged content process.");
-  is(E10SUtils.canLoadURIInRemoteType(url + "?foo#bar", /* fission */ false, EXTENSION_PROCESS),
-     extensionProcessResult, "Check URL with query and ref in extension process.");
-}
-
 add_task(async function test_chrome() {
-  test_url("about:" + CHROME.path, true, false, false, false);
+  test_url_for_process_types("about:" + CHROME.path, true, false, false, false, false);
 });
 
 add_task(async function test_any() {
-  test_url("about:" + CANREMOTE.path, true, true, false, false);
+  test_url_for_process_types("about:" + CANREMOTE.path, true, true, false, false, false);
 });
 
 add_task(async function test_remote() {
-  test_url("about:" + MUSTREMOTE.path, false, true, false, false);
+  test_url_for_process_types("about:" + MUSTREMOTE.path, false, true, false, false, false);
 });
 
 add_task(async function test_privileged_remote_true() {
   await SpecialPowers.pushPrefEnv({
     set: [
       ["browser.tabs.remote.separatePrivilegedContentProcess", true],
     ],
   });
 
   // This shouldn't be taken literally. We will always use the privleged about
   // content type if the URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS flag is enabled and
   // the pref is turned on.
-  test_url("about:" + CANPRIVILEGEDREMOTE.path, false, false, true, false);
+  test_url_for_process_types("about:" + CANPRIVILEGEDREMOTE.path, false, false, true, false, false);
 });
 
 add_task(async function test_privileged_remote_false() {
   await SpecialPowers.pushPrefEnv({
     set: [
       ["browser.tabs.remote.separatePrivilegedContentProcess", false],
     ],
   });
 
   // This shouldn't be taken literally. We will always use the privleged about
   // content type if the URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS flag is enabled and
   // the pref is turned on.
-  test_url("about:" + CANPRIVILEGEDREMOTE.path, false, true, false, false);
+  test_url_for_process_types("about:" + CANPRIVILEGEDREMOTE.path, false, true, false, false, false);
 });
 
 add_task(async function test_extension() {
-  test_url("about:" + MUSTEXTENSION.path, false, false, false, true);
+  test_url_for_process_types("about:" + MUSTEXTENSION.path, false, false, false, false, true);
 });
rename from browser/base/content/test/general/browser_e10s_chrome_process.js
rename to browser/base/content/test/tabs/browser_e10s_chrome_process.js
--- a/browser/base/content/test/general/browser_e10s_chrome_process.js
+++ b/browser/base/content/test/tabs/browser_e10s_chrome_process.js
@@ -27,64 +27,40 @@ function makeTest(name, startURL, startP
     }
     await docLoadedPromise;
 
     is(browser.currentURI.spec, endURL, "Should have made it to the final URL");
     is(browser.isRemoteBrowser, endProcessIsRemote, "Should be displayed in the right process");
   };
 }
 
-const CHROME_PROCESS = E10SUtils.NOT_REMOTE;
-const WEB_CONTENT_PROCESS = E10SUtils.WEB_REMOTE_TYPE;
 const PATH = (getRootDirectory(gTestPath) + "test_process_flags_chrome.html").replace("chrome://mochitests", "");
 
 const CHROME = "chrome://mochitests" + PATH;
 const CANREMOTE = "chrome://mochitests-any" + PATH;
 const MUSTREMOTE = "chrome://mochitests-content" + PATH;
 
 add_task(async function init() {
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "about:blank", {forceNotRemote: true});
 });
 
 registerCleanupFunction(() => {
   gBrowser.removeCurrentTab();
 });
 
-function test_url(url, chromeResult, contentResult) {
-  is(E10SUtils.canLoadURIInRemoteType(url, /* fission */ false, CHROME_PROCESS),
-     chromeResult, "Check URL in chrome process.");
-  is(E10SUtils.canLoadURIInRemoteType(url, /* fission */ false, WEB_CONTENT_PROCESS),
-     contentResult, "Check URL in web content process.");
-
-  is(E10SUtils.canLoadURIInRemoteType(url + "#foo", /* fission */ false, CHROME_PROCESS),
-     chromeResult, "Check URL with ref in chrome process.");
-  is(E10SUtils.canLoadURIInRemoteType(url + "#foo", /* fission */ false, WEB_CONTENT_PROCESS),
-     contentResult, "Check URL with ref in web content process.");
-
-  is(E10SUtils.canLoadURIInRemoteType(url + "?foo", /* fission */ false, CHROME_PROCESS),
-     chromeResult, "Check URL with query in chrome process.");
-  is(E10SUtils.canLoadURIInRemoteType(url + "?foo", /* fission */ false, WEB_CONTENT_PROCESS),
-     contentResult, "Check URL with query in web content process.");
-
-  is(E10SUtils.canLoadURIInRemoteType(url + "?foo#bar", /* fission */ false, CHROME_PROCESS),
-     chromeResult, "Check URL with query and ref in chrome process.");
-  is(E10SUtils.canLoadURIInRemoteType(url + "?foo#bar", /* fission */ false, WEB_CONTENT_PROCESS),
-     contentResult, "Check URL with query and ref in web content process.");
-}
-
 add_task(async function test_chrome() {
-  test_url(CHROME, true, false);
+  test_url_for_process_types(CHROME, true, false, false, false, false);
 });
 
 add_task(async function test_any() {
-  test_url(CANREMOTE, true, true);
+  test_url_for_process_types(CANREMOTE, true, true, false, false, false);
 });
 
 add_task(async function test_remote() {
-  test_url(MUSTREMOTE, false, true);
+  test_url_for_process_types(MUSTREMOTE, false, true, false, false, false);
 });
 
 // The set of page transitions
 var TESTS = [
   [
     "chrome -> chrome",
     CHROME, false,
     CHROME, false,
rename from browser/base/content/test/general/browser_e10s_javascript.js
rename to browser/base/content/test/tabs/browser_e10s_javascript.js
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/tabs/browser_e10s_mozillaweb_process.js
@@ -0,0 +1,24 @@
+add_task(async function test_privileged_remote_true() {
+  await SpecialPowers.pushPrefEnv({
+    set: [
+      ["browser.tabs.remote.separatePrivilegedContentProcess", true],
+      ["browser.tabs.remote.separatePrivilegedMozillaWebContentProcess", true],
+      ["browser.tabs.remote.separatedMozillaDomains", "example.org"],
+    ],
+  });
+
+  test_url_for_process_types("https://example.com", false, true, false, false, false);
+  test_url_for_process_types("https://example.org", false, false, false, true, false);
+});
+
+add_task(async function test_privileged_remote_false() {
+  await SpecialPowers.pushPrefEnv({
+    set: [
+      ["browser.tabs.remote.separatePrivilegedContentProcess", true],
+      ["browser.tabs.remote.separatePrivilegedMozillaWebContentProcess", false],
+    ],
+  });
+
+  test_url_for_process_types("https://example.com", false, true, false, false, false);
+  test_url_for_process_types("https://example.org", false, true, false, false, false);
+});
rename from browser/base/content/test/general/browser_e10s_switchbrowser.js
rename to browser/base/content/test/tabs/browser_e10s_switchbrowser.js
--- a/browser/base/content/test/tabs/browser_new_tab_in_privilegedabout_process_pref.js
+++ b/browser/base/content/test/tabs/browser_new_tab_in_privilegedabout_process_pref.js
@@ -12,41 +12,16 @@
  */
 
 const ABOUT_BLANK = "about:blank";
 const ABOUT_HOME = "about:home";
 const ABOUT_NEWTAB = "about:newtab";
 const ABOUT_WELCOME = "about:welcome";
 const TEST_HTTP = "http://example.org/";
 
-/**
- * Takes a xul:browser and makes sure that the remoteTypes for the browser in
- * both the parent and the child processes are the same.
- *
- * @param {xul:browser} browser
- *        A xul:browser.
- * @param {string} expectedRemoteType
- *        The expected remoteType value for the browser in both the parent
- *        and child processes.
- * @param {optional string} message
- *        If provided, shows this string as the message when remoteType values
- *        do not match. If not present, it uses the default message defined
- *        in the function parameters.
- */
-function checkBrowserRemoteType(
-  browser,
-  expectedRemoteType,
-  message = `Ensures that tab runs in the ${expectedRemoteType} content process.`
-) {
-  // Check both parent and child to ensure that they have the correct remoteType.
-  is(browser.remoteType, expectedRemoteType, message);
-  is(browser.messageManager.remoteType, expectedRemoteType,
-    "Parent and child process should agree on the remote type.");
-}
-
 add_task(async function setup() {
   await SpecialPowers.pushPrefEnv({
     set: [
       ["browser.newtab.preload", false],
       ["browser.tabs.remote.separatePrivilegedContentProcess", true],
       ["dom.ipc.processCount.privilegedabout", 1],
       ["dom.ipc.keepProcessesAlive.privilegedabout", 1],
     ],
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/tabs/browser_privilegedmozilla_process_pref.js
@@ -0,0 +1,183 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+/**
+ * Tests to ensure that Mozilla Privileged Webpages load in the privileged
+ * mozilla web content process. Normal http web pages should load in the web
+ * content process.
+ * Ref: Bug 1539595.
+ */
+
+// High and Low Privilege
+const TEST_HIGH1 = "https://example.org/";
+const TEST_HIGH2 = "https://test1.example.org/";
+const TEST_LOW1 = "http://example.org/";
+const TEST_LOW2 = "https://example.com/";
+
+add_task(async function setup() {
+  await SpecialPowers.pushPrefEnv({
+    set: [
+      ["browser.tabs.remote.separatePrivilegedMozillaWebContentProcess", true],
+      ["browser.tabs.remote.separatedMozillaDomains", "example.org"],
+      ["dom.ipc.processCount.privilegedmozilla", 1],
+    ],
+  });
+});
+
+/*
+ * Test to ensure that the tabs open in privileged mozilla content process. We
+ * will first open a page that acts as a reference to the privileged mozilla web
+ * content process. With the reference, we can then open other links in a new tab
+ * and ensure that the new tab opens in the same privileged mozilla content process
+ * as our reference.
+ */
+add_task(async function webpages_in_privileged_content_process() {
+  Services.ppmm.releaseCachedProcesses();
+
+  await BrowserTestUtils.withNewTab(TEST_HIGH1, async function(browser1) {
+    checkBrowserRemoteType(browser1, E10SUtils.PRIVILEGEDMOZILLA_REMOTE_TYPE);
+
+    // Note the processID for about:newtab for comparison later.
+    let privilegedPid = browser1.frameLoader.remoteTab.osPid;
+
+    for (let url of [
+      TEST_HIGH1,
+      `${TEST_HIGH1}#foo`,
+      `${TEST_HIGH1}?q=foo`,
+      TEST_HIGH2,
+      `${TEST_HIGH2}#foo`,
+      `${TEST_HIGH2}?q=foo`,
+    ]) {
+      await BrowserTestUtils.withNewTab(url, async function(browser2) {
+        is(browser2.frameLoader.remoteTab.osPid, privilegedPid,
+          "Check that privileged pages are in the same privileged mozilla content process.");
+      });
+    }
+  });
+
+  Services.ppmm.releaseCachedProcesses();
+});
+
+/*
+ * Test to ensure that a process switch occurs when navigating between normal
+ * web pages and unprivileged pages in the same tab.
+ */
+add_task(async function process_switching_through_loading_in_the_same_tab() {
+  Services.ppmm.releaseCachedProcesses();
+
+  await BrowserTestUtils.withNewTab(TEST_LOW1, async function(browser) {
+    checkBrowserRemoteType(browser, E10SUtils.WEB_REMOTE_TYPE);
+
+    for (let [url, remoteType] of [
+      [TEST_HIGH1, E10SUtils.PRIVILEGEDMOZILLA_REMOTE_TYPE],
+      [TEST_LOW1, E10SUtils.WEB_REMOTE_TYPE],
+      [TEST_HIGH1, E10SUtils.PRIVILEGEDMOZILLA_REMOTE_TYPE],
+      [TEST_LOW2, E10SUtils.WEB_REMOTE_TYPE],
+      [TEST_HIGH1, E10SUtils.PRIVILEGEDMOZILLA_REMOTE_TYPE],
+      [TEST_LOW1, E10SUtils.WEB_REMOTE_TYPE],
+      [TEST_LOW2, E10SUtils.WEB_REMOTE_TYPE],
+      [`${TEST_HIGH1}#foo`, E10SUtils.PRIVILEGEDMOZILLA_REMOTE_TYPE],
+      [TEST_LOW1, E10SUtils.WEB_REMOTE_TYPE],
+      [`${TEST_HIGH1}#bar`, E10SUtils.PRIVILEGEDMOZILLA_REMOTE_TYPE],
+      [TEST_LOW2, E10SUtils.WEB_REMOTE_TYPE],
+      [`${TEST_HIGH1}#baz`, E10SUtils.PRIVILEGEDMOZILLA_REMOTE_TYPE],
+      [TEST_LOW1, E10SUtils.WEB_REMOTE_TYPE],
+      [`${TEST_HIGH1}?q=foo`, E10SUtils.PRIVILEGEDMOZILLA_REMOTE_TYPE],
+      [TEST_LOW2, E10SUtils.WEB_REMOTE_TYPE],
+      [`${TEST_HIGH1}?q=bar`, E10SUtils.PRIVILEGEDMOZILLA_REMOTE_TYPE],
+      [TEST_LOW1, E10SUtils.WEB_REMOTE_TYPE],
+      [`${TEST_HIGH1}?q=baz`, E10SUtils.PRIVILEGEDMOZILLA_REMOTE_TYPE],
+      [TEST_LOW2, E10SUtils.WEB_REMOTE_TYPE],
+    ]) {
+      BrowserTestUtils.loadURI(browser, url);
+      await BrowserTestUtils.browserLoaded(browser, false, url);
+      checkBrowserRemoteType(browser, remoteType);
+    }
+  });
+
+  Services.ppmm.releaseCachedProcesses();
+});
+
+/*
+ * Test to ensure that a process switch occurs when navigating between normal
+ * web pages and privileged pages using the browser's navigation features
+ * such as history and location change.
+ */
+add_task(async function process_switching_through_navigation_features() {
+  Services.ppmm.releaseCachedProcesses();
+
+  await BrowserTestUtils.withNewTab(TEST_HIGH1, async function(browser) {
+    checkBrowserRemoteType(browser, E10SUtils.PRIVILEGEDMOZILLA_REMOTE_TYPE);
+
+    // Note the processID for about:newtab for comparison later.
+    let privilegedPid = browser.frameLoader.remoteTab.osPid;
+
+    // Check that about:newtab opened from JS in about:newtab page is in the same process.
+    let promiseTabOpened = BrowserTestUtils.waitForNewTab(gBrowser, TEST_HIGH1, true);
+    await ContentTask.spawn(browser, TEST_HIGH1, uri => {
+      content.open(uri, "_blank");
+    });
+    let newTab = await promiseTabOpened;
+    registerCleanupFunction(async function() {
+      BrowserTestUtils.removeTab(newTab);
+    });
+    browser = newTab.linkedBrowser;
+    is(browser.frameLoader.remoteTab.osPid, privilegedPid,
+      "Check that new tab opened from privileged page is loaded in privileged mozilla content process.");
+
+    // Check that reload does not break the privileged mozilla content process affinity.
+    BrowserReload();
+    await BrowserTestUtils.browserLoaded(browser, false, TEST_HIGH1);
+    is(browser.frameLoader.remoteTab.osPid, privilegedPid,
+      "Check that privileged page is still in privileged mozilla content process after reload.");
+
+    // Load http webpage
+    BrowserTestUtils.loadURI(browser, TEST_LOW1);
+    await BrowserTestUtils.browserLoaded(browser, false, TEST_LOW1);
+    checkBrowserRemoteType(browser, E10SUtils.WEB_REMOTE_TYPE);
+
+    // Check that using the history back feature switches back to privileged mozilla content process.
+    let promiseLocation = BrowserTestUtils.waitForLocationChange(gBrowser, TEST_HIGH1);
+    browser.goBack();
+    await promiseLocation;
+    // We will need to ensure that the process flip has fully completed so that
+    // the navigation history data will be available when we do browser.goForward();
+    await BrowserTestUtils.waitForEvent(newTab, "SSTabRestored");
+    is(browser.frameLoader.remoteTab.osPid, privilegedPid,
+      "Check that privileged page is still in privileged mozilla content process after history goBack.");
+
+    // Check that using the history forward feature switches back to the web content process.
+    promiseLocation = BrowserTestUtils.waitForLocationChange(gBrowser, TEST_LOW1);
+    browser.goForward();
+    await promiseLocation;
+    // We will need to ensure that the process flip has fully completed so that
+    // the navigation history data will be available when we do browser.gotoIndex(0);
+    await BrowserTestUtils.waitForEvent(newTab, "SSTabRestored");
+    checkBrowserRemoteType(browser, E10SUtils.WEB_REMOTE_TYPE,
+      "Check that tab runs in the web content process after using history goForward.");
+
+    // Check that goto history index does not break the affinity.
+    promiseLocation = BrowserTestUtils.waitForLocationChange(gBrowser, TEST_HIGH1);
+    browser.gotoIndex(0);
+    await promiseLocation;
+    is(browser.frameLoader.remoteTab.osPid, privilegedPid,
+      "Check that privileged page is in privileged mozilla content process after history gotoIndex.");
+
+    BrowserTestUtils.loadURI(browser, TEST_LOW2);
+    await BrowserTestUtils.browserLoaded(browser, false, TEST_LOW2);
+    checkBrowserRemoteType(browser, E10SUtils.WEB_REMOTE_TYPE);
+
+    // Check that location change causes a change in process type as well.
+    await ContentTask.spawn(browser, TEST_HIGH1, uri => {
+      content.location = uri;
+    });
+    await BrowserTestUtils.browserLoaded(browser, false, TEST_HIGH1);
+    is(browser.frameLoader.remoteTab.osPid, privilegedPid,
+      "Check that privileged page is in privileged mozilla content process after location change.");
+  });
+
+  Services.ppmm.releaseCachedProcesses();
+});
rename from browser/base/content/test/general/file_about_child.html
rename to browser/base/content/test/tabs/file_about_child.html
rename from browser/base/content/test/general/file_about_parent.html
rename to browser/base/content/test/tabs/file_about_parent.html
--- a/browser/base/content/test/tabs/head.js
+++ b/browser/base/content/test/tabs/head.js
@@ -184,8 +184,85 @@ async function dragAndDrop(tab1, tab2, c
     await BrowserTestUtils.waitForCondition(() => tab1.closing,
       "Waiting for tab closing");
   }
 }
 
 function getUrl(tab) {
   return tab.linkedBrowser.currentURI.spec;
 }
+
+/**
+ * Takes a xul:browser and makes sure that the remoteTypes for the browser in
+ * both the parent and the child processes are the same.
+ *
+ * @param {xul:browser} browser
+ *        A xul:browser.
+ * @param {string} expectedRemoteType
+ *        The expected remoteType value for the browser in both the parent
+ *        and child processes.
+ * @param {optional string} message
+ *        If provided, shows this string as the message when remoteType values
+ *        do not match. If not present, it uses the default message defined
+ *        in the function parameters.
+ */
+function checkBrowserRemoteType(
+  browser,
+  expectedRemoteType,
+  message = `Ensures that tab runs in the ${expectedRemoteType} content process.`
+) {
+  // Check both parent and child to ensure that they have the correct remoteType.
+  is(browser.remoteType, expectedRemoteType, message);
+  is(browser.messageManager.remoteType, expectedRemoteType,
+    "Parent and child process should agree on the remote type.");
+}
+
+function test_url_for_process_types(url, chromeResult, webContentResult, privilegedAboutContentResult, privilegedMozillaContentResult, extensionProcessResult) {
+  const CHROME_PROCESS = E10SUtils.NOT_REMOTE;
+  const WEB_CONTENT_PROCESS = E10SUtils.WEB_REMOTE_TYPE;
+  const PRIVILEGEDABOUT_CONTENT_PROCESS = E10SUtils.PRIVILEGEDABOUT_REMOTE_TYPE;
+  const PRIVILEGEDMOZILLA_CONTENT_PROCESS = E10SUtils.PRIVILEGEDMOZILLA_REMOTE_TYPE;
+  const EXTENSION_PROCESS = E10SUtils.EXTENSION_REMOTE_TYPE;
+
+  is(E10SUtils.canLoadURIInRemoteType(url, /* fission */ false, CHROME_PROCESS),
+     chromeResult, "Check URL in chrome process.");
+  is(E10SUtils.canLoadURIInRemoteType(url, /* fission */ false, WEB_CONTENT_PROCESS),
+     webContentResult, "Check URL in web content process.");
+  is(E10SUtils.canLoadURIInRemoteType(url, /* fission */ false, PRIVILEGEDABOUT_CONTENT_PROCESS),
+     privilegedAboutContentResult, "Check URL in privileged about content process.");
+  is(E10SUtils.canLoadURIInRemoteType(url, /* fission */ false, PRIVILEGEDMOZILLA_CONTENT_PROCESS),
+     privilegedMozillaContentResult, "Check URL in privileged mozilla content process.");
+  is(E10SUtils.canLoadURIInRemoteType(url, /* fission */ false, EXTENSION_PROCESS),
+     extensionProcessResult, "Check URL in extension process.");
+
+  is(E10SUtils.canLoadURIInRemoteType(url + "#foo", /* fission */ false, CHROME_PROCESS),
+     chromeResult, "Check URL with ref in chrome process.");
+  is(E10SUtils.canLoadURIInRemoteType(url + "#foo", /* fission */ false, WEB_CONTENT_PROCESS),
+     webContentResult, "Check URL with ref in web content process.");
+  is(E10SUtils.canLoadURIInRemoteType(url + "#foo", /* fission */ false, PRIVILEGEDABOUT_CONTENT_PROCESS),
+     privilegedAboutContentResult, "Check URL with ref in privileged about content process.");
+  is(E10SUtils.canLoadURIInRemoteType(url + "#foo", /* fission */ false, PRIVILEGEDMOZILLA_CONTENT_PROCESS),
+     privilegedMozillaContentResult, "Check URL with ref in privileged mozilla content process.");
+  is(E10SUtils.canLoadURIInRemoteType(url + "#foo", /* fission */ false, EXTENSION_PROCESS),
+     extensionProcessResult, "Check URL with ref in extension process.");
+
+  is(E10SUtils.canLoadURIInRemoteType(url + "?foo", /* fission */ false, CHROME_PROCESS),
+     chromeResult, "Check URL with query in chrome process.");
+  is(E10SUtils.canLoadURIInRemoteType(url + "?foo", /* fission */ false, WEB_CONTENT_PROCESS),
+     webContentResult, "Check URL with query in web content process.");
+  is(E10SUtils.canLoadURIInRemoteType(url + "?foo", /* fission */ false, PRIVILEGEDABOUT_CONTENT_PROCESS),
+     privilegedAboutContentResult, "Check URL with query in privileged about content process.");
+  is(E10SUtils.canLoadURIInRemoteType(url + "?foo", /* fission */ false, PRIVILEGEDMOZILLA_CONTENT_PROCESS),
+     privilegedMozillaContentResult, "Check URL with query in privileged mozilla content process.");
+  is(E10SUtils.canLoadURIInRemoteType(url + "?foo", /* fission */ false, EXTENSION_PROCESS),
+     extensionProcessResult, "Check URL with query in extension process.");
+
+  is(E10SUtils.canLoadURIInRemoteType(url + "?foo#bar", /* fission */ false, CHROME_PROCESS),
+     chromeResult, "Check URL with query and ref in chrome process.");
+  is(E10SUtils.canLoadURIInRemoteType(url + "?foo#bar", /* fission */ false, WEB_CONTENT_PROCESS),
+     webContentResult, "Check URL with query and ref in web content process.");
+  is(E10SUtils.canLoadURIInRemoteType(url + "?foo#bar", /* fission */ false, PRIVILEGEDABOUT_CONTENT_PROCESS),
+     privilegedAboutContentResult, "Check URL with query and ref in privileged about content process.");
+  is(E10SUtils.canLoadURIInRemoteType(url + "?foo#bar", /* fission */ false, PRIVILEGEDMOZILLA_CONTENT_PROCESS),
+     privilegedMozillaContentResult, "Check URL with query and ref in privileged mozilla content process.");
+  is(E10SUtils.canLoadURIInRemoteType(url + "?foo#bar", /* fission */ false, EXTENSION_PROCESS),
+     extensionProcessResult, "Check URL with query and ref in extension process.");
+}
rename from browser/base/content/test/general/test_process_flags_chrome.html
rename to browser/base/content/test/tabs/test_process_flags_chrome.html
--- a/browser/base/content/test/general/test_process_flags_chrome.html
+++ b/browser/base/content/test/tabs/test_process_flags_chrome.html
@@ -1,10 +1,10 @@
 <!DOCTYPE html>
 
 <html>
 <body>
 <p>chrome: test page</p>
-<p><a href="chrome://mochitests/content/browser/browser/base/content/test/general/test_process_flags_chrome.html">chrome</a></p>
-<p><a href="chrome://mochitests-any/content/browser/browser/base/content/test/general/test_process_flags_chrome.html">canremote</a></p>
-<p><a href="chrome://mochitests-content/content/browser/browser/base/content/test/general/test_process_flags_chrome.html">mustremote</a></p>
+<p><a href="chrome://mochitests/content/browser/browser/base/content/test/tabs/test_process_flags_chrome.html">chrome</a></p>
+<p><a href="chrome://mochitests-any/content/browser/browser/base/content/test/tabs/test_process_flags_chrome.html">canremote</a></p>
+<p><a href="chrome://mochitests-content/content/browser/browser/base/content/test/tabs/test_process_flags_chrome.html">mustremote</a></p>
 </body>
 </html>
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -48,16 +48,17 @@
 // These must match the similar ones in E10SUtils.jsm and ProcInfo.h.
 // Process names as reported by about:memory are defined in
 // ContentChild:RecvRemoteType.  Add your value there too or it will be called
 // "Web Content".
 #define DEFAULT_REMOTE_TYPE "web"
 #define FILE_REMOTE_TYPE "file"
 #define EXTENSION_REMOTE_TYPE "extension"
 #define PRIVILEGEDABOUT_REMOTE_TYPE "privilegedabout"
+#define PRIVILEGEDMOZILLA_REMOTE_TYPE "privilegedmozilla"
 
 // This must start with the DEFAULT_REMOTE_TYPE above.
 #define LARGE_ALLOCATION_REMOTE_TYPE "webLargeAllocation"
 
 class nsConsoleService;
 class nsIContentProcessInfo;
 class nsICycleCollectorLogSink;
 class nsIDumpGCAndCCLogsCallback;
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -856,8 +856,9 @@ pref("media.navigator.permission.device"
 
 // Allow system add-on updates
 pref("extensions.systemAddon.update.url", "https://aus5.mozilla.org/update/3/SystemAddons/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml");
 
 // E10s stuff. We don't support 'file' or 'priveleged' process types.
 pref("browser.tabs.remote.separateFileUriProcess", false);
 pref("browser.tabs.remote.allowLinkedWebInFileUriProcess", true);
 pref("browser.tabs.remote.separatePrivilegedContentProcess", false);
+pref("browser.tabs.remote.separatePrivilegedMozillaWebContentProcess", false);
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -3346,16 +3346,20 @@ pref("dom.ipc.processCount", 4);
 pref("dom.ipc.processCount.file", 1);
 
 // WebExtensions only support a single extension process.
 pref("dom.ipc.processCount.extension", 1);
 
 // The privileged about process only supports a single content process.
 pref("dom.ipc.processCount.privilegedabout", 1);
 
+// Limit the privileged mozilla process to a single instance only
+// to avoid multiple of these content processes
+pref("dom.ipc.processCount.privilegedmozilla", 1);
+
 // Keep a single privileged about process alive for performance reasons.
 // e.g. we do not want to throw content processes out every time we navigate
 // away from about:newtab.
 pref("dom.ipc.keepProcessesAlive.privilegedabout", 1);
 
 // Whether a native event loop should be used in the content process.
 #if defined(XP_WIN) || defined(XP_MACOSX)
 pref("dom.ipc.useNativeEventProcessing.content", false);
@@ -3386,16 +3390,24 @@ pref("browser.tabs.remote.separateFileUr
 // content process, causes compatibility issues.
 pref("browser.tabs.remote.allowLinkedWebInFileUriProcess", true);
 
 // Pref to control whether we use a separate privileged content process
 // for about: pages. This pref name did not age well: we will have multiple
 // types of privileged content processes, each with different privileges.
 pref("browser.tabs.remote.separatePrivilegedContentProcess", false);
 
+// Pref to control whether we use a separate privileged content process
+// for certain mozilla webpages (which are listed in the following pref).
+pref("browser.tabs.remote.separatePrivilegedMozillaWebContentProcess", false);
+
+// The domains we will isolate into the Mozilla Content Process. Comma-separated
+// full domains: any subdomains of the domains listed will also be allowed.
+pref("browser.tabs.remote.separatedMozillaDomains", "addons.mozilla.org,accounts.firefox.com");
+
 // When this pref is enabled top level loads with a mismatched
 // Cross-Origin-Opener-Policy header will be loaded in a separate process.
 pref("browser.tabs.remote.useCrossOriginOpenerPolicy", false);
 
 // Enable the use of display-lists for SVG hit-testing and painting.
 pref("svg.display-lists.hit-testing.enabled", true);
 pref("svg.display-lists.painting.enabled", true);
 
--- a/toolkit/locales/en-US/toolkit/global/processTypes.ftl
+++ b/toolkit/locales/en-US/toolkit/global/processTypes.ftl
@@ -1,18 +1,22 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 process-type-web = Web Content
 
-# process used to run privileged pages,
+# process used to run privileged about pages,
 # such as about:home
 process-type-privilegedabout = Privileged About
 
+# process used to run privileged mozilla pages,
+# such as accounts.firefox.com
+process-type-privilegedmozilla = Privileged Mozilla Content
+
 process-type-extension = Extension
 
 # process used to open file:// URLs
 process-type-file = Local File
 
 # process used to isolate webpages that requested special
 # permission to allocate large amounts of memory
 process-type-weblargeallocation = Large Allocation
--- a/toolkit/modules/E10SUtils.jsm
+++ b/toolkit/modules/E10SUtils.jsm
@@ -10,16 +10,21 @@ const {Services} = ChromeUtils.import("r
 const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyPreferenceGetter(this, "useSeparateFileUriProcess",
                                       "browser.tabs.remote.separateFileUriProcess", false);
 XPCOMUtils.defineLazyPreferenceGetter(this, "allowLinkedWebInFileUriProcess",
                                       "browser.tabs.remote.allowLinkedWebInFileUriProcess", false);
 XPCOMUtils.defineLazyPreferenceGetter(this, "useSeparatePrivilegedAboutContentProcess",
                                       "browser.tabs.remote.separatePrivilegedContentProcess", false);
+XPCOMUtils.defineLazyPreferenceGetter(this, "separatePrivilegedMozillaWebContentProcess",
+                                      "browser.tabs.remote.separatePrivilegedMozillaWebContentProcess", false);
+XPCOMUtils.defineLazyPreferenceGetter(this, "separatedMozillaDomains",
+                                      "browser.tabs.remote.separatedMozillaDomains", false,
+                                      false, val => val.split(","));
 XPCOMUtils.defineLazyPreferenceGetter(this, "useHttpResponseProcessSelection",
                                       "browser.tabs.remote.useHTTPResponseProcessSelection", false);
 XPCOMUtils.defineLazyPreferenceGetter(this, "useCrossOriginOpenerPolicy",
                                       "browser.tabs.remote.useCrossOriginOpenerPolicy", false);
 XPCOMUtils.defineLazyServiceGetter(this, "serializationHelper",
                                    "@mozilla.org/network/serialization-helper;1",
                                    "nsISerializationHelper");
 
@@ -42,22 +47,33 @@ function getAboutModule(aURL) {
 
 const NOT_REMOTE = null;
 
 // These must match any similar ones in ContentParent.h and ProcInfo.h
 const WEB_REMOTE_TYPE = "web";
 const FILE_REMOTE_TYPE = "file";
 const EXTENSION_REMOTE_TYPE = "extension";
 const PRIVILEGEDABOUT_REMOTE_TYPE = "privilegedabout";
+const PRIVILEGEDMOZILLA_REMOTE_TYPE = "privilegedmozilla";
 
 // This must start with the WEB_REMOTE_TYPE above.
 const LARGE_ALLOCATION_REMOTE_TYPE = "webLargeAllocation";
 const DEFAULT_REMOTE_TYPE = WEB_REMOTE_TYPE;
 
 function validatedWebRemoteType(aPreferredRemoteType, aTargetUri, aCurrentUri, aRemoteSubframes) {
+  // To load into the Privileged Mozilla Content Process you must be https,
+  // and be an exact match or a subdomain of an allowlisted domain.
+  if (separatePrivilegedMozillaWebContentProcess &&
+      aTargetUri.asciiHost && aTargetUri.scheme == "https" &&
+      separatedMozillaDomains.some(function(val) {
+        return aTargetUri.asciiHost == val || aTargetUri.asciiHost.endsWith("." + val);
+      })) {
+    return PRIVILEGEDMOZILLA_REMOTE_TYPE;
+  }
+
   // If the domain is whitelisted to allow it to use file:// URIs, then we have
   // to run it in a file content process, in case it uses file:// sub-resources.
   const sm = Services.scriptSecurityManager;
   if (sm.inFileURIAllowlist(aTargetUri)) {
     return FILE_REMOTE_TYPE;
   }
 
   // If we're within a fission window, extract site information from the URI in
@@ -99,16 +115,17 @@ function validatedWebRemoteType(aPreferr
 
 var E10SUtils = {
   DEFAULT_REMOTE_TYPE,
   NOT_REMOTE,
   WEB_REMOTE_TYPE,
   FILE_REMOTE_TYPE,
   EXTENSION_REMOTE_TYPE,
   PRIVILEGEDABOUT_REMOTE_TYPE,
+  PRIVILEGEDMOZILLA_REMOTE_TYPE,
   LARGE_ALLOCATION_REMOTE_TYPE,
 
   useHttpResponseProcessSelection() {
     return useHttpResponseProcessSelection;
   },
   useCrossOriginOpenerPolicy() {
     return useCrossOriginOpenerPolicy;
   },