Commit 76812cc7 authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Do not allow left trimming on new space pages that need to be swept.

BUG=chromium:630969,chromium:632334
LOG=n

Review-Url: https://codereview.chromium.org/2189033002
Cr-Commit-Position: refs/heads/master@{#38137}
parent ea09c9dc
......@@ -3083,14 +3083,8 @@ bool Heap::CanMoveObjectStart(HeapObject* object) {
if (lo_space()->Contains(object)) return false;
Page* page = Page::FromAddress(address);
// We can move the object start if:
// (1) the object is not in old space,
// (2) the page of the object was already swept,
// (3) the page was already concurrently swept. This case is an optimization
// for concurrent sweeping. The WasSwept predicate for concurrently swept
// pages is set after sweeping all pages.
return !InOldSpace(object) || page->SweepingDone();
// We can move the object start if the page was already swept.
return Page::FromAddress(address)->SweepingDone();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment