Index: src/heap/spaces-inl.h |
diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h |
index 1567a8790d26ce5d0c88bd86847299cca5985fdf..faf18e07a6808630db715cb7419dc67ec16ee2cf 100644 |
--- a/src/heap/spaces-inl.h |
+++ b/src/heap/spaces-inl.h |
@@ -28,10 +28,14 @@ PageIteratorImpl<PAGE_TYPE> PageIteratorImpl<PAGE_TYPE>::operator++(int) { |
return tmp; |
} |
-NewSpacePageRange::NewSpacePageRange(Address start, Address limit) |
- : range_(Page::FromAddress(start), |
- Page::FromAllocationAreaAddress(limit)->next_page()) { |
- SemiSpace::AssertValidRange(start, limit); |
+PageRange::PageRange(Address start, Address limit) |
+ : begin_(Page::FromAddress(start)), |
+ end_(Page::FromAllocationAreaAddress(limit)->next_page()) { |
+#ifdef DEBUG |
+ if (begin_->InNewSpace()) { |
+ SemiSpace::AssertValidRange(start, limit); |
+ } |
+#endif // DEBUG |
} |
// ----------------------------------------------------------------------------- |