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

Unified Diff: chrome/renderer/chrome_ppapi_interfaces.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 | « chrome/common/render_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_ppapi_interfaces.cc
diff --git a/chrome/renderer/chrome_ppapi_interfaces.cc b/chrome/renderer/chrome_ppapi_interfaces.cc
index 243039176eb524f887ffd8788aeb0e9464c85969..cbd9d7d9639116946b844ea60457f9f5aaa59a80 100644
--- a/chrome/renderer/chrome_ppapi_interfaces.cc
+++ b/chrome/renderer/chrome_ppapi_interfaces.cc
@@ -42,18 +42,13 @@ bool LaunchSelLdr(const char* alleged_url, int socket_count,
void* imc_handles, void* nacl_process_handle,
int* nacl_process_id) {
std::vector<nacl::FileDescriptor> sockets;
- base::ProcessHandle nacl_process;
IPC::Message::Sender* sender = RenderThread::Get();
if (sender == NULL) {
sender = g_background_thread_sender.Pointer()->get();
}
if (!sender->Send(
new ChromeViewHostMsg_LaunchNaCl(
- GURL(alleged_url),
- socket_count,
- &sockets,
- &nacl_process,
- reinterpret_cast<base::ProcessId*>(nacl_process_id)))) {
+ GURL(alleged_url), socket_count, &sockets))) {
return false;
}
CHECK(static_cast<int>(sockets.size()) == socket_count);
@@ -61,7 +56,11 @@ bool LaunchSelLdr(const char* alleged_url, int socket_count,
static_cast<nacl::Handle*>(imc_handles)[i] =
nacl::ToNativeHandle(sockets[i]);
}
- *static_cast<nacl::Handle*>(nacl_process_handle) = nacl_process;
+ // TODO(mseaborn): Remove the arguments nacl_process_handle and
+ // nacl_process_id from the interface.
+ *reinterpret_cast<base::ProcessHandle*>(nacl_process_handle) =
+ (base::ProcessHandle) -1;
Mark Seaborn 2012/04/23 20:04:16 As I discussed with David, I had to change this to
+ *nacl_process_id = 0;
return true;
}
« no previous file with comments | « chrome/common/render_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698