[heap] Ensure that sweeping is completed in ConcurrentMarking cctests.
Bug: chromium:694255 Change-Id: I5dc6157126544f20bca0ddee967e1d08d69bb060 Reviewed-on: https://chromium-review.googlesource.com/707104 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#48380}
This commit is contained in:
parent
12008bcc41
commit
b54c1a6ef6
@ -33,6 +33,10 @@ TEST(ConcurrentMarking) {
|
||||
Heap* heap = CcTest::heap();
|
||||
CcTest::CollectAllGarbage();
|
||||
if (!heap->incremental_marking()->IsStopped()) return;
|
||||
MarkCompactCollector* collector = CcTest::heap()->mark_compact_collector();
|
||||
if (collector->sweeping_in_progress()) {
|
||||
collector->EnsureSweepingCompleted();
|
||||
}
|
||||
ConcurrentMarking::MarkingWorklist shared, bailout;
|
||||
WeakObjects weak_objects;
|
||||
ConcurrentMarking* concurrent_marking =
|
||||
@ -49,6 +53,11 @@ TEST(ConcurrentMarkingReschedule) {
|
||||
Heap* heap = CcTest::heap();
|
||||
CcTest::CollectAllGarbage();
|
||||
if (!heap->incremental_marking()->IsStopped()) return;
|
||||
MarkCompactCollector* collector = CcTest::heap()->mark_compact_collector();
|
||||
if (collector->sweeping_in_progress()) {
|
||||
collector->EnsureSweepingCompleted();
|
||||
}
|
||||
|
||||
ConcurrentMarking::MarkingWorklist shared, bailout;
|
||||
WeakObjects weak_objects;
|
||||
ConcurrentMarking* concurrent_marking =
|
||||
|
Loading…
Reference in New Issue
Block a user