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 83e95acc0526f5c46740b1e8ddc4f32619577a14..59791e672452fdffc49835cf91f355555c0045ce 100644 |
--- a/src/heap/gc-idle-time-handler.cc |
+++ b/src/heap/gc-idle-time-handler.cc |
@@ -30,8 +30,9 @@ intptr_t GCIdleTimeHandler::EstimateMarkingStepSize( |
return INT_MAX; |
} |
- return static_cast<intptr_t>(marking_step_size * |
- GCIdleTimeHandler::kConservativeTimeRatio); |
+ return Min(static_cast<intptr_t>(marking_step_size * |
+ GCIdleTimeHandler::kConservativeTimeRatio), |
+ static_cast<intptr_t>(INT_MAX)); |
} |
} |
} |