Index: test/cctest/test-serialize.cc |
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc |
index 37d68de21108b3a39a7d283a077872d3885938ea..e31899ad6eba56bf1582aaaa1685dcbd28084d67 100644 |
--- a/test/cctest/test-serialize.cc |
+++ b/test/cctest/test-serialize.cc |
@@ -256,8 +256,10 @@ static void Serialize() { |
v8::HandleScope scope(isolate); |
v8::Context::New(isolate); |
} |
- WriteToFile(reinterpret_cast<Isolate*>(isolate), |
- FLAG_testing_serialization_file); |
+ |
+ Isolate* internal_isolate = CcTest::i_isolate(); |
+ internal_isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, "serialize"); |
+ WriteToFile(internal_isolate, FLAG_testing_serialization_file); |
} |