Chromium Code Reviews| Index: base/synchronization/waitable_event_win.cc |
| diff --git a/base/synchronization/waitable_event_win.cc b/base/synchronization/waitable_event_win.cc |
| index 89ace19961a7e7e42bca88e2f0a3663a2e30e763..50d38c4c741a1d7acb017b640b4fd1f84ffaba01 100644 |
| --- a/base/synchronization/waitable_event_win.cc |
| +++ b/base/synchronization/waitable_event_win.cc |
| @@ -9,6 +9,7 @@ |
| #include <utility> |
| +#include "base/debug/activity_tracker.h" |
| #include "base/logging.h" |
| #include "base/numerics/safe_conversions.h" |
| #include "base/threading/thread_restrictions.h" |
| @@ -45,6 +46,7 @@ bool WaitableEvent::IsSignaled() { |
| void WaitableEvent::Wait() { |
| base::ThreadRestrictions::AssertWaitAllowed(); |
| + base::debug::ScopedEventActivity event_activity(this); |
| DWORD result = WaitForSingleObject(handle_.Get(), INFINITE); |
| // It is most unexpected that this should ever fail. Help consumers learn |
| // about it if it should ever fail. |
| @@ -53,6 +55,7 @@ void WaitableEvent::Wait() { |
| bool WaitableEvent::TimedWait(const TimeDelta& max_time) { |
| base::ThreadRestrictions::AssertWaitAllowed(); |
| + base::debug::ScopedEventActivity event_activity(this); |
| DCHECK_GE(max_time, TimeDelta()); |
| // Truncate the timeout to milliseconds. The API specifies that this method |
| // can return in less than |max_time| (when returning false), as the argument |
| @@ -75,6 +78,7 @@ bool WaitableEvent::TimedWait(const TimeDelta& max_time) { |
| // static |
| size_t WaitableEvent::WaitMany(WaitableEvent** events, size_t count) { |
| base::ThreadRestrictions::AssertWaitAllowed(); |
| + base::debug::ScopedEventActivity event_activity(events[0]); |
|
manzagop (departed)
2016/06/01 21:59:41
A comment for this?
bcwhite
2016/06/02 16:18:16
Done.
|
| HANDLE handles[MAXIMUM_WAIT_OBJECTS]; |
| CHECK_LE(count, static_cast<size_t>(MAXIMUM_WAIT_OBJECTS)) |
| << "Can only wait on " << MAXIMUM_WAIT_OBJECTS << " with WaitMany"; |