| Index: Source/platform/heap/ThreadState.cpp
|
| diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp
|
| index 760689818b8d36969e9a433e36a72c201fa615cf..c45605a914098356bdf20fa59cae74e1e1206eea 100644
|
| --- a/Source/platform/heap/ThreadState.cpp
|
| +++ b/Source/platform/heap/ThreadState.cpp
|
| @@ -817,7 +817,7 @@ ThreadState::GCState ThreadState::gcState() const
|
| return m_gcState;
|
| }
|
|
|
| -void ThreadState::didV8MajorGC(bool forceGC)
|
| +void ThreadState::didV8MajorGC()
|
| {
|
| checkThread();
|
| if (isMainThread()) {
|
| @@ -826,24 +826,6 @@ void ThreadState::didV8MajorGC(bool forceGC)
|
| // references to their DOM objects.
|
| Heap::setEstimatedLiveObjectSize(Heap::estimatedLiveObjectSize() / 2);
|
|
|
| - if (forceGC) {
|
| - // This single GC is not enough for two reasons:
|
| - // (1) The GC is not precise because the GC scans on-stack pointers conservatively.
|
| - // (2) One GC is not enough to break a chain of persistent handles. It's possible that
|
| - // some heap allocated objects own objects that contain persistent handles
|
| - // pointing to other heap allocated objects. To break the chain, we need multiple GCs.
|
| - //
|
| - // Regarding (1), we force a precise GC at the end of the current event loop. So if you want
|
| - // to collect all garbage, you need to wait until the next event loop.
|
| - // Regarding (2), it would be OK in practice to trigger only one GC per gcEpilogue, because
|
| - // GCController.collectAll() forces 7 V8's GC.
|
| - Heap::collectGarbage(ThreadState::HeapPointersOnStack, ThreadState::GCWithSweep, Heap::ForcedGC);
|
| -
|
| - // Forces a precise GC at the end of the current event loop.
|
| - ThreadState::current()->setGCState(ThreadState::FullGCScheduled);
|
| - return;
|
| - }
|
| -
|
| // If under memory pressure, complete sweeping before initiating
|
| // the urgent conservative GC.
|
| if (shouldForceMemoryPressureGC())
|
|
|