| Index: third_party/WebKit/Source/platform/heap/PersistentNode.h
|
| diff --git a/third_party/WebKit/Source/platform/heap/PersistentNode.h b/third_party/WebKit/Source/platform/heap/PersistentNode.h
|
| index 0e518a39e295041b229de7028b427acaa2c6ea22..ae2f68370704f448034d21e66c4c25474a897f5b 100644
|
| --- a/third_party/WebKit/Source/platform/heap/PersistentNode.h
|
| +++ b/third_party/WebKit/Source/platform/heap/PersistentNode.h
|
| @@ -107,7 +107,7 @@ class PLATFORM_EXPORT PersistentRegion final {
|
| PersistentRegion()
|
| : m_freeListHead(nullptr),
|
| m_slots(nullptr)
|
| -#if ENABLE(ASSERT)
|
| +#if DCHECK_IS_ON()
|
| ,
|
| m_persistentCount(0)
|
| #endif
|
| @@ -116,7 +116,7 @@ class PLATFORM_EXPORT PersistentRegion final {
|
| ~PersistentRegion();
|
|
|
| PersistentNode* allocatePersistentNode(void* self, TraceCallback trace) {
|
| -#if ENABLE(ASSERT)
|
| +#if DCHECK_IS_ON()
|
| ++m_persistentCount;
|
| #endif
|
| if (UNLIKELY(!m_freeListHead))
|
| @@ -133,7 +133,7 @@ class PLATFORM_EXPORT PersistentRegion final {
|
| ASSERT(m_persistentCount > 0);
|
| persistentNode->setFreeListNext(m_freeListHead);
|
| m_freeListHead = persistentNode;
|
| -#if ENABLE(ASSERT)
|
| +#if DCHECK_IS_ON()
|
| --m_persistentCount;
|
| #endif
|
| }
|
| @@ -157,7 +157,7 @@ class PLATFORM_EXPORT PersistentRegion final {
|
|
|
| PersistentNode* m_freeListHead;
|
| PersistentNodeSlots* m_slots;
|
| -#if ENABLE(ASSERT)
|
| +#if DCHECK_IS_ON()
|
| int m_persistentCount;
|
| #endif
|
| };
|
| @@ -224,6 +224,10 @@ class CrossThreadPersistentRegion final {
|
| NO_SANITIZE_ADDRESS
|
| static bool shouldTracePersistentNode(Visitor*, PersistentNode*);
|
|
|
| +#if defined(ADDRESS_SANITIZER)
|
| + void unpoisonCrossThreadPersistents();
|
| +#endif
|
| +
|
| private:
|
| friend class LockScope;
|
|
|
|
|