Index: test/cctest/heap/test-heap.cc |
diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc |
index 2939c988d529588da72669447f6653919639df26..bbdba61b1b5ab30195d160a4ed32df23d86412ac 100644 |
--- a/test/cctest/heap/test-heap.cc |
+++ b/test/cctest/heap/test-heap.cc |
@@ -4941,6 +4941,7 @@ TEST(NoWeakHashTableLeakWithIncrementalMarking) { |
} |
heap->CollectAllGarbage(); |
} |
+ heap->CollectAllGarbage(); |
Michael Lippautz
2016/02/04 17:59:51
Please also add comment for black allocated object
Hannes Payer (out of office)
2016/02/06 08:50:16
Note that I changed the test case.
|
int elements = 0; |
if (heap->weak_object_to_code_table()->IsHashTable()) { |
WeakHashTable* t = WeakHashTable::cast(heap->weak_object_to_code_table()); |
@@ -5459,6 +5460,9 @@ TEST(WeakCellsWithIncrementalMarking) { |
CHECK(weak_cell->value()->IsFixedArray()); |
weak_cells[i] = inner_scope.CloseAndEscape(weak_cell); |
} |
+ // Call collect all twice to make sure that we also cleared |
+ // weak cells that were allocated on black pages. |
+ heap->CollectAllGarbage(); |
heap->CollectAllGarbage(); |
CHECK_EQ(*survivor, weak_cells[0]->value()); |
for (int i = 1; i < N; i++) { |