diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-06-27 11:18:24 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-07-03 09:38:30 +0000 |
commit | d94af01c90575348c4e81a418257f254b6f8d225 (patch) | |
tree | 77a26669b33eaa4d46b88b07e17dacc61eba6001 /chromium/third_party/icu/patches/timezone.patch | |
parent | 5d87695f37678f96492b258bbab36486c59866b4 (diff) |
BASELINE: Update Chromium to 75.0.3770.116
Change-Id: Ifcd5227841577e8ce81a1b7a54c56caba4d85e02
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/third_party/icu/patches/timezone.patch')
-rw-r--r-- | chromium/third_party/icu/patches/timezone.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/chromium/third_party/icu/patches/timezone.patch b/chromium/third_party/icu/patches/timezone.patch new file mode 100644 index 00000000000..bf7e1729aef --- /dev/null +++ b/chromium/third_party/icu/patches/timezone.patch @@ -0,0 +1,52 @@ +diff --git a/source/i18n/timezone.cpp b/source/i18n/timezone.cpp +index f129d8b6..32214d72 100644 +--- a/source/i18n/timezone.cpp ++++ b/source/i18n/timezone.cpp +@@ -527,6 +527,11 @@ TimeZone::detectHostTimeZone() + + // ------------------------------------- + ++static UMutex *gDefaultZoneMutex() { ++ static UMutex* m = new UMutex(); ++ return m; ++} ++ + /** + * Initialize DEFAULT_ZONE from the system default time zone. + * Upon return, DEFAULT_ZONE will not be NULL, unless operator new() +@@ -536,6 +541,7 @@ static void U_CALLCONV initDefault() + { + ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONE, timeZone_cleanup); + ++ Mutex lock(gDefaultZoneMutex()); + // If setDefault() has already been called we can skip getting the + // default zone information from the system. + if (DEFAULT_ZONE != NULL) { +@@ -571,7 +577,10 @@ TimeZone* U_EXPORT2 + TimeZone::createDefault() + { + umtx_initOnce(gDefaultZoneInitOnce, initDefault); +- return (DEFAULT_ZONE != NULL) ? DEFAULT_ZONE->clone() : NULL; ++ { ++ Mutex lock(gDefaultZoneMutex()); ++ return (DEFAULT_ZONE != NULL) ? DEFAULT_ZONE->clone() : NULL; ++ } + } + + // ------------------------------------- +@@ -581,9 +590,12 @@ TimeZone::adoptDefault(TimeZone* zone) + { + if (zone != NULL) + { +- TimeZone *old = DEFAULT_ZONE; +- DEFAULT_ZONE = zone; +- delete old; ++ { ++ Mutex lock(gDefaultZoneMutex()); ++ TimeZone *old = DEFAULT_ZONE; ++ DEFAULT_ZONE = zone; ++ delete old; ++ } + ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONE, timeZone_cleanup); + } + } |