Reviewers: Michael Starzinger,

Message:
Please take a look. This assertion hits in long running Google Drive extension
in 64-bit Chrome.

Description:
Fix assert in Page::Initialize.

[email protected]

Please review this at https://chromiumcodereview.appspot.com/11275229/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/spaces-inl.h


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);
+  // Code range allocation can return chunks larger than a page.
+  ASSERT(chunk->size() <= static_cast<size_t>(kPageSize) ||
+         executable == EXECUTABLE);
   ASSERT(chunk->owner() == owner);
   owner->IncreaseCapacity(page->area_size());
   owner->Free(page->area_start(), page->area_size());


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to