From 4b2345a19e1129754f3dbf9d34cfc10bf0a88943 Mon Sep 17 00:00:00 2001 From: Jakob Linke Date: Fri, 25 Sep 2026 11:01:32 +0200 Subject: [PATCH] deps: V8: cherry-pick bb0e798c09e3 Original commit message: [regexp] Make generated IgnoreSet independent of the build locale gen-regexp-special-case implements Canonicalize (ECMA-262 22.2.2.9.3) for non-unicode /i, which is defined in terms of the locale-independent String.prototype.toUpperCase. It called icu::UnicodeString::toUpper() without a locale, which uses the ICU default locale of the build host. Under tr and az, 'i' uppercases to U+0130, so 'i' and 'I' were added to IgnoreSet and /i/i no longer matched "I". Uppercase in the root locale. The generated tables are unchanged for non-tr/az build hosts. Change-Id: I49c62a41e8e47abc2e6c84ac091a4533f917ed97 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8459863 Auto-Submit: Jakob Linke Commit-Queue: Patrick Thier Commit-Queue: Jakob Linke Reviewed-by: Patrick Thier Cr-Commit-Position: refs/heads/main@{#110086} Refs: https://github.com/v8/v8/commit/bb0e798c09e30594496fbca013a7d6ebd5e15e4c PR-URL: https://github.com/nodejs/node/pull/67527 Reviewed-By: Antoine du Hamel --- common.gypi | 2 +- deps/v8/src/regexp/gen-regexp-special-case.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index 4b41641c1f3..115b53ff658 100644 --- a/common.gypi +++ b/common.gypi @@ -50,7 +50,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.54', + 'v8_embedder_string': '-node.55', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/regexp/gen-regexp-special-case.cc b/deps/v8/src/regexp/gen-regexp-special-case.cc index 53b2c1327fb..92aa1049781 100644 --- a/deps/v8/src/regexp/gen-regexp-special-case.cc +++ b/deps/v8/src/regexp/gen-regexp-special-case.cc @@ -9,6 +9,7 @@ #include "src/base/strings.h" #include "src/regexp/special-case.h" +#include "unicode/locid.h" #include "unicode/unistr.h" namespace v8 { @@ -31,7 +32,7 @@ UChar32 Canonicalize(UChar32 ch) { // c. Let u be the same result produced as if by performing the algorithm // for String.prototype.toUpperCase using s as the this value. // d. Assert: Type(u) is String. - icu::UnicodeString& u = s.toUpper(); + icu::UnicodeString& u = s.toUpper(icu::Locale::getRoot()); // e. If u does not consist of a single code unit, return ch. if (u.length() != 1) {