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

Unified Diff: Source/modules/webdatabase/QuotaTracker.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
Index: Source/modules/webdatabase/QuotaTracker.cpp
diff --git a/Source/modules/webdatabase/QuotaTracker.cpp b/Source/modules/webdatabase/QuotaTracker.cpp
index 74c3ec046b8221aad02b4b933b59ffa6e878e78e..a4f5dcd182deb46a0c00511580e5ef0bd0984202 100644
--- a/Source/modules/webdatabase/QuotaTracker.cpp
+++ b/Source/modules/webdatabase/QuotaTracker.cpp
@@ -39,7 +39,7 @@ namespace blink {
QuotaTracker& QuotaTracker::instance()
{
- AtomicallyInitializedStatic(QuotaTracker&, tracker = *new QuotaTracker);
+ AtomicallyInitializedStaticReference(QuotaTracker, tracker, new QuotaTracker);
return tracker;
}

Powered by Google App Engine
This is Rietveld 408576698