diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-01 20:56:41 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-01 20:56:41 +0000 |
commit | 912445b6db66140aecb3bc822075a6e9bb9d7e33 (patch) | |
tree | 03494f511cbe131db3862fedd9e0158ae8e9ce9a /chrome/renderer/render_thread.cc | |
parent | 8321a3750c190dc9eeaf75d1bfff9269e8b1846c (diff) | |
download | chromium_src-912445b6db66140aecb3bc822075a6e9bb9d7e33.zip chromium_src-912445b6db66140aecb3bc822075a6e9bb9d7e33.tar.gz chromium_src-912445b6db66140aecb3bc822075a6e9bb9d7e33.tar.bz2 |
Revert "POSIX: Don't allow onunload handlers to hang a renderer forever."
This reverts commit r15025. Calling exit() on another thread meant
V8's destructor functions got called while another thread was still in
V8.
I might not have a better plan, but it's making a mess of the valgrind
builders so I'm reverting for now with an eye to landing again next
week.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15095 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_thread.cc')
-rw-r--r-- | chrome/renderer/render_thread.cc | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc index 5b4dac1..26836ca 100644 --- a/chrome/renderer/render_thread.cc +++ b/chrome/renderer/render_thread.cc @@ -103,28 +103,6 @@ static WebAppCacheContext* CreateAppCacheContextForRenderer() { return new AppCacheContextImpl(RenderThread::current()); } -#if defined(OS_POSIX) -class SuicideOnChannelErrorFilter : public IPC::ChannelProxy::MessageFilter { - void OnChannelError() { - // 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. - exit(0); - } -}; -#endif - void RenderThread::Init() { #if defined(OS_WIN) // If you are running plugins in this thread you need COM active but in @@ -146,11 +124,6 @@ void RenderThread::Init() { WebAppCacheContext::SetFactory(CreateAppCacheContextForRenderer); devtools_agent_filter_ = new DevToolsAgentFilter(); AddFilter(devtools_agent_filter_.get()); - -#if defined(OS_POSIX) - suicide_on_channel_error_filter_ = new SuicideOnChannelErrorFilter; - AddFilter(suicide_on_channel_error_filter_.get()); -#endif } void RenderThread::CleanUp() { |