Index: components/nacl/loader/nacl_listener.cc |
diff --git a/components/nacl/loader/nacl_listener.cc b/components/nacl/loader/nacl_listener.cc |
index 4a58a1ce49bcd8a2814fab35a611bdf91ecd2028..56bb8d419911c0743126dc712f4a4a0168f9484f 100644 |
--- a/components/nacl/loader/nacl_listener.cc |
+++ b/components/nacl/loader/nacl_listener.cc |
@@ -337,7 +337,7 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) { |
manifest_service_handle))) |
LOG(ERROR) << "Failed to send IPC channel handle to NaClProcessHost."; |
- std::vector<nacl::FileDescriptor> handles = params.handles; |
+ std::vector<IPC::PlatformFileForTransit> handles = params.handles; |
struct NaClChromeMainArgs* args = NaClChromeMainArgsCreate(); |
if (args == NULL) { |
LOG(ERROR) << "NaClChromeMainArgsCreate() failed"; |
@@ -348,15 +348,16 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) { |
args->number_of_cores = number_of_cores_; |
args->create_memory_object_func = CreateMemoryObject; |
# if defined(OS_MACOSX) |
- CHECK(handles.size() >= 1); |
- g_shm_fd = nacl::ToNativeHandle(handles[handles.size() - 1]); |
+ CHECK(!handles.empty()); |
+ g_shm_fd = IPC::PlatformFileForTransitToPlatformFile(handles.back()); |
handles.pop_back(); |
# endif |
#endif |
DCHECK(params.process_type != nacl::kUnknownNaClProcessType); |
- CHECK(handles.size() >= 1); |
- NaClHandle irt_handle = nacl::ToNativeHandle(handles[handles.size() - 1]); |
+ CHECK(!handles.empty()); |
+ NaClHandle irt_handle = |
+ IPC::PlatformFileForTransitToPlatformFile(handles.back()); |
handles.pop_back(); |
#if defined(OS_WIN) |
@@ -380,7 +381,8 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) { |
} |
CHECK(handles.size() == 1); |
- args->imc_bootstrap_handle = nacl::ToNativeHandle(handles[0]); |
+ args->imc_bootstrap_handle = |
+ IPC::PlatformFileForTransitToPlatformFile(handles[0]); |
args->enable_debug_stub = params.enable_debug_stub; |
// Now configure parts that depend on process type. |
@@ -411,8 +413,9 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) { |
} |
#if defined(OS_LINUX) || defined(OS_MACOSX) |
- args->debug_stub_server_bound_socket_fd = nacl::ToNativeHandle( |
- params.debug_stub_server_bound_socket); |
+ args->debug_stub_server_bound_socket_fd = |
+ IPC::PlatformFileForTransitToPlatformFile( |
+ params.debug_stub_server_bound_socket); |
#endif |
#if defined(OS_WIN) |
args->broker_duplicate_handle_func = BrokerDuplicateHandle; |