| Index: components/nacl/browser/nacl_process_host.cc
|
| diff --git a/components/nacl/browser/nacl_process_host.cc b/components/nacl/browser/nacl_process_host.cc
|
| index 6bd813d5ff6fba643335b3962d3fe0819a687b19..2fec05a4fa5d44a481a651dda42b42bcca878c06 100644
|
| --- a/components/nacl/browser/nacl_process_host.cc
|
| +++ b/components/nacl/browser/nacl_process_host.cc
|
| @@ -782,8 +782,6 @@ void NaClProcessHost::OnPpapiChannelCreated(
|
| const IPC::ChannelHandle& channel_handle) {
|
| // Only renderer processes should create a channel.
|
| DCHECK(enable_ppapi_proxy());
|
| - // If the proxy channel is null, this must be the initial NaCl-Browser IPC
|
| - // channel.
|
| if (!ipc_proxy_channel_.get()) {
|
| DCHECK_EQ(PROCESS_TYPE_NACL_LOADER, process_->GetData().process_type);
|
|
|
| @@ -832,8 +830,16 @@ void NaClProcessHost::OnPpapiChannelCreated(
|
| args,
|
| SerializedHandle(SerializedHandle::CHANNEL_HANDLE,
|
| IPC::InvalidPlatformFileForTransit())));
|
| - } else if (reply_msg_) {
|
| - // Otherwise, this must be a renderer channel.
|
| + } else {
|
| + // Attempt to open more than 1 browser channel is not supported.
|
| + // Shut down the NaCl process.
|
| + process_->GetHost()->ForceShutdown();
|
| + }
|
| +}
|
| +
|
| +void NaClProcessHost::OnPpapiNaClChannelCreated(
|
| + const IPC::ChannelHandle& channel_handle) {
|
| + if (reply_msg_) {
|
| ReplyToRenderer(channel_handle);
|
| } else {
|
| // Attempt to open more than 1 renderer channel is not supported.
|
| @@ -847,8 +853,8 @@ bool NaClProcessHost::OnUntrustedMessageForwarded(const IPC::Message& msg) {
|
| // These messages come from untrusted code so should be handled with care.
|
| bool handled = true;
|
| IPC_BEGIN_MESSAGE_MAP(NaClProcessHost, msg)
|
| - IPC_MESSAGE_HANDLER(PpapiHostMsg_ChannelCreated,
|
| - OnPpapiChannelCreated)
|
| + IPC_MESSAGE_HANDLER(PpapiHostMsg_NaClChannelCreated,
|
| + OnPpapiNaClChannelCreated)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
| return handled;
|
|
|