Bug 1634923 - Remove ESR version spoofing's special case for Firefox versions < 78. r=ethan

Differential Revision: https://phabricator.services.mozilla.com/D73559
This commit is contained in:
Chris Peterson 2020-05-12 22:24:40 +00:00
parent 7edf1f57a9
commit 25823f1866
2 changed files with 2 additions and 15 deletions

View File

@ -250,18 +250,12 @@ add_task(async function setup() {
});
let appVersion = parseInt(Services.appinfo.version);
let spoofedVersion;
if (appVersion < 78) {
// 68 is the last ESR version from the old six-week release cadence. After
// 78 we can assume the four-week new release cadence.
spoofedVersion = 68;
} else {
spoofedVersion = appVersion - ((appVersion - 78) % 13);
}
let spoofedVersion = appVersion - ((appVersion - 78) % 13);
spoofedUserAgentNavigator = `Mozilla/5.0 (${
SPOOFED_UA_NAVIGATOR_OS[AppConstants.platform]
}; rv:${spoofedVersion}.0) Gecko/20100101 Firefox/${spoofedVersion}.0`;
spoofedUserAgentHeader = `Mozilla/5.0 (${
SPOOFED_UA_HTTPHEADER_OS[AppConstants.platform]
}; rv:${spoofedVersion}.0) Gecko/20100101 Firefox/${spoofedVersion}.0`;

View File

@ -699,13 +699,6 @@ static uint32_t GetSpoofedVersion() {
// until ESR 104±1 in 2022. :) We have a debug assert above to catch if the
// spoofed version doesn't match the actual ESR version then.
// We infer the last and closest ESR version based on this rule.
if (firefoxVersion < 78) {
// 68 is the last ESR version from the old six-week release cadence. After
// 78 we can assume the four-week new release cadence.
return 68;
}
uint32_t spoofedVersion =
firefoxVersion - ((firefoxVersion - kKnownEsrVersion) % 13);