Verify live bytes only if enabled on command line

Change-Id: If46c25c098565bcb43f5475783591190f6d80b56
Reviewed-on: https://chromium-review.googlesource.com/1096040
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Cr-Commit-Position: refs/heads/master@{#53655}
This commit is contained in:
Dominik Inführ 2018-06-11 21:37:34 +02:00 committed by Commit Bot
parent d4f7d87bdf
commit 7465739816

View File

@ -832,9 +832,11 @@ void MarkCompactCollector::VerifyMarking() {
}
#endif
#ifdef VERIFY_HEAP
heap()->old_space()->VerifyLiveBytes();
heap()->map_space()->VerifyLiveBytes();
heap()->code_space()->VerifyLiveBytes();
if (FLAG_verify_heap) {
heap()->old_space()->VerifyLiveBytes();
heap()->map_space()->VerifyLiveBytes();
heap()->code_space()->VerifyLiveBytes();
}
#endif
}