Index: mojo/public/cpp/system/simple_watcher.h |
diff --git a/mojo/public/cpp/system/simple_watcher.h b/mojo/public/cpp/system/simple_watcher.h |
index 5e5a7ea3a101a24eb8b1b293f32cf8554cc0cf0c..9001884c97360658648098eadde93057d88aab25 100644 |
--- a/mojo/public/cpp/system/simple_watcher.h |
+++ b/mojo/public/cpp/system/simple_watcher.h |
@@ -164,7 +164,7 @@ class MOJO_CPP_SYSTEM_EXPORT SimpleWatcher { |
private: |
class Context; |
- void OnHandleReady(scoped_refptr<const Context> context, MojoResult result); |
+ void OnHandleReady(int watch_id, MojoResult result); |
base::ThreadChecker thread_checker_; |
@@ -190,6 +190,10 @@ class MOJO_CPP_SYSTEM_EXPORT SimpleWatcher { |
// The handle currently under watch. Not owned. |
Handle handle_; |
+ // A simple counter to disambiguate notifications from multiple watch contexts |
+ // in the event that this SimpleWatcher cancels and watches multiple times. |
+ int watch_id_ = 0; |
+ |
// The callback to call when the handle is signaled. |
ReadyCallback callback_; |