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

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

Issue 2052433003: [snapshot] make snapshot sink a non-dynamic member of the serializer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@noref
Patch Set: rebase Created 4 years, 6 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 | « src/snapshot/startup-serializer.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-serialize.cc
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
index 81fed8de304aec21463489bcffd335cd51f2c339..0c2622b23c905dab0d74a23476a1af309689971b 100644
--- a/test/cctest/test-serialize.cc
+++ b/test/cctest/test-serialize.cc
@@ -92,8 +92,7 @@ static Vector<const byte> Serialize(v8::Isolate* isolate) {
Isolate* internal_isolate = reinterpret_cast<Isolate*>(isolate);
internal_isolate->heap()->CollectAllAvailableGarbage("serialize");
- SnapshotByteSink sink;
- StartupSerializer ser(internal_isolate, &sink,
+ StartupSerializer ser(internal_isolate,
v8::SnapshotCreator::FunctionCodeHandling::kClear);
ser.SerializeStrongReferences();
ser.SerializeWeakReferencesAndDeferred();
@@ -282,15 +281,11 @@ static void PartiallySerializeObject(Vector<const byte>* startup_blob_out,
}
env.Reset();
- SnapshotByteSink startup_sink;
StartupSerializer startup_serializer(
- isolate, &startup_sink,
- v8::SnapshotCreator::FunctionCodeHandling::kClear);
+ isolate, v8::SnapshotCreator::FunctionCodeHandling::kClear);
startup_serializer.SerializeStrongReferences();
- SnapshotByteSink partial_sink;
- PartialSerializer partial_serializer(isolate, &startup_serializer,
- &partial_sink);
+ PartialSerializer partial_serializer(isolate, &startup_serializer);
partial_serializer.Serialize(&raw_foo);
startup_serializer.SerializeWeakReferencesAndDeferred();
@@ -385,13 +380,11 @@ static void PartiallySerializeContext(Vector<const byte>* startup_blob_out,
SnapshotByteSink startup_sink;
StartupSerializer startup_serializer(
- isolate, &startup_sink,
- v8::SnapshotCreator::FunctionCodeHandling::kClear);
+ isolate, v8::SnapshotCreator::FunctionCodeHandling::kClear);
startup_serializer.SerializeStrongReferences();
SnapshotByteSink partial_sink;
- PartialSerializer partial_serializer(isolate, &startup_serializer,
- &partial_sink);
+ PartialSerializer partial_serializer(isolate, &startup_serializer);
partial_serializer.Serialize(&raw_context);
startup_serializer.SerializeWeakReferencesAndDeferred();
@@ -505,13 +498,11 @@ static void PartiallySerializeCustomContext(
SnapshotByteSink startup_sink;
StartupSerializer startup_serializer(
- isolate, &startup_sink,
- v8::SnapshotCreator::FunctionCodeHandling::kClear);
+ isolate, v8::SnapshotCreator::FunctionCodeHandling::kClear);
startup_serializer.SerializeStrongReferences();
SnapshotByteSink partial_sink;
- PartialSerializer partial_serializer(isolate, &startup_serializer,
- &partial_sink);
+ PartialSerializer partial_serializer(isolate, &startup_serializer);
partial_serializer.Serialize(&raw_context);
startup_serializer.SerializeWeakReferencesAndDeferred();
« no previous file with comments | « src/snapshot/startup-serializer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698