src/third_party/mozjs/extract/js/src/builtin/intl/CommonFunctions.js
/**
 * Returns the BCP 47 language tag for the host environment's current locale.
 *
 * Spec: ECMAScript Internationalization API Specification, 6.2.4.
 */
Returns the BCP 47 language tag for the host environment's current locale.
Spec: ECMAScript Internationalization API Specification, 6.2.4.
Returns the BCP 47 language tag for the host environment ' s current locale . Spec : ECMAScript Internationalization API Specification 6 . 2 . 4 .
function DefaultLocale() {
    if (intl_IsRuntimeDefaultLocale(localeCache.runtimeDefaultLocale))
        return localeCache.defaultLocale;
    var runtimeDefaultLocale = intl_RuntimeDefaultLocale();
    var locale = intl_supportedLocaleOrFallback(runtimeDefaultLocale);
    assertIsValidAndCanonicalLanguageTag(locale, "the computed default locale");
    assert(startOfUnicodeExtensions(locale) < 0,
           "the computed default locale must not contain a Unicode extension sequence");
    localeCache.defaultLocale = locale;
    localeCache.runtimeDefaultLocale = runtimeDefaultLocale;
    return locale;
}
function DefaultLocale ( ) { if ( intl_IsRuntimeDefaultLocale ( localeCache . runtimeDefaultLocale ) ) return localeCache . defaultLocale ; var runtimeDefaultLocale = intl_RuntimeDefaultLocale ( ) ; var locale = intl_supportedLocaleOrFallback ( runtimeDefaultLocale ) ; assertIsValidAndCanonicalLanguageTag ( locale , "the computed default locale" ) ; assert ( startOfUnicodeExtensions ( locale ) < 0 , "the computed default locale must not contain a Unicode extension sequence" ) ; localeCache . defaultLocale = locale ; localeCache . runtimeDefaultLocale = runtimeDefaultLocale ; return locale ; }
Returns the BCP 47 language tag for the host environment's current locale.
Returns the BCP 47 language tag for the host environment ' s current locale .
// If we didn't have a cache hit, compute the candidate default locale. // Cache the computed locale until the runtime default locale changes.