mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-20 08:51:04 +00:00
Bug 1272523 - Store locale cache data in more robust order. r=jwalden
This commit is contained in:
parent
c95d552240
commit
7cde99396c
@ -548,8 +548,8 @@ function DefaultLocaleIgnoringAvailableLocales() {
|
||||
}
|
||||
|
||||
// Cache the candidate locale until the runtime default locale changes.
|
||||
localeCandidateCache.runtimeDefaultLocale = runtimeDefaultLocale;
|
||||
localeCandidateCache.candidateDefaultLocale = candidate;
|
||||
localeCandidateCache.runtimeDefaultLocale = runtimeDefaultLocale;
|
||||
|
||||
assert(IsStructurallyValidLanguageTag(candidate),
|
||||
"the candidate must be structurally valid");
|
||||
@ -597,8 +597,8 @@ function DefaultLocale() {
|
||||
assert(localeContainsNoUnicodeExtensions(locale),
|
||||
"the computed default locale must not contain a Unicode extension sequence");
|
||||
|
||||
localeCache.runtimeDefaultLocale = runtimeDefaultLocale;
|
||||
localeCache.defaultLocale = locale;
|
||||
localeCache.runtimeDefaultLocale = runtimeDefaultLocale;
|
||||
|
||||
return locale;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user