Index: runtime/vm/thread_interrupter_win.cc |
diff --git a/runtime/vm/thread_interrupter_win.cc b/runtime/vm/thread_interrupter_win.cc |
index c933cbb73c98c866a59e8c0dc75fce17417811cb..be4745110c7cbebe7f7dca33a9582a268951e288 100644 |
--- a/runtime/vm/thread_interrupter_win.cc |
+++ b/runtime/vm/thread_interrupter_win.cc |
@@ -38,7 +38,7 @@ class ThreadInterrupterWin : public AllStatic { |
} |
- static void Interrupt(ThreadInterrupter::ThreadState* state) { |
+ static void Interrupt(InterruptedThreadState* state) { |
ASSERT(GetCurrentThread() != state->id); |
DWORD result = SuspendThread(state->id); |
if (result == kThreadError) { |
@@ -71,8 +71,13 @@ class ThreadInterrupterWin : public AllStatic { |
void ThreadInterrupter::InterruptThreads(int64_t current_time) { |
- for (intptr_t i = 0; i < threads_size_; i++) { |
- ThreadState* state = threads_[i]; |
+ for (intptr_t i = 0; i < Isolate::isolates_size_; i++) { |
+ Isolate* isolate = Isolate::isolates_[i]; |
+ ASSERT(isolate != NULL); |
+ InterruptedThreadState* state = isolate->thread_state(); |
+ if (state == NULL) { |
+ continue; |
+ } |
ASSERT(state->id != Thread::kInvalidThreadId); |
if (FLAG_trace_thread_interrupter) { |
OS::Print("ThreadInterrupter suspending %p\n", |