Commit 669d4668 authored by Dominik Inführ's avatar Dominik Inführ Committed by Commit Bot

[heap] Check --stress-concurrent-allocation again in observer

Recheck flag in StressConcurrentAllocationObserver to allow tests
to not run the StressConcurrentAllocatorTask even though Isolate was
already initialized.

Bug: v8:10315
Change-Id: Ia683458216821c103d1ae455330ebbd32d253905
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2403240Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69821}
parent 10aa375c
......@@ -5282,7 +5282,11 @@ class StressConcurrentAllocationObserver : public AllocationObserver {
void Step(int bytes_allocated, Address, size_t) override {
DCHECK(heap_->deserialization_complete());
StressConcurrentAllocatorTask::Schedule(heap_->isolate());
if (FLAG_stress_concurrent_allocation) {
// Only schedule task if --stress-concurrent-allocation is enabled. This
// allows tests to disable flag even when Isolate was already initialized.
StressConcurrentAllocatorTask::Schedule(heap_->isolate());
}
heap_->RemoveAllocationObserversFromAllSpaces(this, this);
heap_->need_to_remove_stress_concurrent_allocation_observer_ = false;
}
......
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