| Index: runtime/vm/os_thread_android.cc
|
| diff --git a/runtime/vm/os_thread_android.cc b/runtime/vm/os_thread_android.cc
|
| index b184f61625d2f4e1936db84e9fcb2bdbe4229852..5a54c59bbaa53d92ebdb5927dbc19ff548aed893 100644
|
| --- a/runtime/vm/os_thread_android.cc
|
| +++ b/runtime/vm/os_thread_android.cc
|
| @@ -193,8 +193,17 @@ ThreadId OSThread::GetCurrentThreadTraceId() {
|
| }
|
|
|
|
|
| -ThreadJoinId OSThread::GetCurrentThreadJoinId() {
|
| - return pthread_self();
|
| +ThreadJoinId OSThread::GetCurrentThreadJoinId(OSThread* thread) {
|
| + ASSERT(thread != NULL);
|
| + // Make sure we're filling in the join id for the current thread.
|
| + ASSERT(thread->id() == GetCurrentThreadId());
|
| + // Make sure the join_id_ hasn't been set, yet.
|
| + DEBUG_ASSERT(thread->join_id_ == kInvalidThreadJoinId);
|
| + pthread_t id = pthread_self();
|
| +#if defined(DEBUG)
|
| + thread->join_id_ = id;
|
| +#endif
|
| + return id;
|
| }
|
|
|
|
|
|
|