Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Unified Diff: src/heap/gc-idle-time-handler.cc

Issue 494683002: Fix EstimateMarkingStepSizeTest. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Clamp to INT_MAX Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698