Index: components/nacl/browser/nacl_host_message_filter.cc |
diff --git a/components/nacl/browser/nacl_host_message_filter.cc b/components/nacl/browser/nacl_host_message_filter.cc |
index a421061dcb53e7caf92cdbda3506dccbfda45b2d..a71f419358b74d586fa80c269b809f6973e2bd05 100644 |
--- a/components/nacl/browser/nacl_host_message_filter.cc |
+++ b/components/nacl/browser/nacl_host_message_filter.cc |
@@ -132,14 +132,16 @@ void NaClHostMessageFilter::OnNaClCreateTemporaryFile( |
void NaClHostMessageFilter::AsyncReturnTemporaryFile( |
int pp_instance, |
- base::PlatformFile fd, |
+ const base::File& file, |
bool is_hit) { |
- Send(new NaClViewMsg_NexeTempFileReply( |
- pp_instance, |
- is_hit, |
- // Don't close our copy of the handle, because PnaclHost will use it |
- // when the translation finishes. |
- IPC::GetFileHandleForProcess(fd, PeerHandle(), false))); |
+ IPC::PlatformFileForTransit fd = IPC::InvalidPlatformFileForTransit(); |
+ if (file.IsValid()) { |
+ // Don't close our copy of the handle, because PnaclHost will use it |
+ // when the translation finishes. |
+ fd = IPC::GetFileHandleForProcess(file.GetPlatformFile(), PeerHandle(), |
+ false); |
+ } |
+ Send(new NaClViewMsg_NexeTempFileReply(pp_instance, is_hit, fd)); |
} |
void NaClHostMessageFilter::OnNaClGetNumProcessors(int* num_processors) { |