| Index: src/snapshot/startup-serializer.cc
|
| diff --git a/src/snapshot/startup-serializer.cc b/src/snapshot/startup-serializer.cc
|
| index 4b27746f8eefa0cce128468249d2d25f526be12b..377793c859b3fd581fb29673eecfda7a0df24cb5 100644
|
| --- a/src/snapshot/startup-serializer.cc
|
| +++ b/src/snapshot/startup-serializer.cc
|
| @@ -95,7 +95,7 @@ void StartupSerializer::SerializeWeakReferencesAndDeferred() {
|
| // add entries to the partial snapshot cache of the startup snapshot. Add
|
| // one entry with 'undefined' to terminate the partial snapshot cache.
|
| Object* undefined = isolate()->heap()->undefined_value();
|
| - VisitPointer(&undefined);
|
| + VisitRootPointer(Root::kPartialSnapshotCache, &undefined);
|
| isolate()->heap()->IterateWeakRoots(this, VISIT_ALL);
|
| SerializeDeferredObjects();
|
| Pad();
|
| @@ -107,7 +107,8 @@ int StartupSerializer::PartialSnapshotCacheIndex(HeapObject* heap_object) {
|
| // This object is not part of the partial snapshot cache yet. Add it to the
|
| // startup snapshot so we can refer to it via partial snapshot index from
|
| // the partial snapshot.
|
| - VisitPointer(reinterpret_cast<Object**>(&heap_object));
|
| + VisitRootPointer(Root::kPartialSnapshotCache,
|
| + reinterpret_cast<Object**>(&heap_object));
|
| }
|
| return index;
|
| }
|
| @@ -144,7 +145,8 @@ void StartupSerializer::SerializeStrongReferences() {
|
| VISIT_ONLY_STRONG_FOR_SERIALIZATION);
|
| }
|
|
|
| -void StartupSerializer::VisitPointers(Object** start, Object** end) {
|
| +void StartupSerializer::VisitRootPointers(Root root, Object** start,
|
| + Object** end) {
|
| if (start == isolate()->heap()->roots_array_start()) {
|
| // Serializing the root list needs special handling:
|
| // - The first pass over the root list only serializes immortal immovables.
|
| @@ -171,7 +173,7 @@ void StartupSerializer::VisitPointers(Object** start, Object** end) {
|
| }
|
| FlushSkip(skip);
|
| } else {
|
| - Serializer::VisitPointers(start, end);
|
| + Serializer::VisitRootPointers(root, start, end);
|
| }
|
| }
|
|
|
|
|