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

Unified Diff: Source/platform/image-decoders/ImageDecoder.h

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/platform/image-decoders/ImageDecoder.h
diff --git a/Source/platform/image-decoders/ImageDecoder.h b/Source/platform/image-decoders/ImageDecoder.h
index dfb6e54967f1735028ef26c2622783e483318a81..178b6f57dc590c456945b12db5bef28459c9c99e 100644
--- a/Source/platform/image-decoders/ImageDecoder.h
+++ b/Source/platform/image-decoders/ImageDecoder.h
@@ -232,9 +232,9 @@ public:
static qcms_profile* qcmsOutputDeviceProfile()
{
- AtomicallyInitializedStatic(OutputDeviceProfile*, outputDeviceProfile = new OutputDeviceProfile());
+ AtomicallyInitializedStaticReference(OutputDeviceProfile, outputDeviceProfile, new OutputDeviceProfile);
- return outputDeviceProfile->profile();
+ return outputDeviceProfile.profile();
}
#endif

Powered by Google App Engine
This is Rietveld 408576698