Commit 8c2ec194 authored by Frank Tang's avatar Frank Tang Committed by Commit Bot

[Intl] Work around ICU-8420 for "und"

Fix intl402/Locale/likely-subtags

Bug: v8:8236
Change-Id: I0f109d0bedb1fda3f5eaac9cfce935788f54b595
Reviewed-on: https://chromium-review.googlesource.com/c/1459745Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59476}
parent daa38a9a
......@@ -430,6 +430,10 @@ Handle<String> MorphLocale(Isolate* isolate, String locale,
UErrorCode status = U_ZERO_ERROR;
icu::Locale icu_locale =
icu::Locale::forLanguageTag(locale.ToCString().get(), status);
// TODO(ftang): Remove the following lines after ICU-8420 fixed.
// Due to ICU-8420 "und" is turn into "" by forLanguageTag,
// we have to work around to use icu::Locale("und") directly
if (icu_locale.getName()[0] == '\0') icu_locale = icu::Locale("und");
CHECK(U_SUCCESS(status));
CHECK(!icu_locale.isBogus());
(*morph_func)(&icu_locale, &status);
......
......@@ -516,9 +516,6 @@
# https://bugs.chromium.org/p/v8/issues/detail?id=8246
'intl402/Locale/constructor-tag': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=8236
'intl402/Locale/likely-subtags': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=8242
'intl402/Locale/likely-subtags-grandfathered': [FAIL],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment