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

Unified Diff: mojo/public/cpp/system/platform_handle.cc

Issue 2875453002: Add a size parameter to SharedMemoryHandle. (Closed)
Patch Set: Fix IPC on POSIX. Created 3 years, 7 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
Index: mojo/public/cpp/system/platform_handle.cc
diff --git a/mojo/public/cpp/system/platform_handle.cc b/mojo/public/cpp/system/platform_handle.cc
index 05bc2154fcc5dbd906f2e4db20887b7db2fc6529..8c7f0ee308d3617f6c1827309fd2d7e9544f685b 100644
--- a/mojo/public/cpp/system/platform_handle.cc
+++ b/mojo/public/cpp/system/platform_handle.cc
@@ -124,11 +124,11 @@ MojoResult UnwrapSharedMemoryHandle(ScopedSharedBufferHandle handle,
CHECK_EQ(platform_handle.type, MOJO_PLATFORM_HANDLE_TYPE_FILE_DESCRIPTOR);
*memory_handle = base::SharedMemoryHandle(
base::FileDescriptor(static_cast<int>(platform_handle.value), false),
- guid);
+ num_bytes, guid);
#elif defined(OS_WIN)
CHECK_EQ(platform_handle.type, MOJO_PLATFORM_HANDLE_TYPE_WINDOWS_HANDLE);
*memory_handle = base::SharedMemoryHandle(
- reinterpret_cast<HANDLE>(platform_handle.value), guid);
+ reinterpret_cast<HANDLE>(platform_handle.value), num_bytes, guid);
#endif
return MOJO_RESULT_OK;

Powered by Google App Engine
This is Rietveld 408576698