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

Unified Diff: mojo/system/message_pipe_dispatcher.cc

Issue 68993005: Mojo: More plumbing to support sending handles over MessagePipes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/system/message_pipe.cc ('k') | mojo/system/message_pipe_endpoint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_pipe_dispatcher.cc
diff --git a/mojo/system/message_pipe_dispatcher.cc b/mojo/system/message_pipe_dispatcher.cc
index df4def127dcb777724af4a2fd0b983b7e71f6921..e0270f8b30177e32e7b86b7a2ce491715bc3ca7e 100644
--- a/mojo/system/message_pipe_dispatcher.cc
+++ b/mojo/system/message_pipe_dispatcher.cc
@@ -45,6 +45,9 @@ MojoResult MessagePipeDispatcher::WriteMessageImplNoLock(
const void* bytes, uint32_t num_bytes,
const std::vector<Dispatcher*>* dispatchers,
MojoWriteMessageFlags flags) {
+ DCHECK(!dispatchers || (dispatchers->size() > 0 &&
+ dispatchers->size() <= kMaxMessageNumHandles));
+
lock().AssertAcquired();
if (!VerifyUserPointer<void>(bytes, num_bytes))
@@ -52,15 +55,6 @@ MojoResult MessagePipeDispatcher::WriteMessageImplNoLock(
if (num_bytes > kMaxMessageNumBytes)
return MOJO_RESULT_RESOURCE_EXHAUSTED;
- if (dispatchers) {
- DCHECK_GT(dispatchers->size(), 0u);
- DCHECK_LE(dispatchers->size(), kMaxMessageNumHandles);
-
- // TODO(vtl)
- NOTIMPLEMENTED();
- return MOJO_RESULT_UNIMPLEMENTED;
- }
-
return message_pipe_->WriteMessage(port_,
bytes, num_bytes,
dispatchers,
« no previous file with comments | « mojo/system/message_pipe.cc ('k') | mojo/system/message_pipe_endpoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698