diff options
author | Ujjwal Sharma <usharma1998@gmail.com> | 2019-03-15 18:35:06 +0530 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2019-03-28 16:36:18 -0400 |
commit | f579e1194046c50f2e6bb54348d48c8e7d1a53cf (patch) | |
tree | 9125787c758358365f74f9fd9673c14f57e67870 /deps/v8/src/objects/js-collator.cc | |
parent | 2c73868b0471fbd4038f500d076df056cbf697fe (diff) | |
download | node-new-f579e1194046c50f2e6bb54348d48c8e7d1a53cf.tar.gz |
deps: update V8 to 7.4.288.13
PR-URL: https://github.com/nodejs/node/pull/26685
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'deps/v8/src/objects/js-collator.cc')
-rw-r--r-- | deps/v8/src/objects/js-collator.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/deps/v8/src/objects/js-collator.cc b/deps/v8/src/objects/js-collator.cc index 3c2efa93db..dd927f02dc 100644 --- a/deps/v8/src/objects/js-collator.cc +++ b/deps/v8/src/objects/js-collator.cc @@ -45,7 +45,7 @@ void CreateDataPropertyForOptions(Isolate* isolate, Handle<JSObject> options, // This is a brand new JSObject that shouldn't already have the same // key so this shouldn't fail. CHECK(JSReceiver::CreateDataProperty(isolate, options, key, value_str, - kDontThrow) + Just(kDontThrow)) .FromJust()); } @@ -56,7 +56,7 @@ void CreateDataPropertyForOptions(Isolate* isolate, Handle<JSObject> options, // This is a brand new JSObject that shouldn't already have the same // key so this shouldn't fail. CHECK(JSReceiver::CreateDataProperty(isolate, options, key, value_obj, - kDontThrow) + Just(kDontThrow)) .FromJust()); } @@ -484,11 +484,10 @@ MaybeHandle<JSCollator> JSCollator::Initialize(Isolate* isolate, return collator; } -std::set<std::string> JSCollator::GetAvailableLocales() { - int32_t num_locales = 0; - const icu::Locale* icu_available_locales = - icu::Collator::getAvailableLocales(num_locales); - return Intl::BuildLocaleSet(icu_available_locales, num_locales); +const std::set<std::string>& JSCollator::GetAvailableLocales() { + static base::LazyInstance<Intl::AvailableLocales<icu::Collator>>::type + available_locales = LAZY_INSTANCE_INITIALIZER; + return available_locales.Pointer()->Get(); } } // namespace internal |