Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1476)

Unified Diff: mojo/edk/system/local_message_pipe_endpoint.cc

Issue 2078043002: Make Dispatcher::AddAwakable(), etc. always set *signals_state (if signals_state is non-null). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/dispatcher.h ('k') | mojo/edk/system/simple_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/local_message_pipe_endpoint.cc
diff --git a/mojo/edk/system/local_message_pipe_endpoint.cc b/mojo/edk/system/local_message_pipe_endpoint.cc
index 276a009df0cc8490a854a99114d377eec8ad0e5f..1b53d113d7df96bc043a3040bb48acbf8607ab35 100644
--- a/mojo/edk/system/local_message_pipe_endpoint.cc
+++ b/mojo/edk/system/local_message_pipe_endpoint.cc
@@ -157,18 +157,15 @@ MojoResult LocalMessagePipeEndpoint::AddAwakable(
DCHECK(is_open_);
HandleSignalsState state = GetHandleSignalsState();
+ if (signals_state)
+ *signals_state = state;
if (state.satisfies(signals)) {
if (force)
awakable_list_.Add(awakable, signals, context);
- if (signals_state)
- *signals_state = state;
return MOJO_RESULT_ALREADY_EXISTS;
}
- if (!state.can_satisfy(signals)) {
- if (signals_state)
- *signals_state = state;
+ if (!state.can_satisfy(signals))
return MOJO_RESULT_FAILED_PRECONDITION;
- }
awakable_list_.Add(awakable, signals, context);
return MOJO_RESULT_OK;
« no previous file with comments | « mojo/edk/system/dispatcher.h ('k') | mojo/edk/system/simple_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698