Index: base/threading/platform_thread_posix.cc |
=================================================================== |
--- base/threading/platform_thread_posix.cc (revision 118134) |
+++ base/threading/platform_thread_posix.cc (working copy) |
@@ -133,7 +133,9 @@ |
// Pthreads doesn't have the concept of a thread ID, so we have to reach down |
// into the kernel. |
#if defined(OS_MACOSX) |
- return mach_thread_self(); |
+ mach_port_t port = mach_thread_self(); |
+ mach_port_deallocate(mach_task_self(), port); |
+ return port; |
#elif defined(OS_LINUX) |
return syscall(__NR_gettid); |
#elif defined(OS_ANDROID) |