Index: runtime/vm/raw_object_snapshot.cc |
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc |
index ff8c43835f8ea102fe00c685e698efa15a01678b..72e2f2b5e064a52de6f4811ce9a8b77f167cdc2b 100644 |
--- a/runtime/vm/raw_object_snapshot.cc |
+++ b/runtime/vm/raw_object_snapshot.cc |
@@ -747,9 +747,25 @@ void RawField::WriteTo(SnapshotWriter* writer, |
writer->Write<int32_t>(ptr()->is_nullable_); |
writer->Write<uint8_t>(ptr()->kind_bits_); |
- // Write out all the object pointer fields. |
- SnapshotWriterVisitor visitor(writer); |
- visitor.VisitPointers(from(), to()); |
+ // Write out the name. |
+ writer->WriteObjectImpl(ptr()->name_, kAsReference); |
+ // Write out the owner. |
+ writer->WriteObjectImpl(ptr()->owner_, kAsReference); |
+ // Write out the type. |
+ writer->WriteObjectImpl(ptr()->type_, kAsReference); |
+ // Write out the initial static value or field offset. |
+ if (Field::StaticBit::decode(ptr()->kind_bits_)) { |
+ // For static field we write out the initial static value. |
+ writer->WriteObjectImpl(ptr()->initializer_.saved_value_, kAsReference); |
+ } else { |
+ writer->WriteObjectImpl(ptr()->value_.offset_, kAsReference); |
+ } |
+ // Write out the dependent code. |
+ writer->WriteObjectImpl(ptr()->dependent_code_, kAsReference); |
+ // Write out the initializer value. |
+ writer->WriteObjectImpl(ptr()->initializer_.saved_value_, kAsReference); |
+ // Write out the guarded list length. |
+ writer->WriteObjectImpl(ptr()->guarded_list_length_, kAsReference); |
} |