mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1875313 - Use en-US as a fallback when spoof English is enabled in ICUUtils. r=timhuang,tjr
Differential Revision: https://phabricator.services.mozilla.com/D198967
This commit is contained in:
parent
dc0461473d
commit
69ffaa7b95
@ -41,7 +41,10 @@ already_AddRefed<nsAtom> ICUUtils::LanguageTagIterForContent::GetNext() {
|
|||||||
|
|
||||||
if (mCurrentFallbackIndex < 2) {
|
if (mCurrentFallbackIndex < 2) {
|
||||||
mCurrentFallbackIndex = 2;
|
mCurrentFallbackIndex = 2;
|
||||||
// Else take the app's locale:
|
// Else take the app's locale (or en-US, if spoof English applies):
|
||||||
|
if (mContent->OwnerDoc()->ShouldResistFingerprinting(RFPTarget::JSLocale)) {
|
||||||
|
return NS_Atomize("en-US");
|
||||||
|
}
|
||||||
nsAutoCString appLocale;
|
nsAutoCString appLocale;
|
||||||
LocaleService::GetInstance()->GetAppLocaleAsBCP47(appLocale);
|
LocaleService::GetInstance()->GetAppLocaleAsBCP47(appLocale);
|
||||||
return NS_Atomize(appLocale);
|
return NS_Atomize(appLocale);
|
||||||
|
Loading…
Reference in New Issue
Block a user