Index: src/heap.h |
diff --git a/src/heap.h b/src/heap.h |
index b24b0b3608344ffba6177e42df6edf3c02f217e2..c3ff84c20e952d995e99fc1112a2e0bb7cfdf253 100644 |
--- a/src/heap.h |
+++ b/src/heap.h |
@@ -1546,7 +1546,12 @@ class Heap { |
// Predicate that governs global pre-tenuring decisions based on observed |
// promotion rates of previous collections. |
inline bool ShouldGloballyPretenure() { |
- return new_space_high_promotion_mode_active_; |
+ return FLAG_pretenuring && new_space_high_promotion_mode_active_; |
+ } |
+ |
+ // This is only needed for testing high promotion mode. |
+ void SetNewSpaceHighPromotionModeActive(bool mode) { |
+ new_space_high_promotion_mode_active_ = mode; |
} |
inline PretenureFlag GetPretenureMode() { |