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

Unified Diff: mojo/edk/system/message_in_transit.h

Issue 1554623005: Ensure that in-flight message pipes are always closed and the other end is notified. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix dcheck of lock being acquired at destruction Created 5 years 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 | « no previous file | mojo/edk/system/message_pipe_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/message_in_transit.h
diff --git a/mojo/edk/system/message_in_transit.h b/mojo/edk/system/message_in_transit.h
index bebaaf758481b9e93e06372efd76007278cc26c7..b97ec3438abd308bce27aafe302a07d0701feb09 100644
--- a/mojo/edk/system/message_in_transit.h
+++ b/mojo/edk/system/message_in_transit.h
@@ -46,12 +46,16 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit {
MESSAGE = 0,
// Since there's a limit on how many fds can be sent in one sendmsg call, if
// a message has more than that the fds are sent in this message type first.
- RAW_CHANNEL_POSIX_EXTRA_PLATFORM_HANDLES = 1,
+ RAW_CHANNEL_POSIX_EXTRA_PLATFORM_HANDLES,
// When a RawChannel is serialized, there could be pending messages to be
// written to the pipe. They are serialized to shared memory. When they're
// deserialized on the receiving end, we want to write them to the pipe
// without any message headers, because those have already been written.
- RAW_MESSAGE = 3,
+ RAW_MESSAGE,
+ // Tells the other side to close its pipe. This is needed because when a
+ // MessagePipeDispatcher is closed, it has to wait to flush any pending
+ // messages or else in-flight message pipes won't be closed.
+ QUIT_MESSAGE,
};
// Messages (the header and data) must always be aligned to a multiple of this
« no previous file with comments | « no previous file | mojo/edk/system/message_pipe_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698