diff options
Diffstat (limited to 'deps/v8/src/runtime/runtime-intl.cc')
-rw-r--r-- | deps/v8/src/runtime/runtime-intl.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/deps/v8/src/runtime/runtime-intl.cc b/deps/v8/src/runtime/runtime-intl.cc index 623fe05fe8..343d560a8a 100644 --- a/deps/v8/src/runtime/runtime-intl.cc +++ b/deps/v8/src/runtime/runtime-intl.cc @@ -143,6 +143,11 @@ RUNTIME_FUNCTION(Runtime_GetDefaultICULocale) { icu::Locale default_locale; + // Translate ICU's fallback locale to a well-known locale. + if (strcmp(default_locale.getName(), "en_US_POSIX") == 0) { + return *factory->NewStringFromStaticChars("en-US"); + } + // Set the locale char result[ULOC_FULLNAME_CAPACITY]; UErrorCode status = U_ZERO_ERROR; @@ -471,7 +476,7 @@ RUNTIME_FUNCTION(Runtime_InternalDateFormatToParts) { return isolate->heap()->undefined_value(); } } - JSObject::ValidateElements(result); + JSObject::ValidateElements(*result); return *result; } |