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 360938dc66080320085f0e3bb87ab25ab82713f2..1345ef47290de62c0a38830129f8490a1c712f14 100644 |
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp |
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp |
@@ -570,8 +570,10 @@ bool ThreadState::shouldScheduleV8FollowupGC() |
bool ThreadState::shouldSchedulePageNavigationGC(float estimatedRemovalRatio) |
{ |
- // TODO(keishi): Temporarily disabled to observe impact. crbug.com/588029 |
- return false; |
+ // If estimatedRemovalRatio is low we should let IdleGC handle this. |
+ if (estimatedRemovalRatio < 0.01) |
+ return false; |
+ return judgeGCThreshold(32 * 1024 * 1024, 1.5 * (1 - estimatedRemovalRatio)); |
} |
bool ThreadState::shouldForceConservativeGC() |
@@ -668,7 +670,6 @@ void ThreadState::schedulePageNavigationGCIfNeeded(float estimatedRemovalRatio) |
dataLogF("Scheduled PageNavigationGC\n"); |
#endif |
schedulePageNavigationGC(); |
- return; |
} |
} |