| Index: runtime/vm/raw_object_snapshot.cc
|
| diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
|
| index e714f449257bcf527a5473efb9ac2da16ab4c41c..27ad524978ff13f4f4d9fcf8d8afb34ab0ad70b8 100644
|
| --- a/runtime/vm/raw_object_snapshot.cc
|
| +++ b/runtime/vm/raw_object_snapshot.cc
|
| @@ -2654,7 +2654,14 @@ RawMirrorReference* MirrorReference::ReadFrom(SnapshotReader* reader,
|
| void RawMirrorReference::WriteTo(SnapshotWriter* writer,
|
| intptr_t object_id,
|
| Snapshot::Kind kind) {
|
| - UNREACHABLE();
|
| + if (kind == Snapshot::kMessage) {
|
| + // We do not allow objects with native fields in an isolate message.
|
| + writer->SetWriteException(Exceptions::kArgument,
|
| + "Illegal argument in isolate message"
|
| + " : (object is a MirrorReference)");
|
| + } else {
|
| + UNREACHABLE();
|
| + }
|
| }
|
|
|
| } // namespace dart
|
|
|