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

Commit 0f9e435

Browse files
authored
Permanently enable e10s (#2913)
Fixes #2912
1 parent f48ca97 commit 0f9e435

File tree

7 files changed

+2
-59
lines changed

7 files changed

+2
-59
lines changed

app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -543,16 +543,6 @@ void loadFromIntent(final Intent intent) {
543543
SettingsStore.getInstance(this).setHomepage(homepageUri.toString());
544544
}
545545

546-
// Enable/Disable e10s
547-
if (extras.containsKey("e10s")) {
548-
boolean wasEnabled = SettingsStore.getInstance(this).isMultiprocessEnabled();
549-
boolean enabled = extras.getBoolean("e10s", wasEnabled);
550-
if (wasEnabled != enabled) {
551-
SettingsStore.getInstance(this).setMultiprocessEnabled(enabled);
552-
mHandler.postDelayed(() -> SystemUtils.scheduleRestart(this, 100), 500);
553-
}
554-
}
555-
556546
// Open the provided URL in a new tab, if there is no URL provided we just open the homepage
557547
if (extras.containsKey("create_new_tab")) {
558548
openInTab = extras.getBoolean("create_new_tab", false);

app/src/common/shared/org/mozilla/vrbrowser/browser/SettingsStore.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ SettingsStore getInstance(final @NonNull Context aContext) {
4949
public final static boolean REMOTE_DEBUGGING_DEFAULT = false;
5050
public final static boolean CONSOLE_LOGS_DEFAULT = false;
5151
public final static boolean ENV_OVERRIDE_DEFAULT = false;
52-
public final static boolean MULTIPROCESS_DEFAULT = true;
5352
public final static boolean UI_HARDWARE_ACCELERATION_DEFAULT = true;
5453
public final static boolean UI_HARDWARE_ACCELERATION_DEFAULT_WAVEVR = false;
5554
public final static boolean PERFORMANCE_MONITOR_DEFAULT = true;
@@ -226,18 +225,6 @@ public void setEnvironmentOverrideEnabled(boolean isEnabled) {
226225
editor.commit();
227226
}
228227

229-
230-
public boolean isMultiprocessEnabled() {
231-
return mPrefs.getBoolean(
232-
mContext.getString(R.string.settings_key_multiprocess_e10s), MULTIPROCESS_DEFAULT);
233-
}
234-
235-
public void setMultiprocessEnabled(boolean isEnabled) {
236-
SharedPreferences.Editor editor = mPrefs.edit();
237-
editor.putBoolean(mContext.getString(R.string.settings_key_multiprocess_e10s), isEnabled);
238-
editor.commit();
239-
}
240-
241228
public boolean isUIHardwareAccelerationEnabled() {
242229
boolean defaultValue = UI_HARDWARE_ACCELERATION_DEFAULT;
243230
if (DeviceType.isWaveBuild()) {

app/src/common/shared/org/mozilla/vrbrowser/browser/engine/EngineProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ object EngineProvider {
3232
builder.displayDpiOverride(SettingsStore.getInstance(context).displayDpi)
3333
builder.screenSizeOverride(SettingsStore.getInstance(context).maxWindowWidth,
3434
SettingsStore.getInstance(context).maxWindowHeight)
35-
builder.useMultiprocess(SettingsStore.getInstance(context).isMultiprocessEnabled)
35+
builder.useMultiprocess(true)
3636

3737
if (SettingsStore.getInstance(context).transparentBorderWidth > 0) {
3838
builder.useMaxScreenDepth(true)

app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/settings/DeveloperOptionsView.java

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ protected void updateUI() {
5858
mBinding.showConsoleSwitch.setOnCheckedChangeListener(mConsoleLogsListener);
5959
setConsoleLogs(SettingsStore.getInstance(getContext()).isConsoleLogsEnabled(), false);
6060

61-
mBinding.multiprocessSwitch.setOnCheckedChangeListener(mMultiprocessListener);
62-
setMultiprocess(SettingsStore.getInstance(getContext()).isMultiprocessEnabled(), false);
63-
6461
mBinding.performanceMonitorSwitch.setOnCheckedChangeListener(mPerformanceListener);
6562
setPerformance(SettingsStore.getInstance(getContext()).isPerformanceMonitorEnabled(), false);
6663
// Hide Performance Monitor switch until it can handle multiple windows.
@@ -92,10 +89,6 @@ protected void updateUI() {
9289
setConsoleLogs(value, doApply);
9390
};
9491

95-
private SwitchSetting.OnCheckedChangeListener mMultiprocessListener = (compoundButton, value, doApply) -> {
96-
setMultiprocess(value, doApply);
97-
};
98-
9992
private SwitchSetting.OnCheckedChangeListener mPerformanceListener = (compoundButton, value, doApply) -> {
10093
setPerformance(value, doApply);
10194
};
@@ -121,9 +114,7 @@ protected void updateUI() {
121114
if (mBinding.showConsoleSwitch.isChecked() != SettingsStore.CONSOLE_LOGS_DEFAULT) {
122115
setConsoleLogs(SettingsStore.CONSOLE_LOGS_DEFAULT, true);
123116
}
124-
if (mBinding.multiprocessSwitch.isChecked() != SettingsStore.MULTIPROCESS_DEFAULT) {
125-
setMultiprocess(SettingsStore.MULTIPROCESS_DEFAULT, true);
126-
}
117+
127118
if (mBinding.servoSwitch.isChecked() != SettingsStore.SERVO_DEFAULT) {
128119
setServo(SettingsStore.SERVO_DEFAULT, true);
129120
}
@@ -171,17 +162,6 @@ private void setConsoleLogs(boolean value, boolean doApply) {
171162
}
172163
}
173164

174-
private void setMultiprocess(boolean value, boolean doApply) {
175-
mBinding.multiprocessSwitch.setOnCheckedChangeListener(null);
176-
mBinding.multiprocessSwitch.setValue(value, false);
177-
mBinding.multiprocessSwitch.setOnCheckedChangeListener(mMultiprocessListener);
178-
179-
if (doApply) {
180-
SettingsStore.getInstance(getContext()).setMultiprocessEnabled(value);
181-
showRestartDialog();
182-
}
183-
}
184-
185165
private void setUIHardwareAcceleration(boolean value, boolean doApply) {
186166
mBinding.hardwareAccelerationSwitch.setOnCheckedChangeListener(null);
187167
mBinding.hardwareAccelerationSwitch.setValue(value, false);

app/src/main/res/layout/options_developer.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@
4949
android:layout_height="wrap_content"
5050
app:description="@string/developer_options_show_console" />
5151

52-
<org.mozilla.vrbrowser.ui.views.settings.SwitchSetting
53-
android:id="@+id/multiprocess_switch"
54-
android:layout_width="match_parent"
55-
android:layout_height="wrap_content"
56-
app:description="@string/developer_options_multiprocess" />
57-
5852
<org.mozilla.vrbrowser.ui.views.settings.SwitchSetting
5953
android:id="@+id/performance_monitor_switch"
6054
android:layout_width="match_parent"

app/src/main/res/values/non_L10n.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<string name="settings_key_remote_debugging" translatable="false">settings_remote_debugging</string>
1212
<string name="settings_key_console_logs" translatable="false">settings_console_logs</string>
1313
<string name="settings_key_environment_override" translatable="false">settings_environment_override</string>
14-
<string name="settings_key_multiprocess_e10s" translatable="false">settings_environment_multiprocess_e10s_v3</string>
1514
<string name="settings_key_performance_monitor" translatable="false">settings_performance_monitor</string>
1615
<string name="settings_key_servo" translatable="false">settings_environment_servo</string>
1716
<string name="settings_key_drm_playback" translatable="false">settings_key_drm_playback</string>

app/src/main/res/values/strings.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,6 @@
329329
and is used to customize background environments of the app. -->
330330
<string name="developer_options_env_override">Enable Environment Override</string>
331331

332-
<!-- This string labels an On/Off switch in the developer options dialog and is used to toggle
333-
running content in a separate process.
334-
Multiprocessing: the running of two or more programs or sequences of instructions
335-
simultaneously by a computer with more than one central processor.
336-
A dialog should appear with a field labeled with the text, 'Enable Multiprocess'. -->
337-
<string name="developer_options_multiprocess">Enable Multiprocess</string>
338-
339332
<!-- This string labels an On/Off switch in the developer options dialog and is used to toggle
340333
the performance monitor. The Performance monitor is used to detect pages that cause the
341334
browser to run below a target framerate and pauses the page to restore performance.

0 commit comments

Comments
 (0)