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

Unified Diff: mojo/system/core.cc

Issue 414393002: Convert verification of options structs to use the new user pointer handling (see r285350). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: temporarily disable part of OptionsValidationTest.InvalidDeath 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 | « no previous file | mojo/system/data_pipe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/core.cc
diff --git a/mojo/system/core.cc b/mojo/system/core.cc
index 889943490fd5d5781a5794667ec61c30123df39e..9b91632b946f3e01768c5d793568b4e1df5fbe00 100644
--- a/mojo/system/core.cc
+++ b/mojo/system/core.cc
@@ -149,9 +149,8 @@ MojoResult Core::CreateMessagePipe(
UserPointer<MojoHandle> message_pipe_handle0,
UserPointer<MojoHandle> message_pipe_handle1) {
MojoCreateMessagePipeOptions validated_options = {};
- // This will verify the |options| pointer.
MojoResult result = MessagePipeDispatcher::ValidateCreateOptions(
- options.GetPointerUnsafe(), &validated_options);
+ options, &validated_options);
if (result != MOJO_RESULT_OK)
return result;
@@ -316,9 +315,8 @@ MojoResult Core::CreateDataPipe(
UserPointer<MojoHandle> data_pipe_producer_handle,
UserPointer<MojoHandle> data_pipe_consumer_handle) {
MojoCreateDataPipeOptions validated_options = {};
- // This will verify the |options| pointer.
- MojoResult result = DataPipe::ValidateCreateOptions(
- options.GetPointerUnsafe(), &validated_options);
+ MojoResult result = DataPipe::ValidateCreateOptions(options,
+ &validated_options);
if (result != MOJO_RESULT_OK)
return result;
@@ -424,9 +422,8 @@ MojoResult Core::CreateSharedBuffer(
uint64_t num_bytes,
UserPointer<MojoHandle> shared_buffer_handle) {
MojoCreateSharedBufferOptions validated_options = {};
- // This will verify the |options| pointer.
MojoResult result =
- SharedBufferDispatcher::ValidateCreateOptions(options.GetPointerUnsafe(),
+ SharedBufferDispatcher::ValidateCreateOptions(options,
&validated_options);
if (result != MOJO_RESULT_OK)
return result;
@@ -460,8 +457,8 @@ MojoResult Core::DuplicateBufferHandle(
// Don't verify |options| here; that's the dispatcher's job.
scoped_refptr<Dispatcher> new_dispatcher;
- MojoResult result = dispatcher->DuplicateBufferHandle(
- options.GetPointerUnsafe(), &new_dispatcher);
+ MojoResult result = dispatcher->DuplicateBufferHandle(options,
+ &new_dispatcher);
if (result != MOJO_RESULT_OK)
return result;
« no previous file with comments | « no previous file | mojo/system/data_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698