| Index: src/heap/mark-compact.cc
|
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
|
| index fa127db6129c0f1598eb2140f3d1fdb294ff4e90..c9a310a3f7aee0e915c5a674cf836ee01612e9b7 100644
|
| --- a/src/heap/mark-compact.cc
|
| +++ b/src/heap/mark-compact.cc
|
| @@ -3052,6 +3052,11 @@ void MarkCompactCollector::EvacuatePages() {
|
| // have an emergency page and the space still has room for that.
|
| if (space->HasEmergencyMemory() && space->CanExpand()) {
|
| EvacuateLiveObjectsFromPage(p);
|
| + // Unlink the page from the list of pages here. We must not iterate
|
| + // over that page later (e.g. when scan on scavenge pages are
|
| + // processed). The page itself will be freed later and is still
|
| + // reachable from the evacuation candidates list.
|
| + p->Unlink();
|
| } else {
|
| // Without room for expansion evacuation is not guaranteed to succeed.
|
| // Pessimistically abandon unevacuated pages.
|
|
|