Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 1250463004: Migrate NoSafepointScope; add constrained concurrent allocation to unit test (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Assert current thread is mutator; add shared assertion macro. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object_graph.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « runtime/vm/object_graph.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698