Index: src/spaces-inl.h |
diff --git a/src/spaces-inl.h b/src/spaces-inl.h |
index 8a576a83f606cf2adb314237fbbdca969742436b..9775e5d9427cef0a35754969fc6fbc3bb18c1da3 100644 |
--- a/src/spaces-inl.h |
+++ b/src/spaces-inl.h |
@@ -164,7 +164,10 @@ Page* Page::Initialize(Heap* heap, |
Executability executable, |
PagedSpace* owner) { |
Page* page = reinterpret_cast<Page*>(chunk); |
- ASSERT(chunk->size() <= static_cast<size_t>(kPageSize)); |
+ ASSERT(page->area_size() <= kPageSize); |
Michael Starzinger
2012/11/14 14:43:54
This should actually be ASSERT(page->area_size() <
|
+ // Code range allocation can return chunks larger than a page. |
+ ASSERT(chunk->size() <= static_cast<size_t>(kPageSize) || |
Michael Starzinger
2012/11/14 14:43:54
I am not sure if we should even have this second a
|
+ executable == EXECUTABLE); |
ASSERT(chunk->owner() == owner); |
owner->IncreaseCapacity(page->area_size()); |
owner->Free(page->area_start(), page->area_size()); |