Chromium Code Reviews| Index: base/threading/platform_thread_win.cc |
| diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc |
| index 3df371943f5e6fdf1a91175802b7fb36f78d9aba..6e488a2f8a13bf7f92fc078f4a0fdfbca980297c 100644 |
| --- a/base/threading/platform_thread_win.cc |
| +++ b/base/threading/platform_thread_win.cc |
| @@ -108,17 +108,19 @@ bool CreateThreadInternal(size_t stack_size, |
| // have to work running on CreateThread() threads anyway, since we run code |
| // on the Windows thread pool, etc. For some background on the difference: |
| // http://www.microsoft.com/msj/1099/win32/win321099.aspx |
| + PlatformThreadId thread_id; |
| void* thread_handle = CreateThread( |
| - NULL, stack_size, ThreadFunc, params, flags, NULL); |
| + NULL, stack_size, ThreadFunc, params, flags, &thread_id); |
| if (!thread_handle) { |
| delete params; |
| return false; |
| } |
| - if (out_thread_handle) |
| - *out_thread_handle = PlatformThreadHandle(thread_handle); |
| - else |
| + if (out_thread_handle) { |
|
rvargas (doing something else)
2015/03/26 02:19:27
nit: no need for {}
kinuko
2015/04/13 02:02:59
Done.
|
| + *out_thread_handle = PlatformThreadHandle(thread_handle, thread_id); |
| + } else { |
| CloseHandle(thread_handle); |
| + } |
| return true; |
| } |