Bug 1275039 - Block e10s from being activated for release users on Windows XP. r=jimm
There's some reorganization of the code in aboutSupport to support displaying Windows XP as a string without needing to be localized, as this will require an uplift to Aurora.
MozReview-Commit-ID: 7SArswDOffH
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -44,33 +44,36 @@ var snapshotFormatters = {
let version = AppConstants.MOZ_APP_VERSION_DISPLAY;
if (data.vendor)
version += " (" + data.vendor + ")";
$("version-box").textContent = version;
$("buildid-box").textContent = data.buildID;
if (data.updateChannel)
$("updatechannel-box").textContent = data.updateChannel;
- let statusStrName = ".unknown";
+ let statusText = stringBundle().GetStringFromName("multiProcessStatus.unknown");
// Whitelist of known values with string descriptions:
switch (data.autoStartStatus) {
case 0:
case 1:
case 2:
case 4:
- case 5:
case 6:
case 7:
case 8:
case 9:
- statusStrName = "." + data.autoStartStatus;
+ statusText = stringBundle().GetStringFromName("multiProcessStatus." + data.autoStartStatus);
+ break;
+
+ case 10:
+ statusText = "Windows XP";
+ break;
}
- let statusText = stringBundle().GetStringFromName("multiProcessStatus" + statusStrName);
$("multiprocess-box").textContent = stringBundle().formatStringFromName("multiProcessWindows",
[data.numRemoteWindows, data.numTotalWindows, statusText], 3);
$("safemode-box").textContent = data.safeMode;
},
crashes: function crashes(data) {
if (!AppConstants.MOZ_CRASHREPORTER)
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -4693,16 +4693,17 @@ enum {
kE10sDisabledByUser = 2,
// kE10sDisabledInSafeMode = 3, was removed in bug 1172491.
kE10sDisabledForAccessibility = 4,
// kE10sDisabledForMacGfx = 5, was removed in bug 1068674.
kE10sDisabledForBidi = 6,
kE10sDisabledForAddons = 7,
kE10sForceDisabled = 8,
kE10sDisabledForXPAcceleration = 9,
+ kE10sDisabledForOperatingSystem = 10,
};
#if defined(XP_WIN) || defined(XP_MACOSX)
const char* kAccessibilityLastRunDatePref = "accessibility.lastLoadDate";
const char* kAccessibilityLoadedLastSessionPref = "accessibility.loadedInLastSession";
static inline uint32_t
PRTimeToSeconds(PRTime t_usec)
@@ -4765,35 +4766,46 @@ MultiprocessBlockPolicy() {
if (difference > ONE_WEEK_IN_SECONDS || !a11yRunDate) {
Preferences::ClearUser(kAccessibilityLastRunDatePref);
} else {
disabledForA11y = true;
}
}
#endif // XP_WIN || XP_MACOSX
+ if (disabledForA11y) {
+ gMultiprocessBlockPolicy = kE10sDisabledForAccessibility;
+ return gMultiprocessBlockPolicy;
+ }
+
+ /**
+ * Avoids enabling e10s for Windows XP users on the release channel.
+ */
+#if defined(XP_WIN)
+ if (Preferences::GetDefaultCString("app.update.channel").EqualsLiteral("release") &&
+ !IsVistaOrLater()) {
+ gMultiprocessBlockPolicy = kE10sDisabledForOperatingSystem;
+ return gMultiprocessBlockPolicy;
+ }
+#endif
+
#if defined(XP_WIN)
/**
* We block on Windows XP if layers acceleration is requested. This is due to
* bug 1237769 where D3D9 and e10s behave badly together on XP.
*/
bool layersAccelerationRequested = !Preferences::GetBool("layers.acceleration.disabled") ||
Preferences::GetBool("layers.acceleration.force-enabled");
if (layersAccelerationRequested && !IsVistaOrLater()) {
gMultiprocessBlockPolicy = kE10sDisabledForXPAcceleration;
return gMultiprocessBlockPolicy;
}
#endif // XP_WIN
- if (disabledForA11y) {
- gMultiprocessBlockPolicy = kE10sDisabledForAccessibility;
- return gMultiprocessBlockPolicy;
- }
-
/**
* Avoids enabling e10s for certain locales that require bidi selection,
* which currently doesn't work well with e10s.
*/
bool disabledForBidi = false;
nsCOMPtr<nsIXULChromeRegistry> registry =
mozilla::services::GetXULChromeRegistryService();
@@ -4801,18 +4813,16 @@ MultiprocessBlockPolicy() {
registry->IsLocaleRTL(NS_LITERAL_CSTRING("global"), &disabledForBidi);
}
if (disabledForBidi) {
gMultiprocessBlockPolicy = kE10sDisabledForBidi;
return gMultiprocessBlockPolicy;
}
-
-
/*
* None of the blocking policies matched, so e10s is allowed to run.
* Cache the information and return 0, indicating success.
*/
gMultiprocessBlockPolicy = 0;
return 0;
}