Commit 3ec36776 authored by Dominik Inführ's avatar Dominik Inführ Committed by Commit Bot

[heap] Do not start array buffer sweeping task without any work

RequestSweep started an array buffer sweeping task even when there was
no work.

Bug: chromium:1045937
Change-Id: Ieb0835284f898dbc9b899d2b4118d9f7f6108a6f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2020961
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66004}
parent 8060c267
......@@ -100,6 +100,9 @@ void ArrayBufferSweeper::RequestSweepFull() {
void ArrayBufferSweeper::RequestSweep(SweepingScope scope) {
DCHECK(!sweeping_in_progress_);
if (young_.IsEmpty() && (old_.IsEmpty() || scope == SweepingScope::Young))
return;
if (!heap_->IsTearingDown() && !heap_->ShouldReduceMemory() &&
FLAG_concurrent_array_buffer_sweeping) {
Prepare(scope);
......
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