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

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

Issue 2407153002: [heap] Use RAIL mode for initial heap sizing (Closed)
Patch Set: fix test Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index bbf2f98875b417ecf2dcf0f2a605f0c6de26caef..dce2d52ade91974e85600fb17a9291cd36236ef6 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -18172,9 +18172,15 @@ TEST(RecursionWithSourceURLInMessageScriptResourceNameOrSourceURL) {
static void CreateGarbageInOldSpace() {
i::Factory* factory = CcTest::i_isolate()->factory();
v8::HandleScope scope(CcTest::isolate());
- i::AlwaysAllocateScope always_allocate(CcTest::i_isolate());
- for (int i = 0; i < 1000; i++) {
- factory->NewFixedArray(1000, i::TENURED);
+ {
+ i::AlwaysAllocateScope always_allocate(CcTest::i_isolate());
+ for (int i = 0; i < 1000; i++) {
+ factory->NewFixedArray(1000, i::TENURED);
+ }
+ }
+ CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ if (CcTest::heap()->mark_compact_collector()->sweeping_in_progress()) {
+ CcTest::heap()->mark_compact_collector()->EnsureSweepingCompleted();
}
}
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698