Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index c128bbdb4aea61e1358914940e0f63a146237a65..3183f5d81245627636395e853dcdbc5a4fcd492a 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -20549,7 +20549,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())); |
} |