summaryrefslogtreecommitdiffstats
path: root/chrome/plugin
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-15 17:36:33 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-15 17:36:33 +0000
commit4f15d284466def720aa90d4f745edfa9af378094 (patch)
treee30ce116b0c05d4adacf9fa5aae6188178b4a3a7 /chrome/plugin
parent351856ef135301f705435a8feecbc66ecfafbf77 (diff)
downloadchromium_src-4f15d284466def720aa90d4f745edfa9af378094.zip
chromium_src-4f15d284466def720aa90d4f745edfa9af378094.tar.gz
chromium_src-4f15d284466def720aa90d4f745edfa9af378094.tar.bz2
Implement basic crash detection and shutdown handling for out of process PPAPI
plugins. Currently when a crash is detected we just delete as much stuff as is convenient, clear the plugin's backing store, and continue running. It does not hook up a sad plugin page yet. This adds a "proxy" interface for the proxy to tell the PPAPI backend implementation in the renderer about proxy-related stuff (like the plugin crashing). This also implements keeping the process alive for a period of time so we can re-use the same process. Review URL: http://codereview.chromium.org/6493004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74965 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin')
-rw-r--r--chrome/plugin/plugin_channel.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/plugin/plugin_channel.cc b/chrome/plugin/plugin_channel.cc
index 205b3fa..ff817a7 100644
--- a/chrome/plugin/plugin_channel.cc
+++ b/chrome/plugin/plugin_channel.cc
@@ -23,6 +23,8 @@
#include "ipc/ipc_channel_posix.h"
#endif
+namespace {
+
class PluginReleaseTask : public Task {
public:
void Run() {
@@ -31,8 +33,9 @@ class PluginReleaseTask : public Task {
};
// How long we wait before releasing the plugin process.
-static const int kPluginReleaseTimeMS = 5 * 60 * 1000; // 5 minutes
+const int kPluginReleaseTimeMs = 5 * 60 * 1000; // 5 minutes
+} // namespace
// If a sync call to the renderer results in a modal dialog, we need to have a
// way to know so that we can run a nested message loop to simulate what would
@@ -133,7 +136,6 @@ class PluginChannel::MessageFilter : public IPC::ChannelProxy::MessageFilter {
IPC::Channel* channel_;
};
-
PluginChannel* PluginChannel::GetPluginChannel(int renderer_id,
MessageLoop* ipc_message_loop) {
// Map renderer ID to a (single) channel to that process.
@@ -176,7 +178,7 @@ PluginChannel::~PluginChannel() {
base::CloseProcessHandle(renderer_handle_);
MessageLoop::current()->PostDelayedTask(FROM_HERE, new PluginReleaseTask(),
- kPluginReleaseTimeMS);
+ kPluginReleaseTimeMs);
}
bool PluginChannel::Send(IPC::Message* msg) {