0

heap: Add description for check in marking verifier

Change-Id: Idc50ffc3633d48d703fb3abbc4d2de87b3c2ecb7
Reviewed-on: https://chromium-review.googlesource.com/c/1342617
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609627}
This commit is contained in:
Michael Lippautz
2018-11-20 08:35:42 +00:00
committed by Commit Bot
parent 43b898be5f
commit 13204491b6

@ -63,11 +63,18 @@ class MarkingVerifier final : public Visitor {
private:
void VerifyChild(void* base_object_payload) {
// The following check ensures that an object is currently not under
// construction. All verifier runs are assumed to be run outside of mixin
// construction. Consequently, the following cases can lead to a failing
// check:
// 1. The garbage collector ignoring no-GC scopes for mixin construction.
// 2. Missing macro USING_GARBAGE_COLLECTED_MIXIN for users of
// GarbageCollectedMixin.
CHECK(base_object_payload);
HeapObjectHeader* child_header =
HeapObjectHeader::FromPayload(base_object_payload);
// This CHECKs ensure that any children reachable from marked parents are
// also marked. If you hit these CHECKs then marking is in an inconsistent
// These checks ensure that any children reachable from marked parents are
// also marked. If you hit these checks then marking is in an inconsistent
// state meaning that there are unmarked objects reachable from marked
// ones.
CHECK(child_header);