aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/objects/intl-objects.h
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2019-11-08 15:39:11 +0100
committerMichaël Zasso <targos@protonmail.com>2019-11-08 15:46:25 +0100
commit6ca81ad72a3c6fdf16c683335be748f22aaa9a0d (patch)
tree33c8ee75f729aed76c2c0b89c63f9bf1b4dd66aa /deps/v8/src/objects/intl-objects.h
parent1eee0b8bf8bba39b600fb16a9223e545e3bac2bc (diff)
downloadandroid-node-v8-6ca81ad72a3c6fdf16c683335be748f22aaa9a0d.tar.gz
android-node-v8-6ca81ad72a3c6fdf16c683335be748f22aaa9a0d.tar.bz2
android-node-v8-6ca81ad72a3c6fdf16c683335be748f22aaa9a0d.zip
deps: update V8 to 7.9.317.20
PR-URL: https://github.com/nodejs/node/pull/30020 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'deps/v8/src/objects/intl-objects.h')
-rw-r--r--deps/v8/src/objects/intl-objects.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/deps/v8/src/objects/intl-objects.h b/deps/v8/src/objects/intl-objects.h
index 4d4d3245fd..0c4a77b745 100644
--- a/deps/v8/src/objects/intl-objects.h
+++ b/deps/v8/src/objects/intl-objects.h
@@ -10,6 +10,7 @@
#define V8_OBJECTS_INTL_OBJECTS_H_
#include <map>
+#include <memory>
#include <set>
#include <string>
@@ -164,7 +165,7 @@ class Intl {
V8_WARN_UNUSED_RESULT static MaybeHandle<Object> StringLocaleCompare(
Isolate* isolate, Handle<String> s1, Handle<String> s2,
- Handle<Object> locales, Handle<Object> options);
+ Handle<Object> locales, Handle<Object> options, const char* method);
V8_WARN_UNUSED_RESULT static Handle<Object> CompareStrings(
Isolate* isolate, const icu::Collator& collator, Handle<String> s1,
@@ -173,7 +174,7 @@ class Intl {
// ecma402/#sup-properties-of-the-number-prototype-object
V8_WARN_UNUSED_RESULT static MaybeHandle<String> NumberToLocaleString(
Isolate* isolate, Handle<Object> num, Handle<Object> locales,
- Handle<Object> options);
+ Handle<Object> options, const char* method);
// ecma402/#sec-setnfdigitoptions
struct NumberFormatDigitOptions {
@@ -239,14 +240,14 @@ class Intl {
Handle<JSFunction> constructor, bool has_initialized_slot);
// enum for "caseFirst" option: shared by Intl.Locale and Intl.Collator.
- enum class CaseFirst { kUpper, kLower, kFalse, kUndefined };
+ enum class CaseFirst { kUndefined, kUpper, kLower, kFalse };
// Shared function to read the "caseFirst" option.
V8_WARN_UNUSED_RESULT static Maybe<CaseFirst> GetCaseFirst(
Isolate* isolate, Handle<JSReceiver> options, const char* method);
// enum for "hourCycle" option: shared by Intl.Locale and Intl.DateTimeFormat.
- enum class HourCycle { kH11, kH12, kH23, kH24, kUndefined };
+ enum class HourCycle { kUndefined, kH11, kH12, kH23, kH24 };
static HourCycle ToHourCycle(const std::string& str);
@@ -270,6 +271,12 @@ class Intl {
static bool IsValidCalendar(const icu::Locale& locale,
const std::string& value);
+ // Check the numberingSystem is valid.
+ static bool IsValidNumberingSystem(const std::string& value);
+
+ // Check the calendar is well formed.
+ static bool IsWellFormedCalendar(const std::string& value);
+
struct ResolvedLocale {
std::string locale;
icu::Locale icu_locale;
@@ -336,6 +343,8 @@ class Intl {
static const std::set<std::string>& GetAvailableLocalesForLocale();
static const std::set<std::string>& GetAvailableLocalesForDateFormat();
+
+ static bool IsStructurallyValidLanguageTag(const std::string& tag);
};
} // namespace internal