Index: runtime/vm/thread.cc |
=================================================================== |
--- runtime/vm/thread.cc (revision 45810) |
+++ runtime/vm/thread.cc (working copy) |
@@ -18,9 +18,14 @@ |
ThreadLocalKey Thread::thread_key_ = OSThread::kUnsetThreadLocalKey; |
+static void DeleteThread(void* thread) { |
+ delete reinterpret_cast<Thread*>(thread); |
+} |
+ |
+ |
void Thread::InitOnce() { |
ASSERT(thread_key_ == OSThread::kUnsetThreadLocalKey); |
- thread_key_ = OSThread::CreateThreadLocal(); |
+ thread_key_ = OSThread::CreateThreadLocal(DeleteThread); |
ASSERT(thread_key_ != OSThread::kUnsetThreadLocalKey); |
} |
@@ -37,6 +42,7 @@ |
} |
+#if defined(TARGET_OS_WINDOWS) |
void Thread::CleanUp() { |
Thread* current = Current(); |
if (current != NULL) { |
@@ -44,6 +50,7 @@ |
} |
SetCurrent(NULL); |
} |
+#endif |
void Thread::EnterIsolate(Isolate* isolate) { |