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

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

Issue 773113006: Fix/reland 505555fa8031fc06d67e9ed43e3021d8d84cb44f (crrev.com/773983002). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 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 | « mojo/edk/system/channel_endpoint_client.h ('k') | mojo/edk/system/message_pipe.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/message_pipe.h
diff --git a/mojo/edk/system/message_pipe.h b/mojo/edk/system/message_pipe.h
index e8f97d0c56d0efdf8878fa12b0936f2136216916..791eece9aca537da8437542cf02b36ccfeede271 100644
--- a/mojo/edk/system/message_pipe.h
+++ b/mojo/edk/system/message_pipe.h
@@ -107,8 +107,7 @@ class MOJO_SYSTEM_IMPL_EXPORT MessagePipe : public ChannelEndpointClient {
embedder::PlatformHandleVector* platform_handles);
// |ChannelEndpointClient| methods:
- void OnReadMessage(unsigned port,
- scoped_ptr<MessageInTransit> message) override;
+ bool OnReadMessage(unsigned port, MessageInTransit* message) override;
void OnDetachFromChannel(unsigned port) override;
private:
@@ -117,12 +116,12 @@ class MOJO_SYSTEM_IMPL_EXPORT MessagePipe : public ChannelEndpointClient {
// This is used internally by |WriteMessage()| and by |OnReadMessage()|.
// |transports| may be non-null only if it's nonempty and |message| has no
- // dispatchers attached.
- MojoResult EnqueueMessage(unsigned port,
- scoped_ptr<MessageInTransit> message,
- std::vector<DispatcherTransport>* transports);
+ // dispatchers attached. Must be called with |lock_| held.
+ MojoResult EnqueueMessageNoLock(unsigned port,
+ scoped_ptr<MessageInTransit> message,
+ std::vector<DispatcherTransport>* transports);
- // Helper for |EnqueueMessage()|. Must be called with |lock_| held.
+ // Helper for |EnqueueMessageNoLock()|. Must be called with |lock_| held.
MojoResult AttachTransportsNoLock(
unsigned port,
MessageInTransit* message,
« no previous file with comments | « mojo/edk/system/channel_endpoint_client.h ('k') | mojo/edk/system/message_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698