Index: third_party/WebKit/Source/platform/heap/ThreadState.h |
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.h b/third_party/WebKit/Source/platform/heap/ThreadState.h |
index 576519cdc0cff84f90f21f525cd9f90204948694..2fb2467379e8f402109cfe43c74a4a429aab499f 100644 |
--- a/third_party/WebKit/Source/platform/heap/ThreadState.h |
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.h |
@@ -57,6 +57,7 @@ class CrossThreadPersistentRegion; |
struct GCInfo; |
class GarbageCollectedMixinConstructorMarker; |
class HeapObjectHeader; |
+class PersistentNode; |
class PersistentRegion; |
class BaseHeap; |
class SafePointAwareMutexLocker; |
@@ -509,6 +510,14 @@ public: |
size_t threadStackSize(); |
#endif |
+#if defined(LEAK_SANITIZER) |
+ void registerStaticPersistentNode(PersistentNode*); |
+ void releaseStaticPersistentNodes(); |
+ |
+ void enterDisabledStaticReferenceRegistrationScope(); |
+ void exitDisabledStaticReferenceRegistrationScope(); |
+#endif |
+ |
private: |
enum SnapshotType { |
HeapSnapshot, |
@@ -651,6 +660,15 @@ private: |
void* m_asanFakeStack; |
#endif |
+#if defined(LEAK_SANITIZER) |
+ // PersistentNodes that are stored in static references; |
+ // references we have to clear before initiating LSan's leak detection. |
+ HashSet<PersistentNode*> m_staticPersistents; |
+ |
+ // Count that controls scoped disabling of persistent registration. |
+ size_t m_disabledStaticPersistentsCount; |
+#endif |
+ |
// Ideally we want to allocate an array of size |gcInfoTableMax| but it will |
// waste memory. Thus we limit the array size to 2^8 and share one entry |
// with multiple types of vectors. This won't be an issue in practice, |