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

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

Issue 24196004: Collect garbage before serializing heap in test-serialize (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-serialize.cc
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
index 37d68de21108b3a39a7d283a077872d3885938ea..ade5ed5597ee6a049c495208327b7129fca17b76 100644
--- a/test/cctest/test-serialize.cc
+++ b/test/cctest/test-serialize.cc
@@ -252,12 +252,14 @@ static void Serialize() {
// will clear the pending fixups array, which would otherwise contain GC roots
// that would confuse the serialization/deserialization process.
v8::Isolate* isolate = CcTest::isolate();
+ Isolate* internal_isolate = reinterpret_cast<Isolate*>(isolate);
{
v8::HandleScope scope(isolate);
v8::Context::New(isolate);
}
- WriteToFile(reinterpret_cast<Isolate*>(isolate),
- FLAG_testing_serialization_file);
+
+ internal_isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, "serialize");
Michael Starzinger 2013/09/19 11:29:39 nit: Better use CcTest::i_isolate() here, maybe mo
+ WriteToFile(internal_isolate, FLAG_testing_serialization_file);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698