| Index: runtime/vm/thread.cc
|
| diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
|
| index a79b086b7e5c0b587049a5e48c17b71d8c18d9ff..aa4f67ea92a647b00488f466a0e6f9ed26af02e4 100644
|
| --- a/runtime/vm/thread.cc
|
| +++ b/runtime/vm/thread.cc
|
| @@ -123,9 +123,9 @@ void Thread::EnterIsolate(Isolate* isolate) {
|
| Thread* thread = Thread::Current();
|
| ASSERT(thread != NULL);
|
| ASSERT(thread->isolate() == NULL);
|
| - ASSERT(isolate->mutator_thread() == NULL);
|
| + ASSERT(!isolate->HasMutatorThread());
|
| thread->isolate_ = isolate;
|
| - isolate->set_mutator_thread(thread);
|
| + isolate->MakeCurrentThreadMutator(thread);
|
| // TODO(koda): Migrate thread_state_ and profile_data_ to Thread, to allow
|
| // helper threads concurrent with mutator.
|
| ASSERT(isolate->thread_state() == NULL);
|
| @@ -162,7 +162,7 @@ void Thread::ExitIsolate() {
|
| }
|
| isolate->set_thread_state(NULL);
|
| Profiler::EndExecution(isolate);
|
| - isolate->set_mutator_thread(NULL);
|
| + isolate->ClearMutatorThread();
|
| thread->isolate_ = NULL;
|
| ASSERT(Isolate::Current() == NULL);
|
| thread->heap_ = NULL;
|
| @@ -178,7 +178,7 @@ void Thread::EnterIsolateAsHelper(Isolate* isolate) {
|
| thread->heap_ = isolate->heap();
|
| // Do not update isolate->mutator_thread, but perform sanity check:
|
| // this thread should not be both the main mutator and helper.
|
| - ASSERT(isolate->mutator_thread() != thread);
|
| + ASSERT(!isolate->MutatorThreadIsCurrentThread());
|
| thread->Schedule(isolate);
|
| }
|
|
|
| @@ -193,7 +193,7 @@ void Thread::ExitIsolateAsHelper() {
|
| thread->Unschedule();
|
| thread->isolate_ = NULL;
|
| thread->heap_ = NULL;
|
| - ASSERT(isolate->mutator_thread() != thread);
|
| + ASSERT(!isolate->MutatorThreadIsCurrentThread());
|
| }
|
|
|
|
|
|
|