mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
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 <jgruber@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
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 <duhamelantoine1995@gmail.com>
This commit is contained in:
1 parent
ef6a738922
commit
4b2345a19e
2 files changed
+3
-2
No files matched your search
+1
-1
@@ -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 #####
|
||||
|
||||
|
||||
+2
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user