| Index: Source/platform/heap/Heap.cpp
|
| diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp
|
| index 876a650425a80bc41f97a856b5a833eefbb6dbfd..16c67093890111d27448cde922ab3d20f9a7e54f 100644
|
| --- a/Source/platform/heap/Heap.cpp
|
| +++ b/Source/platform/heap/Heap.cpp
|
| @@ -2396,8 +2396,14 @@ void Heap::collectAllGarbage()
|
| // 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)
|
| + size_t previousLiveObjects = 0;
|
| + for (int i = 0; i < 5; ++i) {
|
| collectGarbage(ThreadState::NoHeapPointersOnStack, ThreadState::GCWithSweep, ForcedGCForTesting);
|
| + size_t liveObjects = Heap::markedObjectSize();
|
| + if (liveObjects == previousLiveObjects)
|
| + break;
|
| + previousLiveObjects = liveObjects;
|
| + }
|
| }
|
|
|
| double Heap::estimatedMarkingTime()
|
|
|