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

Unified Diff: third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp

Issue 1502153005: Revert of Release Oilpan heap singletons prior to LSan leak detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
index 83ba6adf45439a0583546f9b1e0f214cd0403864..de14f7a56637d737bf52b3e482ddc5cb745a6008 100644
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
@@ -158,33 +158,9 @@
}
using CSSTextCache = WillBePersistentHeapHashMap<RawPtrWillBeWeakMember<const CSSPrimitiveValue>, String>;
-
-#if ENABLE(OILPAN) && defined(LEAK_SANITIZER)
-
-namespace {
-// With LSan, wrap the persistent cache so that the registration of the
-// (per-thread) static reference can be done.
-class CSSTextCacheWrapper {
-public:
- CSSTextCacheWrapper()
- {
- m_cache.registerAsStaticReference();
- }
-
- operator CSSTextCache&() { return m_cache; }
-
-private:
- CSSTextCache m_cache;
-};
-
-}
-#else
-using CSSTextCacheWrapper = CSSTextCache;
-#endif
-
static CSSTextCache& cssTextCache()
{
- AtomicallyInitializedStaticReference(ThreadSpecific<CSSTextCacheWrapper>, cache, new ThreadSpecific<CSSTextCacheWrapper>);
+ AtomicallyInitializedStaticReference(ThreadSpecific<CSSTextCache>, cache, new ThreadSpecific<CSSTextCache>());
return *cache;
}
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.cpp ('k') | third_party/WebKit/Source/core/fetch/Resource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698