Commit 93107c21 authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Report proper OOM failure if semi-space copy fails.

BUG=chromium:544774
LOG=n

Review URL: https://codereview.chromium.org/1409023004

Cr-Commit-Position: refs/heads/master@{#31400}
parent 62e04d33
......@@ -1719,8 +1719,8 @@ int MarkCompactCollector::DiscoverAndEvacuateBlackObjectsOnPage(
if (!new_space->AddFreshPage()) {
// Shouldn't happen. We are sweeping linearly, and to-space
// has the same number of pages as from-space, so there is
// always room.
UNREACHABLE();
// always room unless we are in an OOM situation.
FatalProcessOutOfMemory("MarkCompactCollector: semi-space copy\n");
}
allocation = new_space->AllocateRaw(size, alignment);
DCHECK(!allocation.IsRetry());
......
......@@ -236,7 +236,7 @@ class ScavengingVisitor : public StaticVisitorBase {
// If promotion failed, we try to copy the object to the other semi-space
if (SemiSpaceCopyObject<alignment>(map, slot, object, object_size)) return;
UNREACHABLE();
FatalProcessOutOfMemory("Scavenger: semi-space copy\n");
}
......
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