forked from pool/nodejs-electron
- Update to 21.0.0 - Disable PDF viewer, we do not use it - Intentionally break @electron/fuses OBS-URL: https://build.opensuse.org/request/show/1007982 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=35
55 lines
2.2 KiB
Diff
55 lines
2.2 KiB
Diff
From ba6db33e06999bf6f6b34c487c09e60ae76337c1 Mon Sep 17 00:00:00 2001
|
|
From: Frank Tang <ftang@chromium.org>
|
|
Date: Tue, 21 Jun 2022 17:42:26 -0700
|
|
Subject: [PATCH] Fix unreachable code under --harmony-intl-number-format-v3
|
|
|
|
ICU 71 added new enum value UNUM_APPROXIMATELY_SIGN_FIELD
|
|
need to map to "approximatelySign"
|
|
|
|
We also discover a spec bug in
|
|
https://github.com/tc39/proposal-intl-numberformat-v3/issues/99
|
|
|
|
All the parts of formatRangeToParts should have a source "shared" for
|
|
the case that start and end are the same or very close.
|
|
|
|
Bug: chromium:1336865
|
|
Change-Id: I89142479989d3d2017d8cb89194db737710c38ed
|
|
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3717278
|
|
Reviewed-by: Shu-yu Guo <syg@chromium.org>
|
|
Commit-Queue: Frank Tang <ftang@chromium.org>
|
|
Cr-Commit-Position: refs/heads/main@{#81286}
|
|
---
|
|
src/init/heap-symbols.h | 1 +
|
|
src/objects/intl-objects.cc | 3 +
|
|
test/intl/regress-1336865.js | 79 ++++++++++++++++++++
|
|
tools/v8heapconst.py | 140 +++++++++++++++++------------------
|
|
4 files changed, 153 insertions(+), 70 deletions(-)
|
|
create mode 100644 test/intl/regress-1336865.js
|
|
|
|
diff --git a/src/init/heap-symbols.h b/src/init/heap-symbols.h
|
|
index da2cdccf1d5..c00e2c45097 100644
|
|
--- a/v8/src/init/heap-symbols.h
|
|
+++ b/v8/src/init/heap-symbols.h
|
|
@@ -8,6 +8,7 @@
|
|
#ifdef V8_INTL_SUPPORT
|
|
#define INTERNALIZED_STRING_LIST_GENERATOR_INTL(V, _) \
|
|
V(_, adoptText_string, "adoptText") \
|
|
+ V(_, approximatelySign_string, "approximatelySign") \
|
|
V(_, baseName_string, "baseName") \
|
|
V(_, accounting_string, "accounting") \
|
|
V(_, breakType_string, "breakType") \
|
|
diff --git a/src/objects/intl-objects.cc b/src/objects/intl-objects.cc
|
|
index 93f7000bf5d..25cc4fdd04a 100644
|
|
--- a/v8/src/objects/intl-objects.cc
|
|
+++ b/v8/src/objects/intl-objects.cc
|
|
@@ -2744,6 +2744,9 @@ Handle<String> Intl::NumberFieldToType(Isolate* isolate,
|
|
case UNUM_MEASURE_UNIT_FIELD:
|
|
return isolate->factory()->unit_string();
|
|
|
|
+ case UNUM_APPROXIMATELY_SIGN_FIELD:
|
|
+ return isolate->factory()->approximatelySign_string();
|
|
+
|
|
default:
|
|
UNREACHABLE();
|
|
}
|