Index: Source/heap/ThreadState.cpp |
diff --git a/Source/heap/ThreadState.cpp b/Source/heap/ThreadState.cpp |
index 4bd7a10b5e29644b1ba2894aee1a793d2309d9a0..935284cec6aff4ce5b627ded3b13a9475cdd2d99 100644 |
--- a/Source/heap/ThreadState.cpp |
+++ b/Source/heap/ThreadState.cpp |
@@ -298,6 +298,12 @@ void ThreadState::cleanup() |
// After this GC we expect heap to be empty because |
// preCleanup tasks should have cleared all persistent |
// handles that were externally owned. |
+ // 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. |
+ Heap::collectGarbage(ThreadState::NoHeapPointersOnStack); |
Heap::collectGarbage(ThreadState::NoHeapPointersOnStack); |
// Verify that all heaps are empty now. |