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

Unified Diff: runtime/vm/object.h

Issue 1433243003: Background compilation work: (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: d Created 5 years, 1 month 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/heap.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index fa212ea6d81bbe78eed8b2a409954ab24e1e9608..dc2abcc09e0f902ab0c7e6f1e94833d8042dae34 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -4393,6 +4393,7 @@ class Code : public Object {
void Enable() const {
if (!IsDisabled()) return;
+ ASSERT(Thread::Current()->IsMutatorThread());
ASSERT(instructions() != active_instructions());
set_active_instructions(instructions());
}
@@ -4447,6 +4448,7 @@ class Code : public Object {
}
void set_active_instructions(RawInstructions* instructions) const {
+ ASSERT(Thread::Current()->IsMutatorThread() || !is_alive());
// RawInstructions are never allocated in New space and hence a
// store buffer update is not needed here.
StorePointer(&raw_ptr()->active_instructions_, instructions);
@@ -4456,6 +4458,7 @@ class Code : public Object {
}
void set_instructions(RawInstructions* instructions) const {
+ ASSERT(Thread::Current()->IsMutatorThread() || !is_alive());
StorePointer(&raw_ptr()->instructions_, instructions);
}
« no previous file with comments | « runtime/vm/heap.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698