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

[heap] Fix StartBlackAllocationForTesting.

The function shouldn't try to start black allocation if it is already
started.

Bug: chromium:694255
TBR: mlippautz@chromium.org
Change-Id: I77b5346f6ac2ec5947ca4351a8abe33865729fda
Reviewed-on: https://chromium-review.googlesource.com/612385Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47334}
parent eaf7ec9d
......@@ -584,6 +584,7 @@ void IncrementalMarking::StartMarking() {
void IncrementalMarking::StartBlackAllocation() {
DCHECK(FLAG_black_allocation);
DCHECK(!black_allocation_);
DCHECK(IsMarking());
black_allocation_ = true;
heap()->old_space()->MarkAllocationInfoBlack();
......
......@@ -253,7 +253,11 @@ class V8_EXPORT_PRIVATE IncrementalMarking {
bool black_allocation() { return black_allocation_; }
void StartBlackAllocationForTesting() { StartBlackAllocation(); }
void StartBlackAllocationForTesting() {
if (!black_allocation_) {
StartBlackAllocation();
}
}
void AbortBlackAllocation();
......
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