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: IqLjEIKq0VI
This commit is contained in:
Felipe Gomes 2016-05-25 18:51:48 -03:00
Родитель cef3cdb93f
Коммит 5dea447448
2 изменённых файлов: 24 добавлений и 11 удалений

Просмотреть файл

@ -49,7 +49,7 @@ var snapshotFormatters = {
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) {
@ -57,15 +57,18 @@ var snapshotFormatters = {
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);

Просмотреть файл

@ -4703,6 +4703,7 @@ enum {
kE10sDisabledForAddons = 7,
kE10sForceDisabled = 8,
kE10sDisabledForXPAcceleration = 9,
kE10sDisabledForOperatingSystem = 10,
};
#if defined(XP_WIN) || defined(XP_MACOSX)
@ -4775,6 +4776,22 @@ MultiprocessBlockPolicy() {
}
#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
@ -4789,11 +4806,6 @@ MultiprocessBlockPolicy() {
}
#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.
@ -4811,8 +4823,6 @@ MultiprocessBlockPolicy() {
return gMultiprocessBlockPolicy;
}
/*
* None of the blocking policies matched, so e10s is allowed to run.
* Cache the information and return 0, indicating success.