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

Unified Diff: Source/heap/Heap.cpp

Issue 187483002: Oilpan: We need to collect all garbage before shutting down the worker thread (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « Source/heap/Heap.h ('k') | Source/heap/HeapTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/heap/Heap.cpp
diff --git a/Source/heap/Heap.cpp b/Source/heap/Heap.cpp
index a6d08aedd2e7b1960b52168aa338ee0a0248c243..3386e782a8c15a9c9b595e1b7f36e5acc6bdf71a 100644
--- a/Source/heap/Heap.cpp
+++ b/Source/heap/Heap.cpp
@@ -1301,6 +1301,17 @@ void Heap::collectGarbage(ThreadState::StackState stackState, GCType gcType)
s_markingStack->assertIsEmpty();
}
+void Heap::collectAllGarbage(ThreadState::StackState stackState, GCType gcType)
+{
+ // FIXME: oilpan: we should perform a single GC and everything
+ // should die. Unfortunately it is not the case for all objects
+ // because the hierarchy was not completely moved to the heap and
+ // some heap allocated objects own objects that contain persistents
+ // pointing to other heap allocated objects.
+ for (int i = 0; i < 5; i++)
+ collectGarbage(stackState, gcType);
+}
+
void Heap::getStats(HeapStats* stats)
{
stats->clear();
« no previous file with comments | « Source/heap/Heap.h ('k') | Source/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698