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

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

Issue 1491253004: Release Oilpan heap singletons prior to LSan leak detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address non-LSan Oilpan compilation failure 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/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..9f080c12829af58539c9c704f8d6acad4abacd7c 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 enterStaticReferenceRegistrationDisabledScope();
+ void leaveStaticReferenceRegistrationDisabledScope();
+#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_disabledStaticPersistentsRegistration;
+#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,
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Handle.h ('k') | third_party/WebKit/Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698