Index: mojo/common/handle_watcher.cc |
diff --git a/mojo/common/handle_watcher.cc b/mojo/common/handle_watcher.cc |
index 737449a2feb807a0456100fee4f9a3839197caca..05f82b13ee589324f62d2d8b152fda3d86bb48c6 100644 |
--- a/mojo/common/handle_watcher.cc |
+++ b/mojo/common/handle_watcher.cc |
@@ -458,6 +458,8 @@ void HandleWatcher::Start(const Handle& handle, |
DCHECK(handle.is_valid()); |
DCHECK_NE(MOJO_HANDLE_SIGNAL_NONE, handle_signals); |
+ // Need to clear the state before creating a new one. |
+ state_.reset(); |
viettrungluu
2014/12/08 18:10:01
I assume that this is because we need the dtor of
qsr
2014/12/09 10:02:23
The destructor remove the handler, and neither of
|
if (MessagePumpMojo::IsCurrent()) { |
state_.reset(new SameThreadWatchingState( |
this, handle, handle_signals, deadline, callback)); |