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 5e5bd450d6c5a777f7cc93eb5eceb087ed63c79f..f11c93be01d7ae46318b0a448654beddbc2b995f 100644 |
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp |
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp |
@@ -222,6 +222,8 @@ void ThreadState::runTerminationGC() |
// Finish sweeping. |
completeSweep(); |
+ releaseStaticPersistentNodes(); |
+ |
// From here on ignore all conservatively discovered |
// pointers into the heap owned by this thread. |
m_isTerminating = true; |
@@ -239,10 +241,10 @@ 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); |
+ // Release the thread-local static persistents that were |
+ // instantiated while running the termination GC. |
+ releaseStaticPersistentNodes(); |
oldCount = currentCount; |
currentCount = getPersistentRegion()->numberOfPersistents(); |
} |