| Index: content/ppapi_plugin/ppapi_thread.cc
|
| diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
|
| index a32122dbfb6b779fc7a540ee6955488e57abb63c..3b8dd6aab464fec09b6d6375047eafb65a52707d 100644
|
| --- a/content/ppapi_plugin/ppapi_thread.cc
|
| +++ b/content/ppapi_plugin/ppapi_thread.cc
|
| @@ -490,9 +490,10 @@ bool PpapiThread::SetupChannel(base::ProcessId renderer_pid,
|
| IPC::ChannelHandle* handle) {
|
| DCHECK(is_broker_ == (connect_instance_func_ != NULL));
|
| IPC::ChannelHandle plugin_handle;
|
| - plugin_handle.name = IPC::Channel::GenerateVerifiedChannelID(
|
| + IPC::Channel::GenerateMojoChannelHandlePair(
|
| base::StringPrintf(
|
| - "%d.r%d", base::GetCurrentProcId(), renderer_child_id));
|
| + "plugin-%d.r%d", base::GetCurrentProcId(), renderer_child_id),
|
| + &plugin_handle, handle);
|
|
|
| ppapi::proxy::ProxyChannel* dispatcher = NULL;
|
| bool init_result = false;
|
| @@ -520,20 +521,11 @@ bool PpapiThread::SetupChannel(base::ProcessId renderer_pid,
|
| }
|
|
|
| if (!init_result) {
|
| + handle->mojo_handle.Close();
|
| delete dispatcher;
|
| return false;
|
| }
|
|
|
| - handle->name = plugin_handle.name;
|
| -#if defined(OS_POSIX)
|
| - // On POSIX, transfer ownership of the renderer-side (client) FD.
|
| - // This ensures this process will be notified when it is closed even if a
|
| - // connection is not established.
|
| - handle->socket = base::FileDescriptor(dispatcher->TakeRendererFD());
|
| - if (handle->socket.fd == -1)
|
| - return false;
|
| -#endif
|
| -
|
| // From here, the dispatcher will manage its own lifetime according to the
|
| // lifetime of the attached channel.
|
| return true;
|
|
|