Chromium Code Reviews| Index: runtime/vm/os_thread.h |
| diff --git a/runtime/vm/os_thread.h b/runtime/vm/os_thread.h |
| index 9dbe50bd647208799aeec9318e2f8067a0de57b1..d6a07418b7373b4af94064dab5edc450d67e8420 100644 |
| --- a/runtime/vm/os_thread.h |
| +++ b/runtime/vm/os_thread.h |
| @@ -58,7 +58,7 @@ class OSThread : public BaseThread { |
| return id_; |
| } |
| - ThreadId join_id() const { |
| + ThreadJoinId join_id() const { |
| ASSERT(join_id_ != OSThread::kInvalidThreadJoinId); |
| return join_id_; |
| } |
| @@ -126,6 +126,10 @@ class OSThread : public BaseThread { |
| Thread* vm_thread = reinterpret_cast<Thread*>(thread); |
| os_thread = GetOSThreadFromThread(vm_thread); |
| } |
| + } else { |
| + os_thread = new OSThread(); |
|
Ivan Posva
2015/12/01 18:00:51
Wondering whether we should move this out into a h
zra
2015/12/01 18:51:51
Done.
|
| + OSThread::SetCurrent(os_thread); |
| + os_thread->set_name("Unknown"); |
| } |
| return os_thread; |
| } |
| @@ -171,7 +175,7 @@ class OSThread : public BaseThread { |
| // Called at VM startup and shutdown. |
| static void InitOnce(); |
| - static bool IsThreadInList(ThreadId join_id); |
| + static bool IsThreadInList(ThreadJoinId join_id); |
| static const intptr_t kStackSizeBuffer = (4 * KB * kWordSize); |
| @@ -201,7 +205,7 @@ class OSThread : public BaseThread { |
| static ThreadLocalKey thread_key_; |
| const ThreadId id_; |
| - const ThreadId join_id_; |
| + const ThreadJoinId join_id_; |
| const ThreadId trace_id_; // Used to interface with tracing tools. |
| char* name_; // A name for this thread. |