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

Side by Side Diff: mojo/public/platform/native/system_thunks.cc

Issue 2043713004: Mojo: Add NotifyBadMessage API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/public/platform/native/system_thunks.h" 5 #include "mojo/public/platform/native/system_thunks.h"
6 6
7 #include <assert.h> 7 #include <assert.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 MojoResult MojoUnwrapPlatformSharedBufferHandle( 270 MojoResult MojoUnwrapPlatformSharedBufferHandle(
271 MojoHandle mojo_handle, 271 MojoHandle mojo_handle,
272 struct MojoPlatformHandle* platform_handle, 272 struct MojoPlatformHandle* platform_handle,
273 size_t* num_bytes, 273 size_t* num_bytes,
274 MojoPlatformSharedBufferHandleFlags* flags) { 274 MojoPlatformSharedBufferHandleFlags* flags) {
275 assert(g_thunks.UnwrapPlatformSharedBufferHandle); 275 assert(g_thunks.UnwrapPlatformSharedBufferHandle);
276 return g_thunks.UnwrapPlatformSharedBufferHandle(mojo_handle, platform_handle, 276 return g_thunks.UnwrapPlatformSharedBufferHandle(mojo_handle, platform_handle,
277 num_bytes, flags); 277 num_bytes, flags);
278 } 278 }
279 279
280 MojoResult MojoNotifyBadMessage(MojoMessageHandle message) {
281 assert(g_thunks.NotifyBadMessage);
282 return g_thunks.NotifyBadMessage(message);
283 }
284
280 extern "C" THUNK_EXPORT size_t MojoSetSystemThunks( 285 extern "C" THUNK_EXPORT size_t MojoSetSystemThunks(
281 const MojoSystemThunks* system_thunks) { 286 const MojoSystemThunks* system_thunks) {
282 if (system_thunks->size >= sizeof(g_thunks)) 287 if (system_thunks->size >= sizeof(g_thunks))
283 g_thunks = *system_thunks; 288 g_thunks = *system_thunks;
284 return sizeof(g_thunks); 289 return sizeof(g_thunks);
285 } 290 }
286 291
287 } // extern "C" 292 } // extern "C"
OLDNEW
« mojo/public/c/system/message_pipe.h ('K') | « mojo/public/platform/native/system_thunks.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698