Index: src/heap/spaces.h |
diff --git a/src/heap/spaces.h b/src/heap/spaces.h |
index e9b23e58befee2a4c62f44382a9f629339cfdb83..493f8e6d6a96580b87575b69f15a265fa1995b87 100644 |
--- a/src/heap/spaces.h |
+++ b/src/heap/spaces.h |
@@ -2366,7 +2366,8 @@ class NewSpace : public Space { |
to_space_(heap, kToSpace), |
from_space_(heap, kFromSpace), |
reservation_(), |
- inline_allocation_limit_step_(0) {} |
+ inline_allocation_limit_step_(0), |
+ top_on_previous_step_(0) {} |
// Sets up the new space using the given chunk. |
bool SetUp(int reserved_semispace_size_, int max_semi_space_size); |
@@ -2548,7 +2549,7 @@ class NewSpace : public Space { |
void LowerInlineAllocationLimit(intptr_t step) { |
inline_allocation_limit_step_ = step; |
UpdateInlineAllocationLimit(0); |
- top_on_previous_step_ = allocation_info_.top(); |
+ top_on_previous_step_ = step ? allocation_info_.top() : 0; |
} |
// Get the extent of the inactive semispace (for use as a marking stack, |