[heap] Fix space DCHECK in Scavenger::ScavengeObject to allow young generation LOs.

Bug: chromium:852420
Change-Id: I920c4ac8e66a7f29c28fcc62a0b1ea62370bdf5d
Reviewed-on: https://chromium-review.googlesource.com/c/1350993
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57842}
This commit is contained in:
Hannes Payer 2018-11-26 16:37:26 +01:00 committed by Commit Bot
parent 883f5f3523
commit 5ee0f0092d

View File

@ -372,7 +372,11 @@ SlotCallbackResult Scavenger::ScavengeObject(HeapObjectSlot p,
DCHECK((*p)->IsStrong());
p.store(HeapObjectReference::Strong(dest));
}
DCHECK(Heap::InToSpace(dest) || !Heap::InNewSpace((dest)));
DCHECK_IMPLIES(Heap::InNewSpace(dest),
(Heap::InToSpace(dest) ||
MemoryChunk::FromHeapObject(dest)->owner()->identity() ==
NEW_LO_SPACE));
return Heap::InToSpace(dest) ? KEEP_SLOT : REMOVE_SLOT;
}