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

Unified Diff: chrome/renderer/pepper/pepper_shared_memory_message_filter.cc

Issue 1154613006: Update pepper to not assume that SharedMemoryHandle is an int. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another nits pass. Created 5 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
« no previous file with comments | « no previous file | content/common/pepper_file_util.h » ('j') | ppapi/thunk/ppb_image_data_api.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/pepper/pepper_shared_memory_message_filter.cc
diff --git a/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc b/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc
index e01aea741fc85aeb6bf896ca7cc0598f0df76de1..3ef6dff0c8bcb87314bf24282bcf5f68bfb6519d 100644
--- a/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc
+++ b/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc
@@ -56,17 +56,9 @@ void PepperSharedMemoryMessageFilter::OnHostMsgCreateSharedMemory(
->GetVarTracker()
->TrackSharedMemoryHandle(instance, host_shm_handle, size);
- base::PlatformFile host_handle =
-#if defined(OS_WIN)
- host_shm_handle;
-#elif defined(OS_POSIX)
- host_shm_handle.fd;
-#else
-#error Not implemented.
-#endif
// We set auto_close to false since we need our file descriptor to
// actually be duplicated on linux. The shared memory destructor will
// close the original handle for us.
- plugin_handle->set_shmem(host_->ShareHandleWithRemote(host_handle, false),
- size);
+ plugin_handle->set_shmem(
+ host_->ShareSharedMemoryHandleWithRemote(host_shm_handle), size);
}
« no previous file with comments | « no previous file | content/common/pepper_file_util.h » ('j') | ppapi/thunk/ppb_image_data_api.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698