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

Unified Diff: third_party/WebKit/Source/platform/heap/PersistentNode.h

Issue 2415363002: Unpoison CrossThreadPersistents (Closed)
Patch Set: fix Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/PersistentNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/PersistentNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698