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

Unified Diff: ppapi/proxy/ppp_content_decryptor_private_proxy.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: Remove changes to base/memory. 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
Index: ppapi/proxy/ppp_content_decryptor_private_proxy.cc
diff --git a/ppapi/proxy/ppp_content_decryptor_private_proxy.cc b/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
index 3f6315f0794e9abf6f45ea0e8d2346bb1ce3304c..8c9e8422d7d63b0a4c1bdab510814fbca8aa3610 100644
--- a/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
+++ b/ppapi/proxy/ppp_content_decryptor_private_proxy.cc
@@ -49,20 +49,12 @@ PP_Bool ShareHostBufferResourceToPlugin(
EnterResourceNoLock<PPB_Buffer_API> enter(resource, true);
if (enter.failed())
return PP_FALSE;
- int handle;
+ base::SharedMemoryHandle handle;
int32_t result = enter.object()->GetSharedMemory(&handle);
if (result != PP_OK)
return PP_FALSE;
- base::PlatformFile platform_file =
- #if defined(OS_WIN)
- reinterpret_cast<HANDLE>(static_cast<intptr_t>(handle));
- #elif defined(OS_POSIX)
- handle;
- #else
- #error Not implemented.
- #endif
-
- *shared_mem_handle = dispatcher->ShareHandleWithRemote(platform_file, false);
+
+ *shared_mem_handle = dispatcher->ShareSharedMemoryHandleWithRemote(handle);
return PP_TRUE;
}

Powered by Google App Engine
This is Rietveld 408576698