Commit 0257c539 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[heap] Remove clear on tearing down marking work list when not marking

The work list should be empty in the case we are not tearing down
during incremental marking. Explicitly clear during incremental marking
and rely on DCHECKs for the other case.

Bug: chromium:758570
Change-Id: Iecc8935f0cbfda67f0e7afde42930050e7c94d2d
Reviewed-on: https://chromium-review.googlesource.com/674504Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48087}
parent e80cbe03
......@@ -470,7 +470,9 @@ void MinorMarkCompactCollector::SetUp() {}
void MarkCompactCollector::TearDown() {
AbortCompaction();
AbortWeakObjects();
marking_worklist()->TearDown();
if (heap()->incremental_marking()->IsMarking()) {
marking_worklist()->Clear();
}
}
void MinorMarkCompactCollector::TearDown() {}
......
......@@ -537,8 +537,6 @@ class MarkCompactCollector final : public MarkCompactCollectorBase {
ConcurrentMarkingWorklist* shared() { return &shared_; }
ConcurrentMarkingWorklist* bailout() { return &bailout_; }
void TearDown() { Clear(); }
void Print() {
PrintWorklist("shared", &shared_);
PrintWorklist("bailout", &bailout_);
......
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