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

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

Issue 2310143002: [heap] Introduce enum of garbage collection reasons. (Closed)
Patch Set: rebase Created 4 years, 3 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 | « test/cctest/test-weakmaps.cc ('k') | test/unittests/heap/gc-tracer-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-weaksets.cc
diff --git a/test/cctest/test-weaksets.cc b/test/cctest/test-weaksets.cc
index ebd22d0c890b6d407faf12a7a4ce23438c04397b..c51c70a4219deff49d07acc32f83804d68e7004a 100644
--- a/test/cctest/test-weaksets.cc
+++ b/test/cctest/test-weaksets.cc
@@ -79,7 +79,6 @@ TEST(WeakSet_Weakness) {
LocalContext context;
Isolate* isolate = GetIsolateFrom(&context);
Factory* factory = isolate->factory();
- Heap* heap = isolate->heap();
HandleScope scope(isolate);
Handle<JSWeakSet> weakset = AllocateJSWeakSet(isolate);
GlobalHandles* global_handles = isolate->global_handles();
@@ -104,7 +103,7 @@ TEST(WeakSet_Weakness) {
CHECK_EQ(1, ObjectHashTable::cast(weakset->table())->NumberOfElements());
// Force a full GC.
- heap->CollectAllGarbage(false);
+ CcTest::CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
CHECK_EQ(0, NumberOfWeakCalls);
CHECK_EQ(1, ObjectHashTable::cast(weakset->table())->NumberOfElements());
CHECK_EQ(
@@ -120,7 +119,7 @@ TEST(WeakSet_Weakness) {
}
CHECK(global_handles->IsWeak(key.location()));
- heap->CollectAllGarbage(false);
+ CcTest::CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
CHECK_EQ(1, NumberOfWeakCalls);
CHECK_EQ(0, ObjectHashTable::cast(weakset->table())->NumberOfElements());
CHECK_EQ(
@@ -132,7 +131,6 @@ TEST(WeakSet_Shrinking) {
LocalContext context;
Isolate* isolate = GetIsolateFrom(&context);
Factory* factory = isolate->factory();
- Heap* heap = isolate->heap();
HandleScope scope(isolate);
Handle<JSWeakSet> weakset = AllocateJSWeakSet(isolate);
@@ -158,7 +156,7 @@ TEST(WeakSet_Shrinking) {
CHECK_EQ(32, ObjectHashTable::cast(weakset->table())->NumberOfElements());
CHECK_EQ(
0, ObjectHashTable::cast(weakset->table())->NumberOfDeletedElements());
- heap->CollectAllGarbage(false);
+ CcTest::CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
CHECK_EQ(0, ObjectHashTable::cast(weakset->table())->NumberOfElements());
CHECK_EQ(
32, ObjectHashTable::cast(weakset->table())->NumberOfDeletedElements());
@@ -201,7 +199,7 @@ TEST(WeakSet_Regress2060a) {
// Force compacting garbage collection.
CHECK(FLAG_always_compact);
- heap->CollectAllGarbage();
+ CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
}
@@ -243,7 +241,7 @@ TEST(WeakSet_Regress2060b) {
// Force compacting garbage collection. The subsequent collections are used
// to verify that key references were actually updated.
CHECK(FLAG_always_compact);
- heap->CollectAllGarbage();
- heap->CollectAllGarbage();
- heap->CollectAllGarbage();
+ CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
}
« no previous file with comments | « test/cctest/test-weakmaps.cc ('k') | test/unittests/heap/gc-tracer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698