Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1064)

Unified Diff: Source/wtf/unicode/icu/CollatorICU.cpp

Issue 794223003: Cheaper thread-safe atomic initialization of static references. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add type check for initial value Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Source/wtf/Threading.h ('K') | « Source/wtf/text/TextEncoding.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/unicode/icu/CollatorICU.cpp
diff --git a/Source/wtf/unicode/icu/CollatorICU.cpp b/Source/wtf/unicode/icu/CollatorICU.cpp
index a21e9325a5add6c86844373e4bb8b07ca1e06ffb..93e95a1bd83793c075ae79e98a47b2e06c7dc395 100644
--- a/Source/wtf/unicode/icu/CollatorICU.cpp
+++ b/Source/wtf/unicode/icu/CollatorICU.cpp
@@ -47,7 +47,7 @@ namespace WTF {
static UCollator* cachedCollator;
static Mutex& cachedCollatorMutex()
{
- AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex);
+ AtomicallyInitializedStaticReference(Mutex, mutex, new Mutex);
return mutex;
}
« Source/wtf/Threading.h ('K') | « Source/wtf/text/TextEncoding.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698