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(); |
} |