Commit ea3d7196 authored by Jaroslav Sevcik's avatar Jaroslav Sevcik Committed by Commit Bot

[heap] Only verify object layout with --heap-verify on.

Change-Id: I0de0ea0798c39831765bb3c00a00d0df7471bc3b
Reviewed-on: https://chromium-review.googlesource.com/695407Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48269}
parent 38b48918
......@@ -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,
......
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