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

Unified Diff: runtime/vm/heap.h

Issue 1852393004: Fix background compilation issues when creating snapshots. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: more Created 4 years, 8 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/dart_api_impl.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap.h
diff --git a/runtime/vm/heap.h b/runtime/vm/heap.h
index 6732c1b374ac3fa3803d194779a788a3ed014a97..287cbdca14242cbe353792ed7a02897539f0b122 100644
--- a/runtime/vm/heap.h
+++ b/runtime/vm/heap.h
@@ -196,9 +196,11 @@ class Heap {
// Associate an id with an object (used when serializing an object).
// A non-existant id is equal to 0.
void SetObjectId(RawObject* raw_obj, intptr_t object_id) {
+ ASSERT(Thread::Current()->IsMutatorThread());
SetWeakEntry(raw_obj, kObjectIds, object_id);
}
intptr_t GetObjectId(RawObject* raw_obj) const {
+ ASSERT(Thread::Current()->IsMutatorThread());
return GetWeakEntry(raw_obj, kObjectIds);
}
int64_t ObjectIdCount() const;
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698