| 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 c75236746b912b5a401770e520f52b252cbe468e..e0a2c77a8136577e2eed8503a7e9512d6985d109 100644
|
| --- a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
|
| +++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
|
| @@ -30,8 +30,6 @@
|
| #include "platform/LayoutUnit.h"
|
| #include "platform/fonts/FontMetrics.h"
|
| #include "wtf/StdLibExtras.h"
|
| -#include "wtf/ThreadSpecific.h"
|
| -#include "wtf/Threading.h"
|
| #include "wtf/text/StringBuffer.h"
|
| #include "wtf/text/StringBuilder.h"
|
|
|
| @@ -158,33 +156,11 @@ bool CSSPrimitiveValue::colorIsDerivedFromElement() const
|
|
|
| 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()
|
| {
|
| - DEFINE_THREAD_SAFE_STATIC_LOCAL(ThreadSpecific<CSSTextCacheWrapper>, cache, new ThreadSpecific<CSSTextCacheWrapper>);
|
| - return *cache;
|
| + RELEASE_ASSERT(isMainThread());
|
| + DEFINE_STATIC_LOCAL(CSSTextCache, cache, ());
|
| + return cache;
|
| }
|
|
|
| CSSPrimitiveValue::UnitType CSSPrimitiveValue::typeWithCalcResolved() const
|
|
|