Index: runtime/vm/lockers.cc |
diff --git a/runtime/vm/lockers.cc b/runtime/vm/lockers.cc |
index b8ac4b64c84f27ce4180e057526fd77f9ac2d8fc..39733dac483604d048046bb2595f3a0505b704e6 100644 |
--- a/runtime/vm/lockers.cc |
+++ b/runtime/vm/lockers.cc |
@@ -29,6 +29,7 @@ static void updateThreadState(Thread* thread) { |
Monitor::WaitResult MonitorLocker::WaitWithSafepointCheck(Thread* thread, |
int64_t millis) { |
ASSERT(thread == Thread::Current()); |
+ ASSERT(thread->execution_state() == Thread::kThreadInVM); |
thread->set_execution_state(Thread::kThreadInBlockedState); |
thread->EnterSafepoint(); |
Monitor::WaitResult result = monitor_->Wait(millis); |