Index: test/cctest/heap/test-heap.cc |
diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc |
index 4387e11e479e983cfd342ec644ef73cae470856a..b5a24c670d95c3342e1cfea80f14ec7c5d220186 100644 |
--- a/test/cctest/heap/test-heap.cc |
+++ b/test/cctest/heap/test-heap.cc |
@@ -7110,5 +7110,20 @@ TEST(RememberedSetRemoveRange) { |
}); |
} |
+TEST(EmptyIntermediateGeneration) { |
+ CcTest::InitializeVM(); |
+ Heap* heap = CcTest::heap(); |
+ heap::GcAndSweep(heap, OLD_SPACE); |
+ v8::HandleScope scope(CcTest::isolate()); |
+ { |
+ v8::HandleScope temp_scope(CcTest::isolate()); |
+ heap::SimulateFullSpace(heap->new_space()); |
+ } |
+ heap::GcAndSweep(heap, OLD_SPACE); |
+ for (Page* p : *heap->new_space()) { |
+ CHECK(!p->InIntermediateGeneration()); |
+ } |
+} |
+ |
} // namespace internal |
} // namespace v8 |