diff --git a/common.gypi b/common.gypi index c72fd626503..d4c6fb9a803 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,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.13', + 'v8_embedder_string': '-node.14', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/include/v8-isolate.h b/deps/v8/include/v8-isolate.h index 17c107766b9..bef9ebbd556 100644 --- a/deps/v8/include/v8-isolate.h +++ b/deps/v8/include/v8-isolate.h @@ -9,6 +9,7 @@ #include #include +#include #include #include "cppgc/common.h" @@ -1717,6 +1718,12 @@ class V8_EXPORT Isolate { */ void LocaleConfigurationChangeNotification(); + /** + * Returns the default locale in a string if Intl support is enabled. + * Otherwise returns an empty string. + */ + std::string GetDefaultLocale(); + Isolate() = delete; ~Isolate() = delete; Isolate(const Isolate&) = delete; diff --git a/deps/v8/src/api/api.cc b/deps/v8/src/api/api.cc index f8d3c5aa123..9019296f49d 100644 --- a/deps/v8/src/api/api.cc +++ b/deps/v8/src/api/api.cc @@ -10768,6 +10768,17 @@ void v8::Isolate::LocaleConfigurationChangeNotification() { #endif // V8_INTL_SUPPORT } +std::string Isolate::GetDefaultLocale() { + i::Isolate* i_isolate = reinterpret_cast(this); + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(i_isolate); + +#ifdef V8_INTL_SUPPORT + return i_isolate->DefaultLocale(); +#else + return std::string(); +#endif +} + #if defined(V8_OS_WIN) && defined(V8_ENABLE_ETW_STACK_WALKING) void Isolate::SetFilterETWSessionByURLCallback( FilterETWSessionByURLCallback callback) {