Index: src/heap/gc-idle-time-handler.cc |
diff --git a/src/heap/gc-idle-time-handler.cc b/src/heap/gc-idle-time-handler.cc |
index 4103b78a348c81e3be0b60b030a04d107eaa4ea1..1bdc597d91085d20c1ffb28ba390bcc2553bd437 100644 |
--- a/src/heap/gc-idle-time-handler.cc |
+++ b/src/heap/gc-idle-time-handler.cc |
@@ -166,9 +166,9 @@ bool GCIdleTimeHandler::ShouldDoContextDisposalMarkCompact( |
// request, we finalize sweeping here. |
// (6) If incremental marking is in progress, we perform a marking step. Note, |
// that this currently may trigger a full garbage collection. |
-GCIdleTimeAction GCIdleTimeHandler::Compute(size_t idle_time_in_ms, |
+GCIdleTimeAction GCIdleTimeHandler::Compute(double idle_time, |
HeapState heap_state) { |
- if (idle_time_in_ms == 0) { |
+ if (idle_time <= 0.0) { |
if (heap_state.incremental_marking_stopped) { |
if (ShouldDoContextDisposalMarkCompact( |
heap_state.contexts_disposed, |
@@ -179,6 +179,8 @@ GCIdleTimeAction GCIdleTimeHandler::Compute(size_t idle_time_in_ms, |
return GCIdleTimeAction::Nothing(); |
} |
+ size_t idle_time_in_ms = static_cast<size_t>(idle_time); |
+ |
if (ShouldDoScavenge( |
idle_time_in_ms, heap_state.new_space_capacity, |
heap_state.used_new_space_size, |