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

Unified Diff: mojo/system/message_pipe_dispatcher.cc

Issue 417303002: Convert ReadMessage...() to use the new user pointer handling (see r285350). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hmm Created 6 years, 5 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/system/message_pipe_dispatcher.h ('k') | mojo/system/message_pipe_dispatcher_unittest.cc » ('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 484613ca5d195636feadd64c17b7057047ca2706..6e32d039b9e51c1ec0d54dd7636115fe1bc7e405 100644
--- a/mojo/system/message_pipe_dispatcher.cc
+++ b/mojo/system/message_pipe_dispatcher.cc
@@ -198,20 +198,12 @@ MojoResult MessagePipeDispatcher::WriteMessageImplNoLock(
}
MojoResult MessagePipeDispatcher::ReadMessageImplNoLock(
- void* bytes,
- uint32_t* num_bytes,
+ UserPointer<void> bytes,
+ UserPointer<uint32_t> num_bytes,
DispatcherVector* dispatchers,
uint32_t* num_dispatchers,
MojoReadMessageFlags flags) {
lock().AssertAcquired();
-
- if (num_bytes) {
- if (!VerifyUserPointer<uint32_t>(num_bytes))
- return MOJO_RESULT_INVALID_ARGUMENT;
- if (!VerifyUserPointerWithSize<1>(bytes, *num_bytes))
- return MOJO_RESULT_INVALID_ARGUMENT;
- }
-
return message_pipe_->ReadMessage(port_, bytes, num_bytes, dispatchers,
num_dispatchers, flags);
}
« no previous file with comments | « mojo/system/message_pipe_dispatcher.h ('k') | mojo/system/message_pipe_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698