From: hpayer@chromium.org Date: Mon, 11 Mar 2013 10:23:24 +0000 (+0000) Subject: Wait in heap tests for active concurrent sweeper threads. X-Git-Tag: upstream/4.7.83~14889 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cdee6b06737dba75bdcd362c456fa6fbcac89ae6;p=platform%2Fupstream%2Fv8.git Wait in heap tests for active concurrent sweeper threads. BUG= Review URL: https://codereview.chromium.org/12708003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13895 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc index f94fe53..7cdae6b 100644 --- a/test/cctest/test-heap.cc +++ b/test/cctest/test-heap.cc @@ -50,7 +50,11 @@ static void InitializeVM() { // Go through all incremental marking steps in one swoop. static void SimulateIncrementalMarking() { + MarkCompactCollector* collector = HEAP->mark_compact_collector(); IncrementalMarking* marking = HEAP->incremental_marking(); + if (collector->IsConcurrentSweepingInProgress()) { + collector->WaitUntilSweepingCompleted(); + } CHECK(marking->IsMarking() || marking->IsStopped()); if (marking->IsStopped()) { marking->Start();