Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 8aa6fb85876ef8c7df392e87c0d04fedb5dc28c7..05d1661495321e16febd0c9ba03935ecc04a08f6 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -4207,15 +4207,11 @@ void Heap::IdleNotificationEpilogue(GCIdleTimeAction action, |
} |
-void Heap::CheckAndNotifyBackgroundIdleNotification(double idle_time_in_ms, |
- double now_ms) { |
+void Heap::CheckBackgroundIdleNotification(double idle_time_in_ms, |
+ double now_ms) { |
+ // TODO(ulan): Remove this function once Chrome uses new API |
+ // for foreground/background notification. |
if (idle_time_in_ms >= GCIdleTimeHandler::kMinBackgroundIdleTime) { |
- MemoryReducer::Event event; |
- event.type = MemoryReducer::kBackgroundIdleNotification; |
- event.time_ms = now_ms; |
- event.can_start_incremental_gc = incremental_marking()->IsStopped() && |
- incremental_marking()->CanBeActivated(); |
- memory_reducer_->NotifyBackgroundIdleNotification(event); |
optimize_for_memory_usage_ = true; |
} else { |
optimize_for_memory_usage_ = false; |
@@ -4247,7 +4243,7 @@ bool Heap::IdleNotification(double deadline_in_seconds) { |
double start_ms = MonotonicallyIncreasingTimeInMs(); |
double idle_time_in_ms = deadline_in_ms - start_ms; |
- CheckAndNotifyBackgroundIdleNotification(idle_time_in_ms, start_ms); |
+ CheckBackgroundIdleNotification(idle_time_in_ms, start_ms); |
tracer()->SampleAllocation(start_ms, NewSpaceAllocationCounter(), |
OldGenerationAllocationCounter()); |