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:
parent
aa7c6e22f9
commit
8574ecf2b7
@ -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;
|
||||
|
7
test/intl/regress-997401.js
Normal file
7
test/intl/regress-997401.js
Normal 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');
|
Loading…
Reference in New Issue
Block a user