diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-01 00:29:29 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-01 00:29:29 +0000 |
commit | 36ecd4c22166a82091e86b6a295f86225fd022e0 (patch) | |
tree | 436c93fe646533483990be14dc4f802cd53c7309 /chrome/common/ipc_channel_proxy.cc | |
parent | 19063d3d42bedf9be6197ec575ece628129afc64 (diff) | |
download | chromium_src-36ecd4c22166a82091e86b6a295f86225fd022e0.zip chromium_src-36ecd4c22166a82091e86b6a295f86225fd022e0.tar.gz chromium_src-36ecd4c22166a82091e86b6a295f86225fd022e0.tar.bz2 |
POSIX: Don't allow onunload handlers to hang a renderer forever.
On POSIX 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 processes (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.
On Windows we don't have this issue because all the processes are in a
job so when the parent dies, all the children are killed too.
http://codereview.chromium.org/100222
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15025 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/ipc_channel_proxy.cc')
-rw-r--r-- | chrome/common/ipc_channel_proxy.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/common/ipc_channel_proxy.cc b/chrome/common/ipc_channel_proxy.cc index 47aa89b..c43f01f 100644 --- a/chrome/common/ipc_channel_proxy.cc +++ b/chrome/common/ipc_channel_proxy.cc @@ -81,6 +81,9 @@ void ChannelProxy::Context::OnChannelConnected(int32 peer_pid) { // Called on the IPC::Channel thread void ChannelProxy::Context::OnChannelError() { + for (size_t i = 0; i < filters_.size(); ++i) + filters_[i]->OnChannelError(); + // See above comment about using listener_message_loop_ here. listener_message_loop_->PostTask(FROM_HERE, NewRunnableMethod( this, &Context::OnDispatchError)); |