summaryrefslogtreecommitdiffstats
path: root/content/plugin
diff options
context:
space:
mode:
authornsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-25 00:19:40 +0000
committernsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-25 00:19:40 +0000
commit9e3df998ca7b1b1ea6d0d403d93b834bf847eb89 (patch)
tree1a492352381007493b0a28c47a1ce8878eb0dbae /content/plugin
parente7a811df79d970d7ccf17f5b8ae1980c57694521 (diff)
downloadchromium_src-9e3df998ca7b1b1ea6d0d403d93b834bf847eb89.zip
chromium_src-9e3df998ca7b1b1ea6d0d403d93b834bf847eb89.tar.gz
chromium_src-9e3df998ca7b1b1ea6d0d403d93b834bf847eb89.tar.bz2
Revert 86517 - Don't terminate plugin processes from the browser during browser shutdown. This is to allow the plugins to
shutdown gracefully, i.e. NP_Shutdown gets called. To ensure that we handle the case of a hung plugin, we handle the OnChannelError notification in the IPC message filter implementation in the plugin process and post a delayed task to kill the process. Fixes bug http://code.google.com/p/chromium/issues/detail?id=48178 BUG=48178 Review URL: http://codereview.chromium.org/6992006 TBR=ananta@chromium.org Review URL: http://codereview.chromium.org/7065048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/plugin')
-rw-r--r--content/plugin/plugin_channel.cc19
1 files changed, 0 insertions, 19 deletions
diff --git a/content/plugin/plugin_channel.cc b/content/plugin/plugin_channel.cc
index dd00a75..cd2e99f 100644
--- a/content/plugin/plugin_channel.cc
+++ b/content/plugin/plugin_channel.cc
@@ -32,19 +32,9 @@ class PluginReleaseTask : public Task {
}
};
-class PluginProcessExitTask : public Task {
- public:
- void Run() {
- base::KillProcess(base::GetCurrentProcessHandle(), 0, false);
- }
-};
-
// How long we wait before releasing the plugin process.
const int kPluginReleaseTimeMs = 5 * 60 * 1000; // 5 minutes
-// How long we wait before forcibly shutting down the process.
-const int kPluginProcessTerminateTimeoutMs = 3000;
-
} // namespace
// If a sync call to the renderer results in a modal dialog, we need to have a
@@ -98,15 +88,6 @@ class PluginChannel::MessageFilter : public IPC::ChannelProxy::MessageFilter {
private:
void OnFilterAdded(IPC::Channel* channel) { channel_ = channel; }
- virtual void OnChannelError() {
- // Ensure that we don't wait indefinitely for the plugin to shutdown.
- // as the browser does not terminate plugin processes on shutdown.
- // We achieve this by posting an exit process task on the IO thread.
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
- new PluginProcessExitTask(),
- kPluginProcessTerminateTimeoutMs);
- }
-
bool OnMessageReceived(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(PluginChannel::MessageFilter, message)
IPC_MESSAGE_HANDLER_DELAY_REPLY(PluginMsg_Init, OnInit)