| Index: base/threading/platform_thread_posix.cc
|
| diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc
|
| index 43e58b73375a0c3273422d9c28e10150d3835197..744019456c83115e7b7b1593d4ed94174ce47d71 100644
|
| --- a/base/threading/platform_thread_posix.cc
|
| +++ b/base/threading/platform_thread_posix.cc
|
| @@ -46,6 +46,7 @@ struct ThreadParams {
|
| PlatformThread::Delegate* delegate;
|
| bool joinable;
|
| ThreadPriority priority;
|
| + PlatformThreadHandle* thread_handle;
|
| };
|
|
|
| void SetCurrentThreadPriority(ThreadPriority priority) {
|
| @@ -91,6 +92,10 @@ void* ThreadFunc(void* params) {
|
| if (thread_params->priority != kThreadPriority_Normal)
|
| SetCurrentThreadPriority(thread_params->priority);
|
|
|
| + ThreadIdNameManager::GetInstance()->RegisterThread(
|
| + thread_params->thread_handle,
|
| + PlatformThread::CurrentId());
|
| +
|
| delete thread_params;
|
| delegate->ThreadMain();
|
| #if defined(OS_ANDROID)
|
| @@ -155,6 +160,7 @@ bool CreateThread(size_t stack_size, bool joinable,
|
| params->delegate = delegate;
|
| params->joinable = joinable;
|
| params->priority = priority;
|
| + params->thread_handle = thread_handle;
|
|
|
| int err = pthread_create(thread_handle, &attributes, ThreadFunc, params);
|
| success = !err;
|
|
|