From d4ae5265260ca00e9e63d495fa0e02645a18ff1e Mon Sep 17 00:00:00 2001 From: "ager@chromium.org" Date: Tue, 19 Oct 2010 09:16:57 +0000 Subject: [PATCH] Return false from PagedSpace::Contains if the page from an address is not valid. This can happen on Mac where C++ code can be in the 4-8K range. Review URL: http://codereview.chromium.org/3781020 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/spaces-inl.h | 3 +-- src/spaces.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/spaces-inl.h b/src/spaces-inl.h index 26214a3..8a0dd07 100644 --- a/src/spaces-inl.h +++ b/src/spaces-inl.h @@ -407,8 +407,7 @@ void MemoryAllocator::UnprotectChunkFromPage(Page* page) { bool PagedSpace::Contains(Address addr) { Page* p = Page::FromAddress(addr); - ASSERT(p->is_valid()); - + if (!p->is_valid()) return false; return MemoryAllocator::IsPageInSpace(p, this); } diff --git a/src/spaces.h b/src/spaces.h index 2fdb96f..0e6a91e 100644 --- a/src/spaces.h +++ b/src/spaces.h @@ -2194,7 +2194,6 @@ class LargeObjectSpace : public Space { // if such a page doesn't exist. LargeObjectChunk* FindChunkContainingPc(Address pc); - // Iterates objects covered by dirty regions. void IterateDirtyRegions(ObjectSlotCallback func); -- 2.7.4