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

Unified Diff: mojo/system/data_pipe_producer_dispatcher.cc

Issue 423583002: Convert WriteData...() to use the new user pointer handling (see r285350). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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/data_pipe_producer_dispatcher.h ('k') | mojo/system/dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/data_pipe_producer_dispatcher.cc
diff --git a/mojo/system/data_pipe_producer_dispatcher.cc b/mojo/system/data_pipe_producer_dispatcher.cc
index b54f2d28bc41cd6a33106a4fa244eb9d1bb02069..57f0ed6bb126d35040a61dce4fb0032ee36393d2 100644
--- a/mojo/system/data_pipe_producer_dispatcher.cc
+++ b/mojo/system/data_pipe_producer_dispatcher.cc
@@ -51,16 +51,10 @@ DataPipeProducerDispatcher::CreateEquivalentDispatcherAndCloseImplNoLock() {
}
MojoResult DataPipeProducerDispatcher::WriteDataImplNoLock(
- const void* elements,
- uint32_t* num_bytes,
+ UserPointer<const void> elements,
+ UserPointer<uint32_t> num_bytes,
MojoWriteDataFlags flags) {
lock().AssertAcquired();
-
- if (!VerifyUserPointer<uint32_t>(num_bytes))
- return MOJO_RESULT_INVALID_ARGUMENT;
- if (!VerifyUserPointerWithSize<1>(elements, *num_bytes))
- return MOJO_RESULT_INVALID_ARGUMENT;
-
return data_pipe_->ProducerWriteData(
elements, num_bytes, (flags & MOJO_WRITE_DATA_FLAG_ALL_OR_NONE));
}
« no previous file with comments | « mojo/system/data_pipe_producer_dispatcher.h ('k') | mojo/system/dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698