| 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 8e056030a3fe3ccaf429059ca98aef207c4a57a5..9de5549437e8814087cb2df86d36621584ab65f4 100644
|
| --- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
|
| +++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
|
| @@ -625,6 +625,17 @@
|
| // the major GC requests object grouping.
|
| if (gcType == BlinkGC::V8MajorGC)
|
| completeSweep();
|
| +
|
| + // The fact that the PageNavigation GC is scheduled means that there is
|
| + // a dead frame. In common cases, a sequence of Oilpan's GC => V8 GC =>
|
| + // Oilpan's GC is needed to collect the dead frame. So we force the
|
| + // PageNavigation GC before running the V8 GC.
|
| + if (gcState() == PageNavigationGCScheduled) {
|
| +#if PRINT_HEAP_STATS
|
| + dataLogF("Scheduled PageNavigationGC\n");
|
| +#endif
|
| + Heap::collectGarbage(BlinkGC::HeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::PageNavigationGC);
|
| + }
|
| }
|
|
|
| void ThreadState::schedulePageNavigationGCIfNeeded(float estimatedRemovalRatio)
|
|
|