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; |