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

Unified Diff: test/cctest/cctest.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/cctest.h ('k') | test/cctest/heap/heap-utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/cctest.cc
diff --git a/test/cctest/cctest.cc b/test/cctest/cctest.cc
index a850fb9c9e3b28245b26a52ae37f53e6d09467c8..17127ed9ec433c3dc5af8416cbc43a4941b443c0 100644
--- a/test/cctest/cctest.cc
+++ b/test/cctest/cctest.cc
@@ -107,6 +107,18 @@ void CcTest::Run() {
i::Heap* CcTest::heap() { return i_isolate()->heap(); }
+void CcTest::CollectGarbage(i::AllocationSpace space) {
+ heap()->CollectGarbage(space, i::GarbageCollectionReason::kTesting);
+}
+
+void CcTest::CollectAllGarbage(int flags) {
+ heap()->CollectAllGarbage(flags, i::GarbageCollectionReason::kTesting);
+}
+
+void CcTest::CollectAllAvailableGarbage() {
+ heap()->CollectAllAvailableGarbage(i::GarbageCollectionReason::kTesting);
+}
+
v8::base::RandomNumberGenerator* CcTest::random_number_generator() {
return InitIsolateOnce()->random_number_generator();
}
« no previous file with comments | « test/cctest/cctest.h ('k') | test/cctest/heap/heap-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698