Merge V8 5.2.361.47  DO NOT MERGE

https://chromium.googlesource.com/v8/v8/+/5.2.361.47

FPIIM-449

Change-Id: Ibec421b85a9b88cb3a432ada642e469fe7e78346
(cherry picked from commit bcf72ee8e3b26f1d0726869c7ddb3921c68b09a8)
diff --git a/test/cctest/heap/test-compaction.cc b/test/cctest/heap/test-compaction.cc
index 0feee5f..b787780 100644
--- a/test/cctest/heap/test-compaction.cc
+++ b/test/cctest/heap/test-compaction.cc
@@ -50,6 +50,7 @@
 
       heap->set_force_oom(true);
       heap->CollectAllGarbage();
+      heap->mark_compact_collector()->EnsureSweepingCompleted();
 
       // Check that all handles still point to the same page, i.e., compaction
       // has been aborted on the page.
@@ -108,6 +109,7 @@
 
         heap->set_force_oom(true);
         heap->CollectAllGarbage();
+        heap->mark_compact_collector()->EnsureSweepingCompleted();
 
         bool migration_aborted = false;
         for (Handle<FixedArray> object : compaction_page_handles) {
@@ -190,6 +192,7 @@
 
       heap->set_force_oom(true);
       heap->CollectAllGarbage();
+      heap->mark_compact_collector()->EnsureSweepingCompleted();
 
       // The following check makes sure that we compacted "some" objects, while
       // leaving others in place.
@@ -283,6 +286,7 @@
 
       heap->set_force_oom(true);
       heap->CollectAllGarbage();
+      heap->mark_compact_collector()->EnsureSweepingCompleted();
 
       // The following check makes sure that we compacted "some" objects, while
       // leaving others in place.