Chromium Code Reviews| 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 e8672bf1111b4e0078b40fd5993e1a6129d8ad3f..b2da3cbf4ac39f17287ebabe4c3749caeedbbaf5 100644 |
| --- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp |
| +++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp |
| @@ -622,16 +622,17 @@ void ThreadState::scheduleV8FollowupGCIfNeeded(BlinkGC::V8GCType gcType) |
| } |
| } |
| -void ThreadState::willStartV8GC() |
| +void ThreadState::willStartV8GC(BlinkGC::V8GCType gcType) |
| { |
| - // Finish Oilpan's complete sweeping before running a V8 GC. |
| + // Finish Oilpan's complete sweeping before running a V8 major GC. |
| // This will let the GC collect more V8 objects. |
| // |
| // TODO(haraken): It's a bit too late for a major GC to schedule |
| // completeSweep() here, because gcPrologue for a major GC is called |
| // not at the point where the major GC started but at the point where |
| // the major GC requests object grouping. |
| - completeSweep(); |
| + 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 => |
| @@ -641,6 +642,7 @@ void ThreadState::willStartV8GC() |
| #if PRINT_HEAP_STATS |
| dataLogF("Scheduled PageNavigationGC\n"); |
| #endif |
| + completeSweep(); |
|
sof
2016/02/02 08:19:27
Unnecessary, already done in collectGarbage().
|
| Heap::collectGarbage(BlinkGC::HeapPointersOnStack, BlinkGC::GCWithSweep, BlinkGC::PageNavigationGC); |
| } |
| } |