Index: mojo/common/handle_watcher.cc |
diff --git a/mojo/common/handle_watcher.cc b/mojo/common/handle_watcher.cc |
index 7819779911a9827af262397bd94952a0ff3dd126..79cdcdb616b7e8cc5c1b69603b945b52f06ced65 100644 |
--- a/mojo/common/handle_watcher.cc |
+++ b/mojo/common/handle_watcher.cc |
@@ -459,6 +459,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(); |
if (MessagePumpMojo::IsCurrent()) { |
state_.reset(new SameThreadWatchingState( |
this, handle, handle_signals, deadline, callback)); |