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

Unified Diff: components/nacl/renderer/plugin/pnacl_translate_thread.cc

Issue 1830853002: Make PlatformFileForTransit a class on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from mseaborn. Created 4 years, 9 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: components/nacl/renderer/plugin/pnacl_translate_thread.cc
diff --git a/components/nacl/renderer/plugin/pnacl_translate_thread.cc b/components/nacl/renderer/plugin/pnacl_translate_thread.cc
index 7f649d0d74f863a357d4240877d3eead19713348..624e8da5293ad839a033a129034f2e8b05821476 100644
--- a/components/nacl/renderer/plugin/pnacl_translate_thread.cc
+++ b/components/nacl/renderer/plugin/pnacl_translate_thread.cc
@@ -168,14 +168,14 @@ ppapi::proxy::SerializedHandle PnaclTranslateThread::GetHandleForSubprocess(
DCHECK(file->IsValid());
#if defined(OS_WIN)
+ HANDLE raw_handle = INVALID_HANDLE_VALUE;
if (!content::BrokerDuplicateHandle(
- file->GetPlatformFile(),
- peer_pid,
- &file_for_transit,
+ file->GetPlatformFile(), peer_pid, &raw_handle,
0, // desired_access is 0 since we're using DUPLICATE_SAME_ACCESS.
DUPLICATE_SAME_ACCESS)) {
return ppapi::proxy::SerializedHandle();
}
+ file_for_transit = IPC::PlatformFileForTransit(raw_handle, peer_pid);
#else
file_for_transit = base::FileDescriptor(dup(file->GetPlatformFile()), true);
#endif
« no previous file with comments | « components/nacl/renderer/manifest_service_channel.cc ('k') | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698