Commit d701017d authored by Aaron Klotz's avatar Aaron Klotz
Browse files

Bug 1650118: Part 1 - Remove non-e10s mode from GeckoView; r=geckoview-reviewers,agi

parent 54517584
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@

pref("privacy.trackingprotection.pbmode.enabled", false);

pref("browser.tabs.remote.autostart", true);
pref("dom.ipc.keepProcessesAlive.web", 1);
pref("dom.ipc.processCount", 1);
pref("dom.ipc.processPrelaunch.enabled", false);
+1 −4
Original line number Diff line number Diff line
@@ -294,10 +294,7 @@ public final class GeckoRuntime implements Parcelable {
        if (DEBUG) {
            Log.d(LOGTAG, "init");
        }
        int flags = 0;
        if (settings.getUseMultiprocess()) {
            flags |= GeckoThread.FLAG_PRELOAD_CHILD;
        }
        int flags = GeckoThread.FLAG_PRELOAD_CHILD;

        if (settings.getPauseForDebuggerEnabled()) {
            flags |= GeckoThread.FLAG_DEBUGGING;
+0 −32
Original line number Diff line number Diff line
@@ -45,22 +45,6 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
            return new GeckoRuntimeSettings(settings);
        }

        /**
         * Set whether multiprocess support should be enabled.
         *
         * @param use A flag determining whether multiprocess should be enabled.
         *            Default is true.
         * @return This Builder instance.
         *
         * @deprecated This method will be removed in GeckoView 82, at which point GeckoView will
         *             only operate in multiprocess mode.
         */
        @Deprecated // Bug 1650118
        public @NonNull Builder useMultiprocess(final boolean use) {
            getSettings().mUseMultiprocess.set(use);
            return this;
        }

        /**
         * Set the custom Gecko process arguments.
         *
@@ -503,8 +487,6 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
            "general.aboutConfig.enable", false);
    /* package */ final Pref<Boolean> mForceUserScalable = new Pref<>(
            "browser.ui.zoom.force-user-scalable", false);
    /* package */ final Pref<Boolean> mUseMultiprocess = new Pref<>(
            "browser.tabs.remote.autostart", true);
    /* package */ final Pref<Boolean> mAutofillLogins = new Pref<Boolean>(
        "signon.autofillForms", true);

@@ -577,20 +559,6 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
        commitResetPrefs();
    }

    /**
     * Whether multiprocess is enabled.
     *
     * @return true if multiprocess is enabled, false otherwise.
     *
     * @deprecated This method will be removed in GeckoView 82, at which point GeckoView will only
     *             operate in multiprocess mode.
     */
    @Deprecated // Bug 1650118
    public boolean getUseMultiprocess() {
        return mUseMultiprocess.get();
    }


    /**
     * Get the custom Gecko process arguments.
     *
+3 −4
Original line number Diff line number Diff line
@@ -1031,7 +1031,7 @@ public class GeckoSession {
                                       Compositor compositor, EventDispatcher dispatcher,
                                       SessionAccessibility.NativeProvider sessionAccessibility,
                                       GeckoBundle initData, String id, String chromeUri,
                                       int screenId, boolean privateMode, boolean isRemote);
                                       int screenId, boolean privateMode);

        @Override // JNIObject
        public void disposeNative() {
@@ -1301,7 +1301,6 @@ public class GeckoSession {
        final String chromeUri = mSettings.getChromeUri();
        final int screenId = mSettings.getScreenId();
        final boolean isPrivate = mSettings.getUsePrivateMode();
        final boolean isRemote = runtime.getSettings().getUseMultiprocess();

        mWindow = new Window(runtime, this, mNativeQueue);
        mWebExtensionController.setRuntime(runtime);
@@ -1311,7 +1310,7 @@ public class GeckoSession {
        if (GeckoThread.isStateAtLeast(GeckoThread.State.PROFILE_READY)) {
            Window.open(mWindow, mNativeQueue, mCompositor, mEventDispatcher,
                        mAccessibility != null ? mAccessibility.nativeProvider : null,
                        createInitData(), mId, chromeUri, screenId, isPrivate, isRemote);
                        createInitData(), mId, chromeUri, screenId, isPrivate);
        } else {
            GeckoThread.queueNativeCallUntil(
                GeckoThread.State.PROFILE_READY,
@@ -1325,7 +1324,7 @@ public class GeckoSession {
                GeckoBundle.class, createInitData(),
                String.class, mId,
                String.class, chromeUri,
                screenId, isPrivate, isRemote);
                screenId, isPrivate);
        }

        onWindowChanged(WINDOW_OPEN, /* inProgress */ false);
+5 −0
Original line number Diff line number Diff line
@@ -556,8 +556,13 @@ bool BrowserTabsRemoteAutostart() {
  // Uber override pref for emergency blocking
  if (gBrowserTabsRemoteAutostart) {
    const char* forceDisable = PR_GetEnv("MOZ_FORCE_DISABLE_E10S");
#if defined(MOZ_WIDGET_ANDROID)
    // We need this for xpcshell on Android
    if (forceDisable && *forceDisable) {
#else
    // The environment variable must match the application version to apply.
    if (forceDisable && gAppData && !strcmp(forceDisable, gAppData->version)) {
#endif
      gBrowserTabsRemoteAutostart = false;
      status = kE10sForceDisabled;
    }
Loading