Index: runtime/vm/thread.cc |
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc |
index a2af102a7ebc4736a645e2fd800e2c5b4ef5aa8a..076031063d2361f5a05639563ef7765df7cd4a74 100644 |
--- a/runtime/vm/thread.cc |
+++ b/runtime/vm/thread.cc |
@@ -341,7 +341,7 @@ void Thread::EnterIsolateAsHelper(Isolate* isolate, bool bypass_safepoint) { |
ASSERT(thread->thread_interrupt_data_ == NULL); |
// Do not update isolate->mutator_thread, but perform sanity check: |
// this thread should not be both the main mutator and helper. |
- ASSERT(!isolate->MutatorThreadIsCurrentThread()); |
+ ASSERT(!thread->IsMutatorThread()); |
thread->Schedule(isolate, bypass_safepoint); |
} |
@@ -355,7 +355,7 @@ void Thread::ExitIsolateAsHelper(bool bypass_safepoint) { |
thread->StoreBufferRelease(); |
thread->isolate_ = NULL; |
thread->heap_ = NULL; |
- ASSERT(!isolate->MutatorThreadIsCurrentThread()); |
+ ASSERT(!thread->IsMutatorThread()); |
} |
@@ -406,6 +406,11 @@ void Thread::StoreBufferAcquire() { |
} |
+bool Thread::IsMutatorThread() const { |
+ return ((isolate_ != NULL) && (isolate_->mutator_thread() == this)); |
+} |
+ |
+ |
CHA* Thread::cha() const { |
ASSERT(isolate_ != NULL); |
return cha_; |