Commit b4475fff authored by mlippautz's avatar mlippautz Committed by Commit bot

[heap] Fix Sweeper::IsSweepingCompleted

R=ulan@chromium.org

Review-Url: https://codereview.chromium.org/2047013004
Cr-Commit-Position: refs/heads/master@{#36845}
parent 8b524292
...@@ -583,12 +583,12 @@ void MarkCompactCollector::EnsureSweepingCompleted() { ...@@ -583,12 +583,12 @@ void MarkCompactCollector::EnsureSweepingCompleted() {
} }
bool MarkCompactCollector::Sweeper::IsSweepingCompleted() { bool MarkCompactCollector::Sweeper::IsSweepingCompleted() {
if (!pending_sweeper_tasks_semaphore_.WaitFor( while ((num_sweeping_tasks_ > 0) &&
pending_sweeper_tasks_semaphore_.WaitFor(
base::TimeDelta::FromSeconds(0))) { base::TimeDelta::FromSeconds(0))) {
return false; num_sweeping_tasks_--;
} }
pending_sweeper_tasks_semaphore_.Signal(); return num_sweeping_tasks_ == 0;
return true;
} }
void Marking::TransferMark(Heap* heap, Address old_start, Address new_start) { void Marking::TransferMark(Heap* heap, Address old_start, Address new_start) {
......
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