summaryrefslogtreecommitdiffstats
path: root/chrome/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/plugin')
-rw-r--r--chrome/plugin/plugin_channel.cc1
-rw-r--r--chrome/plugin/plugin_channel_base.cc14
2 files changed, 14 insertions, 1 deletions
diff --git a/chrome/plugin/plugin_channel.cc b/chrome/plugin/plugin_channel.cc
index 7234e16..04d9afc 100644
--- a/chrome/plugin/plugin_channel.cc
+++ b/chrome/plugin/plugin_channel.cc
@@ -58,7 +58,6 @@ PluginChannel::~PluginChannel() {
if (renderer_handle_)
base::CloseProcessHandle(renderer_handle_);
#if defined(OS_POSIX)
- IPC::RemoveAndCloseChannelSocket(channel_name());
// If we still have the renderer FD, close it.
if (renderer_fd_ != -1) {
close(renderer_fd_);
diff --git a/chrome/plugin/plugin_channel_base.cc b/chrome/plugin/plugin_channel_base.cc
index 4ef42ae..73a32e6 100644
--- a/chrome/plugin/plugin_channel_base.cc
+++ b/chrome/plugin/plugin_channel_base.cc
@@ -8,6 +8,10 @@
#include "chrome/common/child_process.h"
#include "ipc/ipc_sync_message.h"
+#if defined(OS_POSIX)
+#include "ipc/ipc_channel_posix.h"
+#endif
+
typedef base::hash_map<std::string, scoped_refptr<PluginChannelBase> >
PluginChannelMap;
@@ -167,6 +171,11 @@ void PluginChannelBase::RemoveRoute(int route_id) {
PluginChannelMap::iterator iter = g_plugin_channels_.begin();
while (iter != g_plugin_channels_.end()) {
if (iter->second == this) {
+#if defined(OS_POSIX)
+ if (channel_valid()) {
+ IPC::RemoveAndCloseChannelSocket(channel_name());
+ }
+#endif
g_plugin_channels_.erase(iter);
return;
}
@@ -184,6 +193,11 @@ void PluginChannelBase::OnControlMessageReceived(const IPC::Message& msg) {
}
void PluginChannelBase::OnChannelError() {
+#if defined(OS_POSIX)
+ if (channel_valid()) {
+ IPC::RemoveAndCloseChannelSocket(channel_name());
+ }
+#endif
channel_valid_ = false;
}