| Index: src/heap/spaces.cc
|
| diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
|
| index 38d3a9ad3d7d2474680de8ad6f82a7c800fb4f6e..1219a7a74dbc58a3305168aaf69198b4b64665dc 100644
|
| --- a/src/heap/spaces.cc
|
| +++ b/src/heap/spaces.cc
|
| @@ -1110,7 +1110,12 @@ void PagedSpace::ReleasePage(Page* page) {
|
| allocation_info_.set_limit(NULL);
|
| }
|
|
|
| - page->Unlink();
|
| + // If page is still in a list, unlink it from that list.
|
| + if (page->next_chunk() != NULL) {
|
| + DCHECK(page->prev_chunk() != NULL);
|
| + page->Unlink();
|
| + }
|
| +
|
| if (page->IsFlagSet(MemoryChunk::CONTAINS_ONLY_DATA)) {
|
| heap()->isolate()->memory_allocator()->Free(page);
|
| } else {
|
|
|