Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(758)

Unified Diff: test/cctest/heap/test-heap.cc

Issue 1420423009: [heap] Black allocation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/transitions.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/heap/test-heap.cc
diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc
index 499eec89ee9a5451e2097152755a377428ef02eb..9b921239252bdd9b74234f16acbf1e06c2b1df0b 100644
--- a/test/cctest/heap/test-heap.cc
+++ b/test/cctest/heap/test-heap.cc
@@ -4937,7 +4937,8 @@ TEST(NoWeakHashTableLeakWithIncrementalMarking) {
i, i, i, i, i, i, i, i);
CompileRun(source.start());
}
- heap->CollectAllGarbage();
+ // We have to abort incremental marking here to abandon black pages.
+ heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
}
int elements = 0;
if (heap->weak_object_to_code_table()->IsHashTable()) {
@@ -5457,6 +5458,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++) {
« no previous file with comments | « src/transitions.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698