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

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

Issue 1977343002: With LSan, run initial heap cleaning GCs during shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/ThreadState.cpp
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
index f11c93be01d7ae46318b0a448654beddbc2b995f..e8910cbfa8b093e742f3ab7989a1fcba2e7263f0 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -264,6 +264,13 @@ void ThreadState::cleanupMainThread()
{
ASSERT(isMainThread());
+#if defined(LEAK_SANITIZER)
+ // See comment below, clear out most garbage before releasing static
+ // persistents should some of the finalizers depend on touching
+ // these persistents.
+ ThreadHeap::collectAllGarbage();
+#endif
+
releaseStaticPersistentNodes();
#if defined(LEAK_SANITIZER)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698