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

Unified Diff: chrome/browser/nacl_host/nacl_process_host.cc

Issue 10134029: NaCl: Don't pass the NaCl process's Windows handle to the renderer process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use C-style cast Created 8 years, 8 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 | chrome/common/render_messages.h » ('j') | chrome/renderer/chrome_ppapi_interfaces.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/nacl_host/nacl_process_host.cc
diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc
index eb8b25c9accf4d46b018ccc51277f71485c6b581..4bfb97e1c22f0f6faa5c2ef6b6df737d414f6764 100644
--- a/chrome/browser/nacl_host/nacl_process_host.cc
+++ b/chrome/browser/nacl_host/nacl_process_host.cc
@@ -910,44 +910,22 @@ bool NaClProcessHost::ReplyToRenderer() {
#endif
}
- const ChildProcessData& data = process_->GetData();
- base::ProcessHandle nacl_process_handle;
#if defined(OS_WIN)
- // Copy the process handle into the renderer process.
- // TODO(mseaborn): Remove this. The renderer process uses this
- // handle with NaCl's handle_pass module, but we are replacing
- // handle_pass with Chrome's BrokerDuplicateHandle() function.
- if (!DuplicateHandle(base::GetCurrentProcessHandle(),
- data.handle,
- chrome_render_message_filter_->peer_handle(),
- &nacl_process_handle,
- PROCESS_DUP_HANDLE,
- FALSE,
- 0)) {
- DLOG(ERROR) << "DuplicateHandle() failed";
- return false;
- }
// If we are on 64-bit Windows, the NaCl process's sandbox is
// managed by a different process from the renderer's sandbox. We
// need to inform the renderer's sandbox about the NaCl process so
// that the renderer can send handles to the NaCl process using
// BrokerDuplicateHandle().
if (RunningOnWOW64()) {
- if (!content::BrokerAddTargetPeer(data.handle)) {
+ if (!content::BrokerAddTargetPeer(process_->GetData().handle)) {
DLOG(ERROR) << "Failed to add NaCl process PID";
return false;
}
}
-#else
- // We use pid as process handle on Posix
- nacl_process_handle = data.handle;
#endif
- // Get the pid of the NaCl process
- base::ProcessId nacl_process_id = base::GetProcId(data.handle);
-
ChromeViewHostMsg_LaunchNaCl::WriteReplyParams(
- reply_msg_, handles_for_renderer, nacl_process_handle, nacl_process_id);
+ reply_msg_, handles_for_renderer);
chrome_render_message_filter_->Send(reply_msg_);
chrome_render_message_filter_ = NULL;
reply_msg_ = NULL;
« no previous file with comments | « no previous file | chrome/common/render_messages.h » ('j') | chrome/renderer/chrome_ppapi_interfaces.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698