Skip to content

Commit

Permalink
deps: V8: cherry-pick d2db7fa7f786
Browse files Browse the repository at this point in the history
Original commit message:

    [Intl] Fix nb / no fallback

    ICU 69 moved content of nb resources to no and let
    nb fallback to no. This break our original design of checking
    locale availability. Hard wire to check on no if nb fail for now
    until we come out with a better fix.

    Bug: chromium:1215606
    Change-Id: I831529d29590cc643ee0109fb2ce8948dac75613
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3068010
    Commit-Queue: Frank Tang <[email protected]>
    Reviewed-by: Shu-yu Guo <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#76044}

Refs: v8/v8@d2db7fa
PR-URL: #45785
Fixes: #45784
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
  • Loading branch information
richardlau committed Dec 8, 2022
1 parent 5b2ea12 commit 4b422d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.87',
'v8_embedder_string': '-node.88',

##### V8 defaults for Node.js #####

Expand Down
9 changes: 8 additions & 1 deletion deps/v8/src/objects/intl-objects.cc
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,14 @@ std::set<std::string> Intl::BuildLocaleSet(
for (const std::string& locale : icu_available_locales) {
if (path != nullptr || validate_key != nullptr) {
if (!ValidateResource(icu::Locale(locale.c_str()), path, validate_key)) {
continue;
// FIXME(chromium:1215606) Find a beter fix for nb->no fallback
if (locale != "nb") {
continue;
}
// Try no for nb
if (!ValidateResource(icu::Locale("no"), path, validate_key)) {
continue;
}
}
}
locales.insert(locale);
Expand Down

0 comments on commit 4b422d3

Please sign in to comment.