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

Unified Diff: content/browser/renderer_host/pepper/pepper_gamepad_host.cc

Issue 11312017: Avoid leaking SerializedHandles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/pepper/pepper_gamepad_host.cc
diff --git a/content/browser/renderer_host/pepper/pepper_gamepad_host.cc b/content/browser/renderer_host/pepper/pepper_gamepad_host.cc
index 9e967494600ba8e8a5ec0e4dfbcda3914e1655ee..267fce2dfbc51a0eab116a47600d9cd4ac2a5b18 100644
--- a/content/browser/renderer_host/pepper/pepper_gamepad_host.cc
+++ b/content/browser/renderer_host/pepper/pepper_gamepad_host.cc
@@ -71,14 +71,11 @@ int32_t PepperGamepadHost::OnMsgRequestMemory(
}
void PepperGamepadHost::GotUserGesture(
- const ppapi::host::ReplyMessageContext& in_context) {
+ const ppapi::host::ReplyMessageContext& context) {
base::SharedMemoryHandle handle =
gamepad_service_->GetSharedMemoryHandleForProcess(
browser_ppapi_host_->GetPluginProcessHandle());
- // The shared memory handle is sent in the params struct
- // (in the reply context), so we have to make a copy to mutate it.
- ppapi::host::ReplyMessageContext context = in_context;
context.params.AppendHandle(ppapi::proxy::SerializedHandle(
handle, sizeof(ppapi::ContentGamepadHardwareBuffer)));
host()->SendReply(context, PpapiPluginMsg_Gamepad_SendMemory());
« no previous file with comments | « no previous file | content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698