Index: runtime/vm/raw_object_snapshot.cc |
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc |
index 057f8e94aad173404a312fd080aead519a4baf17..7bdb3a2ac31ed2c4213730f4b71ad430764dedb3 100644 |
--- a/runtime/vm/raw_object_snapshot.cc |
+++ b/runtime/vm/raw_object_snapshot.cc |
@@ -2059,7 +2059,9 @@ RawOneByteString* OneByteString::ReadFrom(SnapshotReader* reader, |
String& str_obj = String::Handle(reader->zone(), String::null()); |
if (kind == Snapshot::kFull) { |
- ASSERT(reader->isolate()->no_safepoint_scope_depth() != 0); |
+ // We currently only expect the Dart mutator to read snapshots. |
+ reader->isolate()->AssertCurrentThreadIsMutator(); |
+ ASSERT(Thread::Current()->no_safepoint_scope_depth() != 0); |
RawOneByteString* obj = reader->NewOneByteString(len); |
str_obj = obj; |
str_obj.set_tags(tags); |