Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index 4281bd9ea39479c5f460c75bd485c55c195d06c2..dab80d7c33cbd5259ab28b43ec9cd7633bb88737 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -20547,7 +20547,8 @@ THREADED_TEST(Regress1516) { |
int elements = CountLiveMapsInMapCache(CcTest::i_isolate()->context()); |
CHECK_LE(1, elements); |
- CcTest::heap()->CollectAllGarbage(); |
+ // We have to abort incremental marking here to abandon black pages. |
+ CcTest::heap()->CollectAllGarbage(i::Heap::kAbortIncrementalMarkingMask); |
CHECK_GT(elements, CountLiveMapsInMapCache(CcTest::i_isolate()->context())); |
} |