Bug 1650118: Part 8 - Remove useMultiprocess; r=geckoview-reviewers,esawin
authorAgi Sferro <agi@sferro.dev>
Tue, 27 Oct 2020 16:43:32 +0000
changeset 554766 c398f8d814b6b31a38cb3537c785096879b92777
parent 554765 38c5c63d236d0e964962cbf8be736f2f87856f1b
child 554767 9bc0aec298c2afa12122b7c562d62ef474802ee5
push id37898
push userabutkovits@mozilla.com
push dateWed, 28 Oct 2020 09:24:21 +0000
treeherdermozilla-central@83bf4fd3b1fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgeckoview-reviewers, esawin
bugs1650118
milestone84.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 1650118: Part 8 - Remove useMultiprocess; r=geckoview-reviewers,esawin Differential Revision: https://phabricator.services.mozilla.com/D92481
mobile/android/actors/WebBrowserChromeChild.jsm
mobile/android/chrome/geckoview/geckoview.js
mobile/android/modules/geckoview/GeckoViewSettings.jsm
--- a/mobile/android/actors/WebBrowserChromeChild.jsm
+++ b/mobile/android/actors/WebBrowserChromeChild.jsm
@@ -37,22 +37,16 @@ class WebBrowserChromeChild extends Geck
     aURI,
     aReferrerInfo,
     aHasPostData,
     aTriggeringPrincipal,
     aCsp
   ) {
     debug`shouldLoadURI ${aURI.displaySpec}`;
 
-    if (!GeckoViewSettings.useMultiprocess) {
-      // If we're in non-e10s mode there's no other process we can load this
-      // page in.
-      return true;
-    }
-
     if (!E10SUtils.shouldLoadURI(aDocShell, aURI, aHasPostData)) {
       E10SUtils.redirectLoad(
         aDocShell,
         aURI,
         aReferrerInfo,
         aTriggeringPrincipal,
         null,
         aCsp
--- a/mobile/android/chrome/geckoview/geckoview.js
+++ b/mobile/android/chrome/geckoview/geckoview.js
@@ -146,17 +146,17 @@ var ModuleManager = {
     return this.browser.browsingContext.currentWindowGlobal?.getActor(
       aActorName
     );
   },
 
   remoteTypeFor(aURI, currentType) {
     return E10SUtils.getRemoteTypeForURI(
       aURI,
-      GeckoViewSettings.useMultiprocess,
+      /* multiProcess */ true,
       /* useRemoteSubframes */ false,
       currentType,
       this.browser.currentURI
     );
   },
 
   // Ensures that session history has been flushed before changing remoteness
   async prepareToChangeRemoteness() {
@@ -505,27 +505,25 @@ function createBrowser() {
   browser.permanentKey = {};
 
   browser.setAttribute("nodefaultsrc", "true");
   browser.setAttribute("type", "content");
   browser.setAttribute("primary", "true");
   browser.setAttribute("flex", "1");
   browser.setAttribute("maychangeremoteness", "true");
 
-  if (GeckoViewSettings.useMultiprocess) {
-    const pointerEventsEnabled = Services.prefs.getBoolPref(
-      "dom.w3c_pointer_events.multiprocess.android.enabled",
-      false
-    );
-    if (pointerEventsEnabled) {
-      Services.prefs.setBoolPref("dom.w3c_pointer_events.enabled", true);
-    }
-    browser.setAttribute("remote", "true");
-    browser.setAttribute("remoteType", E10SUtils.DEFAULT_REMOTE_TYPE);
+  const pointerEventsEnabled = Services.prefs.getBoolPref(
+    "dom.w3c_pointer_events.multiprocess.android.enabled",
+    false
+  );
+  if (pointerEventsEnabled) {
+    Services.prefs.setBoolPref("dom.w3c_pointer_events.enabled", true);
   }
+  browser.setAttribute("remote", "true");
+  browser.setAttribute("remoteType", E10SUtils.DEFAULT_REMOTE_TYPE);
 
   return browser;
 }
 
 function InitLater(fn, object, name) {
   return DelayedInit.schedule(fn, object, name, 15000 /* 15s max wait */);
 }
 
--- a/mobile/android/modules/geckoview/GeckoViewSettings.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewSettings.jsm
@@ -43,20 +43,16 @@ const USER_AGENT_MODE_VR = 2;
 // This needs to match GeckoSessionSettings.java
 const DISPLAY_MODE_BROWSER = 0;
 const DISPLAY_MODE_MINIMAL_UI = 1;
 const DISPLAY_MODE_STANDALONE = 2;
 const DISPLAY_MODE_FULLSCREEN = 3;
 
 // Handles GeckoSession settings.
 class GeckoViewSettings extends GeckoViewModule {
-  static get useMultiprocess() {
-    return Services.prefs.getBoolPref("browser.tabs.remote.autostart", true);
-  }
-
   onInit() {
     debug`onInit`;
     this._userAgentMode = USER_AGENT_MODE_MOBILE;
     this._userAgentOverride = null;
     this._sessionContextId = null;
 
     this.registerListener(["GeckoView:GetUserAgent"]);
   }