Index: runtime/vm/thread.cc |
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc |
index a82c8b3a358dafbde915c9522441ccdfeb670f32..bbdd1b401859582a0217cf7ffae509277f385b0c 100644 |
--- a/runtime/vm/thread.cc |
+++ b/runtime/vm/thread.cc |
@@ -27,6 +27,12 @@ static void DeleteThread(void* thread) { |
} |
+Thread::~Thread() { |
+ // We should cleanly exit any isolate before destruction. |
+ ASSERT(isolate_ == NULL); |
+} |
+ |
+ |
void Thread::InitOnceBeforeIsolate() { |
ASSERT(thread_key_ == OSThread::kUnsetThreadLocalKey); |
thread_key_ = OSThread::CreateThreadLocal(DeleteThread); |