Index: runtime/vm/raw_object_snapshot.cc |
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc |
index 092ddcdadb10973b81b99aa6af4d9bbff132ba7c..057f8e94aad173404a312fd080aead519a4baf17 100644 |
--- a/runtime/vm/raw_object_snapshot.cc |
+++ b/runtime/vm/raw_object_snapshot.cc |
@@ -2980,6 +2980,8 @@ RawJSRegExp* JSRegExp::ReadFrom(SnapshotReader* reader, |
reader->ReadAsSmi()); |
*reader->StringHandle() ^= reader->ReadObjectImpl(); |
regex.set_pattern(*reader->StringHandle()); |
+ regex.StoreNonPointer(®ex.raw_ptr()->num_registers_, |
+ reader->Read<int32_t>()); |
regex.StoreNonPointer(®ex.raw_ptr()->type_flags_, |
reader->Read<int8_t>()); |
@@ -3004,6 +3006,7 @@ void RawJSRegExp::WriteTo(SnapshotWriter* writer, |
// Write out all the other fields. |
writer->Write<RawObject*>(ptr()->num_bracket_expressions_); |
writer->WriteObjectImpl(ptr()->pattern_); |
+ writer->Write<int32_t>(ptr()->num_registers_); |
writer->Write<int8_t>(ptr()->type_flags_); |
} |