[heap] Only verify object layout with --heap-verify on.
Change-Id: I0de0ea0798c39831765bb3c00a00d0df7471bc3b Reviewed-on: https://chromium-review.googlesource.com/695407 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#48269}
This commit is contained in:
parent
38b489186b
commit
ea3d7196a4
@ -4102,8 +4102,10 @@ void Heap::NotifyObjectLayoutChange(HeapObject* object, int size,
|
||||
}
|
||||
}
|
||||
#ifdef VERIFY_HEAP
|
||||
DCHECK_NULL(pending_layout_change_object_);
|
||||
pending_layout_change_object_ = object;
|
||||
if (FLAG_verify_heap) {
|
||||
DCHECK_NULL(pending_layout_change_object_);
|
||||
pending_layout_change_object_ = object;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -4126,6 +4128,8 @@ class SlotCollectingVisitor final : public ObjectVisitor {
|
||||
};
|
||||
|
||||
void Heap::VerifyObjectLayoutChange(HeapObject* object, Map* new_map) {
|
||||
if (!FLAG_verify_heap) return;
|
||||
|
||||
// Check that Heap::NotifyObjectLayout was called for object transitions
|
||||
// that are not safe for concurrent marking.
|
||||
// If you see this check triggering for a freshly allocated object,
|
||||
|
Loading…
Reference in New Issue
Block a user