Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 0e43e1d3a0fbd434bf311fa3dffc579b3b73a3ee..120ca988431a99dde0471883cd51b172573e77d6 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -6946,12 +6946,13 @@ void Map::ClearCodeCache(Heap* heap) { |
} |
-int Map::SlackForArraySize(bool is_prototype_map, int old_size, |
- int size_limit) { |
+int Map::SlackForArraySize(int old_size, int size_limit) { |
const int max_slack = size_limit - old_size; |
CHECK_LE(0, max_slack); |
- if (old_size < 4) return Min(max_slack, 1); |
- if (is_prototype_map) return Min(max_slack, 4); |
+ if (old_size < 4) { |
+ DCHECK_LE(1, max_slack); |
+ return 1; |
+ } |
return Min(max_slack, old_size / 4); |
} |