Index: runtime/vm/os_win.cc |
diff --git a/runtime/vm/os_win.cc b/runtime/vm/os_win.cc |
index 276595365b5e6a19067c5e25197c8107873f856a..fcb8447c6333d8c2932b6ec4b06d733faec4da0d 100644 |
--- a/runtime/vm/os_win.cc |
+++ b/runtime/vm/os_win.cc |
@@ -14,6 +14,7 @@ |
#include "platform/utils.h" |
#include "platform/assert.h" |
+#include "platform/thread.h" |
namespace dart { |
@@ -305,6 +306,12 @@ void OS::InitOnce() { |
init_once_called = true; |
// Do not pop up a message box when abort is called. |
_set_abort_behavior(0, _WRITE_ABORT_MSG); |
+ ThreadInlineImpl::thread_id_key = Thread::CreateThreadLocal(); |
+ MonitorWaitData::monitor_wait_data_key_ = Thread::CreateThreadLocal(); |
+ MonitorData::GetMonitorWaitDataForThread(); |
+ ThreadId thread_id = ThreadInlineImpl::CreateThreadId(); |
+ Thread::SetThreadLocal(ThreadInlineImpl::thread_id_key, |
+ reinterpret_cast<DWORD>(thread_id)); |
} |