Index: src/spaces.cc |
diff --git a/src/spaces.cc b/src/spaces.cc |
index 1861c5340391d50db9d7c2ac3e51ce6dd6f2d0da..39149ca9d449184f771a8f688305fd801a51b4ff 100644 |
--- a/src/spaces.cc |
+++ b/src/spaces.cc |
@@ -547,8 +547,12 @@ void MemoryChunk::Unlink() { |
heap_->decrement_scan_on_scavenge_pages(); |
ClearFlag(SCAN_ON_SCAVENGE); |
} |
- next_chunk_->prev_chunk_ = prev_chunk_; |
- prev_chunk_->next_chunk_ = next_chunk_; |
+ if (next_chunk_ != NULL) { |
Michael Starzinger
2013/03/08 12:52:06
This would indicate that you try to unlink a Page
Hannes Payer (out of office)
2013/03/08 14:02:30
Done.
|
+ next_chunk_->prev_chunk_ = prev_chunk_; |
+ } |
+ if (prev_chunk_ != NULL) { |
+ prev_chunk_->next_chunk_ = next_chunk_; |
+ } |
prev_chunk_ = NULL; |
next_chunk_ = NULL; |
} |
@@ -981,6 +985,7 @@ bool PagedSpace::CanExpand() { |
return true; |
} |
+ |
bool PagedSpace::Expand() { |
if (!CanExpand()) return false; |
@@ -2555,7 +2560,6 @@ bool PagedSpace::EnsureSweeperProgress(intptr_t size_in_bytes) { |
if (collector->StealMemoryFromSweeperThreads(this) < size_in_bytes) { |
if (!collector->sequential_sweeping()) { |
collector->WaitUntilSweepingCompleted(); |
- collector->FinalizeSweeping(); |
return true; |
} |
} |