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

Issue 6992006: Terminate plugin processes on a delayed task to allow the plugins to shutdown gracefully, i.e. NP... (Closed)

Created:
9 years, 7 months ago by ananta
Modified:
9 years, 6 months ago
Reviewers:
jam
CC:
chromium-reviews, jam, Jói
Visibility:
Public.

Description

Don't terminate plugin processes from the browser during browser shutdown. This is to allow the plugins to shutdown gracefully, i.e. NP_Shutdown gets called. To ensure that we handle the case of a hung plugin, we handle the OnChannelError notification in the IPC message filter implementation in the plugin process and post a delayed task to kill the process. Fixes bug http://code.google.com/p/chromium/issues/detail?id=48178 BUG=48178 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86517

Patch Set 1 #

Total comments: 1

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 13

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -1 line) Patch
M content/browser/browser_child_process_host.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/browser_child_process_host.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/child_process_launcher.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/child_process_launcher.cc View 1 2 3 5 chunks +19 lines, -1 line 0 comments Download
M content/browser/plugin_process_host.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M content/plugin/plugin_channel.cc View 1 2 3 2 chunks +19 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
ananta
9 years, 7 months ago (2011-05-23 21:52:57 UTC) #1
jam
http://codereview.chromium.org/6992006/diff/1/content/browser/child_process_launcher.cc File content/browser/child_process_launcher.cc (right): http://codereview.chromium.org/6992006/diff/1/content/browser/child_process_launcher.cc#newcode219 content/browser/child_process_launcher.cc:219: if (process_type_ == switches::kPluginProcess) { ChildProcessLauncher is the base ...
9 years, 7 months ago (2011-05-23 22:32:59 UTC) #2
jam
lgtm http://codereview.chromium.org/6992006/diff/12/content/browser/child_process_launcher.cc File content/browser/child_process_launcher.cc (right): http://codereview.chromium.org/6992006/diff/12/content/browser/child_process_launcher.cc#newcode92 content/browser/child_process_launcher.cc:92: // shutdown. Default behavior is to terminate the ...
9 years, 7 months ago (2011-05-24 20:46:13 UTC) #3
ananta
9 years, 7 months ago (2011-05-24 20:56:26 UTC) #4
http://codereview.chromium.org/6992006/diff/12/content/browser/child_process_...
File content/browser/child_process_launcher.cc (right):

http://codereview.chromium.org/6992006/diff/12/content/browser/child_process_...
content/browser/child_process_launcher.cc:92: // shutdown. Default behavior is
to terminate the child..
On 2011/05/24 20:46:13, John Abd-El-Malek wrote:
> nit: one period at end.  also, comments usually go by the variable, and simple
> setters/getters are left without a comment

Done.

http://codereview.chromium.org/6992006/diff/12/content/browser/child_process_...
content/browser/child_process_launcher.cc:220: if
(!terminate_child_on_shutdown_) {
On 2011/05/24 20:46:13, John Abd-El-Malek wrote:
> nit: this file doesn't use brace brackets for one line statements

Done.

http://codereview.chromium.org/6992006/diff/12/content/browser/child_process_...
content/browser/child_process_launcher.cc:220: if
(!terminate_child_on_shutdown_) {
On 2011/05/24 20:46:13, John Abd-El-Malek wrote:
> nit: this file doesn't use brace brackets for one line statements

Done.

http://codereview.chromium.org/6992006/diff/12/content/browser/child_process_...
content/browser/child_process_launcher.cc:351: if (context_) {
On 2011/05/24 20:46:13, John Abd-El-Malek wrote:
> ditto

Done.

http://codereview.chromium.org/6992006/diff/12/content/browser/plugin_process...
File content/browser/plugin_process_host.cc (right):

http://codereview.chromium.org/6992006/diff/12/content/browser/plugin_process...
content/browser/plugin_process_host.cc:224: SetTerminateChildOnShutdown(false);
On 2011/05/24 20:46:13, John Abd-El-Malek wrote:
> nit: please add a comment explaining why this is ok

Done.

http://codereview.chromium.org/6992006/diff/12/content/plugin/plugin_channel.cc
File content/plugin/plugin_channel.cc (right):

http://codereview.chromium.org/6992006/diff/12/content/plugin/plugin_channel....
content/plugin/plugin_channel.cc:97: 
On 2011/05/24 20:46:13, John Abd-El-Malek wrote:
> nit: extra line

Done.

http://codereview.chromium.org/6992006/diff/12/content/plugin/plugin_channel....
content/plugin/plugin_channel.cc:103: // Ensure that we don't wait indefinitely
for the plugin to shutdown.
On 2011/05/24 20:46:13, John Abd-El-Malek wrote:
> nit: can you please add just one extra line to say why we're doing this, since
> it may not be obvious to someone reading this.  i.e.
> 
> 
> // Ensure that we don't wait indefinitely for the plugin to shutdown, since
the
> browser doesn't kill plugin processes on shutdown to allow plugins to be
> gracefully shutdown.

Done.

Powered by Google App Engine
This is Rietveld 408576698