| 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..fb2d3b5f883985d761a38ad02d7c5dc4020d12b3 100644
|
| --- a/base/threading/platform_thread_win.cc
|
| +++ b/base/threading/platform_thread_win.cc
|
| @@ -74,8 +74,7 @@ DWORD __stdcall ThreadFunc(void* params) {
|
| if (did_dup) {
|
| scoped_platform_handle.Set(platform_handle);
|
| ThreadIdNameManager::GetInstance()->RegisterThread(
|
| - scoped_platform_handle.Get(),
|
| - PlatformThread::CurrentId());
|
| + PlatformThread::CurrentHandle(), PlatformThread::CurrentId());
|
| }
|
|
|
| delete thread_params;
|
| @@ -83,8 +82,7 @@ DWORD __stdcall ThreadFunc(void* params) {
|
|
|
| if (did_dup) {
|
| ThreadIdNameManager::GetInstance()->RemoveName(
|
| - scoped_platform_handle.Get(),
|
| - PlatformThread::CurrentId());
|
| + PlatformThread::CurrentHandle(), PlatformThread::CurrentId());
|
| }
|
|
|
| return NULL;
|
| @@ -123,7 +121,7 @@ bool CreateThreadInternal(size_t stack_size,
|
| }
|
|
|
| if (out_thread_handle)
|
| - *out_thread_handle = PlatformThreadHandle(thread_handle, thread_id);
|
| + *out_thread_handle = PlatformThreadHandle(thread_handle);
|
| else
|
| CloseHandle(thread_handle);
|
| return true;
|
| @@ -211,7 +209,7 @@ bool PlatformThread::CreateNonJoinable(size_t stack_size, Delegate* delegate) {
|
|
|
| // static
|
| void PlatformThread::Join(PlatformThreadHandle thread_handle) {
|
| - DCHECK(thread_handle.platform_handle());
|
| + DCHECK(thread_handle.handle_);
|
| // TODO(willchan): Enable this check once I can get it to work for Windows
|
| // shutdown.
|
| // Joining another thread may block the current thread for a long time, since
|
| @@ -223,7 +221,7 @@ void PlatformThread::Join(PlatformThreadHandle thread_handle) {
|
|
|
| // Wait for the thread to exit. It should already have terminated but make
|
| // sure this assumption is valid.
|
| - DWORD result = WaitForSingleObject(thread_handle.platform_handle(), INFINITE);
|
| + DWORD result = WaitForSingleObject(thread_handle.handle_, INFINITE);
|
| if (result != WAIT_OBJECT_0) {
|
| // Debug info for bug 127931.
|
| DWORD error = GetLastError();
|
| @@ -232,7 +230,7 @@ void PlatformThread::Join(PlatformThreadHandle thread_handle) {
|
| CHECK(false);
|
| }
|
|
|
| - CloseHandle(thread_handle.platform_handle());
|
| + CloseHandle(thread_handle.handle_);
|
| }
|
|
|
| // static
|
| @@ -260,7 +258,7 @@ void PlatformThread::SetCurrentThreadPriority(ThreadPriority priority) {
|
| #ifndef NDEBUG
|
| const BOOL success =
|
| #endif
|
| - ::SetThreadPriority(PlatformThread::CurrentHandle().platform_handle(),
|
| + ::SetThreadPriority(PlatformThread::CurrentHandle().handle_,
|
| desired_priority);
|
| DPLOG_IF(ERROR, !success) << "Failed to set thread priority to "
|
| << desired_priority;
|
| @@ -268,8 +266,7 @@ void PlatformThread::SetCurrentThreadPriority(ThreadPriority priority) {
|
|
|
| // static
|
| ThreadPriority PlatformThread::GetCurrentThreadPriority() {
|
| - int priority =
|
| - ::GetThreadPriority(PlatformThread::CurrentHandle().platform_handle());
|
| + int priority = ::GetThreadPriority(PlatformThread::CurrentHandle().handle_);
|
| switch (priority) {
|
| case THREAD_PRIORITY_LOWEST:
|
| return ThreadPriority::BACKGROUND;
|
|
|