Remove CHECK which fail while the locale is long.

Bug: chromium:997401
Change-Id: I7a78f4ad1fd05ab2bb2dbcd343060b2647aef4e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1771954
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63660}
This commit is contained in:
Frank Tang 2019-09-10 11:54:43 -07:00 committed by Commit Bot
parent aa7c6e22f9
commit 8574ecf2b7
2 changed files with 13 additions and 1 deletions

View File

@ -1693,7 +1693,12 @@ std::map<std::string, std::string> LookupAndValidateUnicodeExtensions(
status = U_ZERO_ERROR;
icu_locale->setUnicodeKeywordValue(
bcp47_key == nullptr ? keyword : bcp47_key, nullptr, status);
CHECK(U_SUCCESS(status));
// Ignore failures in ICU and skip to the next keyword.
//
// This is fine.™
if (U_FAILURE(status)) {
status = U_ZERO_ERROR;
}
}
return extensions;

View File

@ -0,0 +1,7 @@
// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Test no crash with a very long locale.
let dtf = new Intl.DateTimeFormat(
'de-u-cu-eur-em-default-hc-h23-ks-level1-lb-strict-lw-normal-ms-metric-nu-latn-rg-atzzzz-sd-atat1-ss-none-tz-atvie-va-posix');