| Index: base/win/object_watcher.cc
|
| diff --git a/base/win/object_watcher.cc b/base/win/object_watcher.cc
|
| index ebe596f3a6ec0686ed8cce3e2ae60a00f826b8d5..0b9d7a0f5ac94d47319f2751aeadb196476e9b97 100644
|
| --- a/base/win/object_watcher.cc
|
| +++ b/base/win/object_watcher.cc
|
| @@ -5,6 +5,7 @@
|
| #include "base/win/object_watcher.h"
|
|
|
| #include "base/bind.h"
|
| +#include "base/debug/alias.h"
|
| #include "base/logging.h"
|
|
|
| namespace base {
|
| @@ -40,6 +41,7 @@ bool ObjectWatcher::StartWatching(HANDLE object, Delegate* delegate) {
|
| delegate);
|
| object_ = object;
|
| origin_loop_ = MessageLoop::current();
|
| + stack_trace_ = base::debug::StackTrace();
|
|
|
| if (!RegisterWaitForSingleObject(&wait_object_, object, DoneWaiting,
|
| this, INFINITE, wait_flags)) {
|
| @@ -97,6 +99,10 @@ void ObjectWatcher::Signal(Delegate* delegate) {
|
| // StartWatching(). As a result, we save any state we need and clear previous
|
| // watcher state before signaling the delegate.
|
| HANDLE object = object_;
|
| + // Alias the stack trace where the watch was started so it'll be available in
|
| + // minidumps.
|
| + base::debug::StackTrace stack_trace = stack_trace_;
|
| + base::debug::Alias(&stack_trace);
|
| StopWatching();
|
| delegate->OnObjectSignaled(object);
|
| }
|
|
|