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

Unified Diff: Source/web/WebImageCache.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/web/WebImageCache.cpp
diff --git a/Source/web/WebImageCache.cpp b/Source/web/WebImageCache.cpp
index 33350464183a3d4970fb5d8f90709ff81e15786f..8648b1e225d7af5c39c645cbf97fb54f9c06d616 100644
--- a/Source/web/WebImageCache.cpp
+++ b/Source/web/WebImageCache.cpp
@@ -37,23 +37,22 @@ namespace blink {
void WebImageCache::setCacheLimitInBytes(size_t size)
{
- ImageDecodingStore::instance()->setCacheLimitInBytes(size);
+ ImageDecodingStore::instance().setCacheLimitInBytes(size);
}
void WebImageCache::clear()
{
- if (ImageDecodingStore::instance())
- ImageDecodingStore::instance()->clear();
+ ImageDecodingStore::instance().clear();
}
size_t WebImageCache::memoryUsageInBytes()
{
- return ImageDecodingStore::instance()->memoryUsageInBytes();
+ return ImageDecodingStore::instance().memoryUsageInBytes();
}
unsigned WebImageCache::cacheEntries()
{
- return ImageDecodingStore::instance()->cacheEntries();
+ return ImageDecodingStore::instance().cacheEntries();
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698