f5dac714ad
setUnicodeKeywordValue doesn't remove unrelated keyword/value pairs when the locale is too long, which causes NumberFormat to fail when calling createInstance. Fix this by using LocaleBuilder to add keyword/value into a new locale instead of removing the keyword. Also see https://unicode-org.atlassian.net/browse/ICU-20862 Bug: chromium:1012579 Change-Id: I0f664f60dad8fe786443c8ca8b21ea43323cbf49 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1855586 Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/master@{#64253}
7 lines
285 B
JavaScript
7 lines
285 B
JavaScript
// 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.
|
|
|
|
let longLocale = 'de-u-cf-cu-em-kk-kr-ks-kv-lb-lw-ms-nu-rg-sd-ss-tz';
|
|
rtf = new Intl.RelativeTimeFormat(longLocale);
|