summaryrefslogtreecommitdiffstats
path: root/content/renderer/renderer_main.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-30 21:00:43 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-30 21:00:43 +0000
commit719a2059c71f84a883a73b4529c420761baf1a7c (patch)
tree82a8dfbe5128d84323e4105f4cc3e677c2d74181 /content/renderer/renderer_main.cc
parentfc4f4dd485275e55b768c4deb9a253d17aeb7806 (diff)
downloadchromium_src-719a2059c71f84a883a73b4529c420761baf1a7c.zip
chromium_src-719a2059c71f84a883a73b4529c420761baf1a7c.tar.gz
chromium_src-719a2059c71f84a883a73b4529c420761baf1a7c.tar.bz2
On Posix, make all child processes quit when the browser dies, not just the renderers.
On bots, seeing that sometimes child processes are hanging around after the browser process is gone. This confuses the sharding scripts. BUG=90448 Review URL: https://chromiumcodereview.appspot.com/10834068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149023 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/renderer_main.cc')
-rw-r--r--content/renderer/renderer_main.cc43
1 files changed, 0 insertions, 43 deletions
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc
index 910e14e..5618ada 100644
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -70,45 +70,6 @@ void InstallFrameworkHacks() {
#endif // OS_MACOSX
-#if defined(OS_POSIX)
-
-class SuicideOnChannelErrorFilter : public IPC::ChannelProxy::MessageFilter {
- public:
- // IPC::ChannelProxy::MessageFilter
- virtual void OnChannelError() OVERRIDE {
- // On POSIX, at least, one can install an unload handler which loops
- // forever and leave behind a renderer process which eats 100% CPU forever.
- //
- // This is because the terminate signals (ViewMsg_ShouldClose and the error
- // from the IPC channel) are routed to the main message loop but never
- // processed (because that message loop is stuck in V8).
- //
- // One could make the browser SIGKILL the renderers, but that leaves open a
- // large window where a browser failure (or a user, manually terminating
- // the browser because "it's stuck") will leave behind a process eating all
- // the CPU.
- //
- // So, we install a filter on the channel so that we can process this event
- // here and kill the process.
- //
- // We want to kill this process after giving it 30 seconds to run the exit
- // handlers. SIGALRM has a default disposition of terminating the
- // application.
-#if defined(OS_POSIX)
- if (CommandLine::ForCurrentProcess()->
- HasSwitch(switches::kRendererCleanExit))
- alarm(30);
- else
-#endif
- _exit(0);
- }
-
- protected:
- virtual ~SuicideOnChannelErrorFilter() {}
-};
-
-#endif // OS(POSIX)
-
} // namespace
// This function provides some ways to test crash and assertion handling
@@ -246,10 +207,6 @@ int RendererMain(const content::MainFunctionParams& parameters) {
new RenderThreadImpl();
#endif
-#if defined(OS_POSIX)
- RenderThreadImpl::current()->AddFilter(new SuicideOnChannelErrorFilter());
-#endif
-
platform.RunSandboxTests();
startup_timer.Stop(); // End of Startup Time Measurement.