| Index: src/heap/mark-compact.cc
|
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
|
| index f2b2ce171a9b6aca5d6152ba44422f8374b7317c..95f17704fbf8863809a010ecf3b63b4a132f4d86 100644
|
| --- a/src/heap/mark-compact.cc
|
| +++ b/src/heap/mark-compact.cc
|
| @@ -723,7 +723,12 @@ void MarkCompactCollector::CollectEvacuationCandidates(PagedSpace* space) {
|
| while (it.has_next()) {
|
| Page* p = it.next();
|
| if (p->NeverEvacuate()) continue;
|
| - p->ClearEvacuationCandidate();
|
| +
|
| + // Invariant: Evacuation candidates are just created when marking is
|
| + // started. At the end of a GC all evacuation candidates are cleared and
|
| + // their slot buffers are released.
|
| + CHECK(!p->IsEvacuationCandidate());
|
| + CHECK(p->slots_buffer() == NULL);
|
|
|
| if (FLAG_stress_compaction) {
|
| unsigned int counter = space->heap()->ms_count();
|
|
|