Index: runtime/vm/os_thread.cc |
diff --git a/runtime/vm/os_thread.cc b/runtime/vm/os_thread.cc |
index 947b7f6955f318d3eef1b39aec80ad2285a38e4f..75a7a31850d3b201fc552bd87481a8e9cd3e208d 100644 |
--- a/runtime/vm/os_thread.cc |
+++ b/runtime/vm/os_thread.cc |
@@ -23,7 +23,9 @@ bool OSThread::creation_enabled_ = false; |
OSThread::OSThread() : |
BaseThread(true), |
id_(OSThread::GetCurrentThreadId()), |
- join_id_(OSThread::GetCurrentThreadJoinId()), |
+#if defined(DEBUG) |
+ join_id_(kInvalidThreadJoinId), |
+#endif |
trace_id_(OSThread::GetCurrentThreadTraceId()), |
name_(NULL), |
timeline_block_lock_(new Mutex()), |
@@ -160,8 +162,8 @@ OSThread* OSThread::CreateAndSetUnknownThread() { |
} |
-bool OSThread::IsThreadInList(ThreadJoinId join_id) { |
- if (join_id == OSThread::kInvalidThreadJoinId) { |
+bool OSThread::IsThreadInList(ThreadId id) { |
+ if (id == OSThread::kInvalidThreadId) { |
return false; |
} |
OSThreadIterator it; |
@@ -169,8 +171,8 @@ bool OSThread::IsThreadInList(ThreadJoinId join_id) { |
ASSERT(OSThread::thread_list_lock_->IsOwnedByCurrentThread()); |
OSThread* t = it.Next(); |
// An address test is not sufficient because the allocator may recycle |
- // the address for another Thread. Test against the thread's join id. |
- if (t->join_id() == join_id) { |
+ // the address for another Thread. Test against the thread's id. |
+ if (t->id() == id) { |
return true; |
} |
} |