Commit 860ba8be authored by Bruce Dawson's avatar Bruce Dawson Committed by Commit Bot

Exit ppapi processes with TerminateProcess

Using TerminateProcess to exit from utility processes has dropped the
crash rate significantly so it makes sense to apply the same recipe to
ppapi processes. Over 80% of utility and ppapi process crashes are
during shutdown so using TerminateProcess will get rid of most of the
crashes, thus making triage easier.

TerminateProcess is also faster.

Bug: 1024560
Change-Id: I214e0bdcaddfdac41a7d6f5dd2ff3a0e749871a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1972896Reviewed-by: default avatarKen Rockot <rockot@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726165}
parent bc7dc30e
...@@ -237,10 +237,10 @@ int main() { ...@@ -237,10 +237,10 @@ int main() {
loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded();
delete loader; delete loader;
// Process shutdown is hard and utility processes in particular have been // Process shutdown is hard and some process types have been crashing during
// crashing during shutdown. TerminateProcess is safer and faster. Other // shutdown. TerminateProcess is safer and faster.
// process types can be added as needed. if (process_type == switches::kUtilityProcess ||
if (process_type == switches::kUtilityProcess) { process_type == switches::kPpapiPluginProcess) {
TerminateProcess(GetCurrentProcess(), rc); TerminateProcess(GetCurrentProcess(), rc);
} }
return rc; return rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment