Index: base/threading/platform_thread_win.cc |
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc |
index 6030992d68078a5baa98f93fe396c294eb2b9423..ed58f6e8e17845cdfcb0cc879e192dbdda1f2fad 100644 |
--- a/base/threading/platform_thread_win.cc |
+++ b/base/threading/platform_thread_win.cc |
@@ -6,6 +6,7 @@ |
#include <stddef.h> |
+#include "base/debug/activity_tracker.h" |
#include "base/debug/alias.h" |
#include "base/debug/profiler.h" |
#include "base/logging.h" |
@@ -202,6 +203,9 @@ bool PlatformThread::CreateNonJoinable(size_t stack_size, Delegate* delegate) { |
// static |
void PlatformThread::Join(PlatformThreadHandle thread_handle) { |
+ // Record the event that this thread is blocking upon (for hang diagnosis). |
+ base::debug::ScopedThreadJoinActivity thread_activity(&thread_handle); |
+ |
DCHECK(thread_handle.platform_handle()); |
// TODO(willchan): Enable this check once I can get it to work for Windows |
// shutdown. |