Bug 1567284 - Allow about:logins to use the Privileged About content process even if about:home isn't ready for it just yet. r=ckerschb,Gijs
authorJared Wein <jwein@mozilla.com>
Thu, 25 Jul 2019 19:44:50 +0000
changeset 484760 81edaa8a42b5e6b05e743279cbaf3c6bf8d09b9f
parent 484759 60953bbf4c521f2f8c041a80b824814f5c3a8506
child 484761 47e72c204ef61c34509e430c0976f4db680e384a
push id90926
push userjwein@mozilla.com
push dateThu, 25 Jul 2019 19:55:30 +0000
treeherderautoland@81edaa8a42b5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersckerschb, Gijs
bugs1567284
milestone70.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 1567284 - Allow about:logins to use the Privileged About content process even if about:home isn't ready for it just yet. r=ckerschb,Gijs Differential Revision: https://phabricator.services.mozilla.com/D39142
browser/components/aboutlogins/AboutLoginsParent.jsm
toolkit/modules/E10SUtils.jsm
--- a/browser/components/aboutlogins/AboutLoginsParent.jsm
+++ b/browser/components/aboutlogins/AboutLoginsParent.jsm
@@ -38,28 +38,19 @@ XPCOMUtils.defineLazyPreferenceGetter(
   "BREACH_ALERTS_ENABLED",
   "signon.management.page.breach-alerts.enabled",
   false
 );
 
 const ABOUT_LOGINS_ORIGIN = "about:logins";
 const MASTER_PASSWORD_NOTIFICATION_ID = "master-password-login-required";
 
-const PRIVILEGEDABOUT_PROCESS_PREF =
-  "browser.tabs.remote.separatePrivilegedContentProcess";
-const PRIVILEGEDABOUT_PROCESS_ENABLED = Services.prefs.getBoolPref(
-  PRIVILEGEDABOUT_PROCESS_PREF,
-  false
-);
-
-// When the privileged content process is enabled, we expect about:logins
-// to load in it. Otherwise, it's in a normal web content process.
-const EXPECTED_ABOUTLOGINS_REMOTE_TYPE = PRIVILEGEDABOUT_PROCESS_ENABLED
-  ? E10SUtils.PRIVILEGEDABOUT_REMOTE_TYPE
-  : E10SUtils.DEFAULT_REMOTE_TYPE;
+// about:logins will always use the privileged content process,
+// even if it is disabled for other consumers such as about:newtab.
+const EXPECTED_ABOUTLOGINS_REMOTE_TYPE = E10SUtils.PRIVILEGEDABOUT_REMOTE_TYPE;
 
 const convertSubjectToLogin = subject => {
   subject.QueryInterface(Ci.nsILoginMetaInfo).QueryInterface(Ci.nsILoginInfo);
   const login = LoginHelper.loginToVanillaObject(subject);
   if (!LoginHelper.isUserFacingLogin(login)) {
     return null;
   }
   return augmentVanillaLoginObject(login);
--- a/toolkit/modules/E10SUtils.jsm
+++ b/toolkit/modules/E10SUtils.jsm
@@ -326,17 +326,18 @@ var E10SUtils = {
           return WebExtensionPolicy.useRemoteWebExtensions
             ? EXTENSION_REMOTE_TYPE
             : NOT_REMOTE;
         }
 
         if (flags & Ci.nsIAboutModule.URI_MUST_LOAD_IN_CHILD) {
           if (
             flags & Ci.nsIAboutModule.URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS &&
-            useSeparatePrivilegedAboutContentProcess
+            (useSeparatePrivilegedAboutContentProcess ||
+              aURI.filePath == "logins")
           ) {
             return PRIVILEGEDABOUT_REMOTE_TYPE;
           }
           return DEFAULT_REMOTE_TYPE;
         }
 
         // If the about page can load in parent or child, it should be safe to
         // load in any remote type.