Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Enable e10s by default (again) (#2783)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemarvin committed Feb 13, 2020
1 parent 37ab021 commit a81f0f0
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ void loadFromIntent(final Intent intent) {
boolean enabled = extras.getBoolean("e10s", wasEnabled);
if (wasEnabled != enabled) {
SettingsStore.getInstance(this).setMultiprocessEnabled(enabled);
SessionStore.get().resetMultiprocess();
mHandler.postDelayed(() -> SystemUtils.scheduleRestart(this, 100), 500);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ SettingsStore getInstance(final @NonNull Context aContext) {
public final static boolean REMOTE_DEBUGGING_DEFAULT = false;
public final static boolean CONSOLE_LOGS_DEFAULT = false;
public final static boolean ENV_OVERRIDE_DEFAULT = false;
public final static boolean MULTIPROCESS_DEFAULT = false;
public final static boolean MULTIPROCESS_DEFAULT = true;
public final static boolean UI_HARDWARE_ACCELERATION_DEFAULT = true;
public final static boolean PERFORMANCE_MONITOR_DEFAULT = true;
public final static boolean DRM_PLAYBACK_DEFAULT = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ object EngineProvider {
builder.displayDpiOverride(SettingsStore.getInstance(context).displayDpi)
builder.screenSizeOverride(SettingsStore.getInstance(context).maxWindowWidth,
SettingsStore.getInstance(context).maxWindowHeight)
builder.useMultiprocess(SettingsStore.getInstance(context).isMultiprocessEnabled)

if (SettingsStore.getInstance(context).transparentBorderWidth > 0) {
builder.useMaxScreenDepth(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ private SessionState createSession(@NonNull SessionSettings aSettings, @SessionO

private GeckoSession createGeckoSession(@NonNull SessionSettings aSettings) {
GeckoSessionSettings geckoSettings = new GeckoSessionSettings.Builder()
.useMultiprocess(SettingsStore.getInstance(mContext).isMultiprocessEnabled())
.usePrivateMode(aSettings.isPrivateBrowsingEnabled())
.useTrackingProtection(aSettings.isTrackingProtectionEnabled())
.userAgentMode(aSettings.getUserAgentMode())
Expand Down Expand Up @@ -821,9 +820,6 @@ public void setUaMode(int mode) {
mState.mSession.loadUri(overrideUri != null ? overrideUri : mState.mUri, GeckoSession.LOAD_FLAGS_BYPASS_CACHE | GeckoSession.LOAD_FLAGS_REPLACE_HISTORY);
}

protected void resetMultiprocess() {
recreateSession();
}

protected void setTrackingProtection(final boolean aEnabled) {
if (mState.mSettings.isTrackingProtectionEnabled() != aEnabled) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,6 @@ public void setUaMode(final int mode) {
}
}

public void resetMultiprocess() {
for (Session session: mSessions) {
session.resetMultiprocess();
}
}

public void setTrackingProtection(final boolean aEnabled) {
for (Session session: mSessions) {
session.setTrackingProtection(aEnabled);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,9 @@ private void setMultiprocess(boolean value, boolean doApply) {
mBinding.multiprocessSwitch.setValue(value, false);
mBinding.multiprocessSwitch.setOnCheckedChangeListener(mMultiprocessListener);

SettingsStore.getInstance(getContext()).setMultiprocessEnabled(value);

if (doApply) {
SessionStore.get().resetMultiprocess();
SettingsStore.getInstance(getContext()).setMultiprocessEnabled(value);
showRestartDialog();
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/non_L10n.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<string name="settings_key_remote_debugging" translatable="false">settings_remote_debugging</string>
<string name="settings_key_console_logs" translatable="false">settings_console_logs</string>
<string name="settings_key_environment_override" translatable="false">settings_environment_override</string>
<string name="settings_key_multiprocess_e10s" translatable="false">settings_environment_multiprocess_e10s_v2</string>
<string name="settings_key_multiprocess_e10s" translatable="false">settings_environment_multiprocess_e10s_v3</string>
<string name="settings_key_performance_monitor" translatable="false">settings_performance_monitor</string>
<string name="settings_key_servo" translatable="false">settings_environment_servo</string>
<string name="settings_key_drm_playback" translatable="false">settings_key_drm_playback</string>
Expand Down
2 changes: 1 addition & 1 deletion versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ext.deps = [:]
def versions = [:]
// GeckoView versions can be found here:
// https://maven.mozilla.org/?prefix=maven2/org/mozilla/geckoview/
versions.gecko_view = "74.0.20200107215758"
versions.gecko_view = "75.0.20200213035745"
versions.android_components = "28.0.1"
// Note that android-components also depends on application-services,
// and in fact is our main source of appservices-related functionality.
Expand Down

0 comments on commit a81f0f0

Please sign in to comment.