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

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

Issue 1957523007: Cleanly release thread-local static persistents during termination GCs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased 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 | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | 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 e1294ec308fb758f3ef5f6e26e3ba3df415c4253..5e5bd450d6c5a777f7cc93eb5eceb087ed63c79f 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -226,8 +226,6 @@ void ThreadState::runTerminationGC()
// pointers into the heap owned by this thread.
m_isTerminating = true;
- releaseStaticPersistentNodes();
-
// Set the terminate flag on all heap pages of this thread. This is used to
// ensure we don't trace pages on other threads that are not part of the
// thread local GC.
@@ -241,6 +239,9 @@ void ThreadState::runTerminationGC()
int currentCount = getPersistentRegion()->numberOfPersistents();
ASSERT(currentCount >= 0);
while (currentCount != oldCount) {
+ // Release the thread-local static persistents, including any
+ // that are instantiated while running the termination GCs.
+ releaseStaticPersistentNodes();
ThreadHeap::collectGarbageForTerminatingThread(this);
oldCount = currentCount;
currentCount = getPersistentRegion()->numberOfPersistents();
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698