Commit e0c0304e authored by Sam McNally's avatar Sam McNally Committed by Commit Bot

Remove the NoOpListener created in PPBNaClPrivate::LaunchSelLdr().

IPC::SyncChannel is happy without a Listener so pass nullptr instead of
leaking a NoOpListener.

Bug: 788671
Change-Id: I492b52ed6b1a7a1c19b31df1fa1754c841d09e92
Reviewed-on: https://chromium-review.googlesource.com/1056751Reviewed-by: default avatarBill Budge <bbudge@chromium.org>
Commit-Queue: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558559}
parent f715bd6e
...@@ -386,16 +386,6 @@ NaClAppProcessType PP_ToNaClAppProcessType( ...@@ -386,16 +386,6 @@ NaClAppProcessType PP_ToNaClAppProcessType(
return static_cast<NaClAppProcessType>(pp_process_type); return static_cast<NaClAppProcessType>(pp_process_type);
} }
// A dummy IPC::Listener object with a no-op message handler. We use
// this with an IPC::SyncChannel where we only send synchronous
// messages and don't need to handle any messages other than sync
// replies.
class NoOpListener : public IPC::Listener {
public:
bool OnMessageReceived(const IPC::Message& message) override { return false; }
void OnChannelError() override {}
};
} // namespace } // namespace
// Launch NaCl's sel_ldr process. // Launch NaCl's sel_ldr process.
...@@ -525,7 +515,8 @@ void PPBNaClPrivate::LaunchSelLdr( ...@@ -525,7 +515,8 @@ void PPBNaClPrivate::LaunchSelLdr(
// translator process. // translator process.
*translator_channel = IPC::SyncChannel::Create( *translator_channel = IPC::SyncChannel::Create(
instance_info.channel_handle, IPC::Channel::MODE_CLIENT, instance_info.channel_handle, IPC::Channel::MODE_CLIENT,
new NoOpListener, content::RenderThread::Get()->GetIOTaskRunner(), /* listener = */ nullptr,
content::RenderThread::Get()->GetIOTaskRunner(),
base::ThreadTaskRunnerHandle::Get(), true, base::ThreadTaskRunnerHandle::Get(), true,
content::RenderThread::Get()->GetShutdownEvent()); content::RenderThread::Get()->GetShutdownEvent());
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment