Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Issue 100222: POSIX: Don't allow onunload handlers to hang a renderer forever. (Closed)

Created:
11 years, 7 months ago by agl
Modified:
9 years, 7 months ago
Reviewers:
jam, Evan Stade
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

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.

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -0 lines) Patch
M chrome/common/ipc_channel_proxy.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/ipc_channel_proxy.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/renderer/render_thread.cc View 2 chunks +26 lines, -0 lines 1 comment Download

Messages

Total messages: 3 (0 generated)
agl
11 years, 7 months ago (2009-04-30 20:50:13 UTC) #1
Evan Stade
http://codereview.chromium.org/100222/diff/1/4 File chrome/renderer/render_thread.cc (right): http://codereview.chromium.org/100222/diff/1/4#newcode106 Line 106: class SuicideOnChannelErrorFilter : public IPC::ChannelProxy::MessageFilter { lol at ...
11 years, 7 months ago (2009-04-30 21:40:42 UTC) #2
jam
11 years, 7 months ago (2009-04-30 22:15:43 UTC) #3
lgtm

do you want to make that filter a member of RenderThread to avoid memory leak
warnings?

Powered by Google App Engine
This is Rietveld 408576698