diff --git a/runtime/vm/dart_api_message.cc b/runtime/vm/dart_api_message.cc index 70d57206c77..5bbc9235767 100644 --- a/runtime/vm/dart_api_message.cc +++ b/runtime/vm/dart_api_message.cc @@ -487,6 +487,7 @@ Dart_CObject* ApiMessageReader::ReadInternalVMObject(intptr_t class_id, AddBackRef(object_id, value, kIsDeserialized); Dart_CObject* length = ReadObjectImpl(); ASSERT(length->type == Dart_CObject_kInt32); + ReadObjectImpl(); // Read and skip instantiations_ field. for (int i = 0; i < length->value.as_int32; i++) { Dart_CObject* type = ReadObjectImpl(); if (type != &dynamic_type_marker) { diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc index 3429dd94b91..ee7d6a8889b 100644 --- a/runtime/vm/raw_object_snapshot.cc +++ b/runtime/vm/raw_object_snapshot.cc @@ -449,6 +449,8 @@ RawTypeArguments* TypeArguments::ReadFrom(SnapshotReader* reader, reader->AddBackRef(object_id, &type_arguments, kIsDeserialized); // Now set all the object fields. + *reader->ArrayHandle() ^= reader->ReadObjectImpl(); + type_arguments.set_instantiations(*reader->ArrayHandle()); for (intptr_t i = 0; i < len; i++) { *reader->TypeHandle() ^= reader->ReadObjectImpl(); type_arguments.SetTypeAt(i, *reader->TypeHandle()); @@ -493,6 +495,9 @@ void RawTypeArguments::WriteTo(SnapshotWriter* writer, // Write out the length field. writer->Write(ptr()->length_); + // Write out the instantiations field. + writer->WriteObjectImpl(ptr()->instantiations_); + // Write out the individual types. intptr_t len = Smi::Value(ptr()->length_); for (intptr_t i = 0; i < len; i++) { diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h index 80e5cd3db27..3f88f746010 100644 --- a/runtime/vm/snapshot.h +++ b/runtime/vm/snapshot.h @@ -221,6 +221,7 @@ class SnapshotReader : public BaseReader { ObjectStore* object_store() const { return isolate_->object_store(); } ClassTable* class_table() const { return isolate_->class_table(); } Object* ObjectHandle() { return &obj_; } + Array* ArrayHandle() { return &array_; } String* StringHandle() { return &str_; } AbstractType* TypeHandle() { return &type_; } TypeArguments* TypeArgumentsHandle() { return &type_arguments_; }