| Index: base/threading/platform_thread_win.cc
|
| diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
|
| index 059547b10ed2728d7d80580adf23d31374e11b0d..fab7b9ced2b04cb72336a353f40f968bf129f020 100644
|
| --- a/base/threading/platform_thread_win.cc
|
| +++ b/base/threading/platform_thread_win.cc
|
| @@ -87,12 +87,12 @@ DWORD __stdcall ThreadFunc(void* params) {
|
| PlatformThread::CurrentId());
|
| }
|
|
|
| - return NULL;
|
| + return 0;
|
| }
|
|
|
| // CreateThreadInternal() matches PlatformThread::CreateWithPriority(), except
|
| -// that |out_thread_handle| may be NULL, in which case a non-joinable thread is
|
| -// created.
|
| +// that |out_thread_handle| may be nullptr, in which case a non-joinable thread
|
| +// is created.
|
| bool CreateThreadInternal(size_t stack_size,
|
| PlatformThread::Delegate* delegate,
|
| PlatformThreadHandle* out_thread_handle,
|
| @@ -106,7 +106,7 @@ bool CreateThreadInternal(size_t stack_size,
|
|
|
| ThreadParams* params = new ThreadParams;
|
| params->delegate = delegate;
|
| - params->joinable = out_thread_handle != NULL;
|
| + params->joinable = out_thread_handle != nullptr;
|
| params->priority = priority;
|
|
|
| // Using CreateThread here vs _beginthreadex makes thread creation a bit
|
| @@ -114,16 +114,15 @@ 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, &thread_id);
|
| + void* thread_handle =
|
| + ::CreateThread(nullptr, stack_size, ThreadFunc, params, flags, nullptr);
|
| if (!thread_handle) {
|
| delete params;
|
| return false;
|
| }
|
|
|
| if (out_thread_handle)
|
| - *out_thread_handle = PlatformThreadHandle(thread_handle, thread_id);
|
| + *out_thread_handle = PlatformThreadHandle(thread_handle);
|
| else
|
| CloseHandle(thread_handle);
|
| return true;
|
| @@ -205,8 +204,8 @@ bool PlatformThread::CreateWithPriority(size_t stack_size, Delegate* delegate,
|
|
|
| // static
|
| bool PlatformThread::CreateNonJoinable(size_t stack_size, Delegate* delegate) {
|
| - return CreateThreadInternal(
|
| - stack_size, delegate, NULL, ThreadPriority::NORMAL);
|
| + return CreateThreadInternal(stack_size, delegate, nullptr,
|
| + ThreadPriority::NORMAL);
|
| }
|
|
|
| // static
|
|
|