Commit d1c2c8ed authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Fix a markbit data race in deserializer.

BUG=chromium:694255

Change-Id: Icd949cb6cd3c7405dbdf1933f6239851443f87a8
Reviewed-on: https://chromium-review.googlesource.com/542616Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46094}
parent 69a645d3
......@@ -4275,8 +4275,10 @@ void Heap::RegisterDeserializedObjectsForBlackAllocation(
HeapObject* obj = HeapObject::FromAddress(addr);
// There might be grey objects due to black to grey transitions in
// incremental marking. E.g. see VisitNativeContextIncremental.
DCHECK(ObjectMarking::IsBlackOrGrey(obj, MarkingState::Internal(obj)));
if (ObjectMarking::IsBlack(obj, MarkingState::Internal(obj))) {
DCHECK(ObjectMarking::IsBlackOrGrey<IncrementalMarking::kAtomicity>(
obj, MarkingState::Internal(obj)));
if (ObjectMarking::IsBlack<IncrementalMarking::kAtomicity>(
obj, MarkingState::Internal(obj))) {
incremental_marking()->ProcessBlackAllocatedObject(obj);
}
addr += obj->Size();
......
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