Index: base/threading/platform_thread_win.cc |
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc |
index 56d73811c0fc5fd63e0f6d76a606306d4ad4669b..064dd9bb06a35fe9f1f70220163f55b5cb15b780 100644 |
--- a/base/threading/platform_thread_win.cc |
+++ b/base/threading/platform_thread_win.cc |
@@ -7,6 +7,7 @@ |
#include "base/logging.h" |
#include "base/threading/thread_restrictions.h" |
#include "base/win/windows_version.h" |
+#include "base/debug/trace_event.h" |
namespace base { |
@@ -94,6 +95,7 @@ void PlatformThread::Sleep(int duration_ms) { |
// static |
void PlatformThread::SetName(const char* name) { |
+ base::debug::TraceLog::GetInstance()->SetCurrentThreadName(name); |
// The debugger needs to be around to catch the name in the exception. If |
// there isn't a debugger, we are just needlessly throwing an exception. |
if (!::IsDebuggerPresent()) |