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

Unified Diff: mojo/system/data_pipe_producer_dispatcher.cc

Issue 411253011: Convert BeginWriteData...() to use the new user pointer handling (see r285350). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 ec99549b5438d4916e0ddc87a983dbf3db7b2699..b54f2d28bc41cd6a33106a4fa244eb9d1bb02069 100644
--- a/mojo/system/data_pipe_producer_dispatcher.cc
+++ b/mojo/system/data_pipe_producer_dispatcher.cc
@@ -66,16 +66,11 @@ MojoResult DataPipeProducerDispatcher::WriteDataImplNoLock(
}
MojoResult DataPipeProducerDispatcher::BeginWriteDataImplNoLock(
- void** buffer,
- uint32_t* buffer_num_bytes,
+ UserPointer<void*> buffer,
+ UserPointer<uint32_t> buffer_num_bytes,
MojoWriteDataFlags flags) {
lock().AssertAcquired();
- if (!VerifyUserPointerWithCount<void*>(buffer, 1))
- return MOJO_RESULT_INVALID_ARGUMENT;
- if (!VerifyUserPointer<uint32_t>(buffer_num_bytes))
- return MOJO_RESULT_INVALID_ARGUMENT;
-
return data_pipe_->ProducerBeginWriteData(
buffer, buffer_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