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

Unified Diff: android_webview/browser/aw_browser_terminator.cc

Issue 2662143002: Kill the app when render process is killed (Closed)
Patch Set: change log Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/aw_browser_terminator.cc
diff --git a/android_webview/browser/aw_browser_terminator.cc b/android_webview/browser/aw_browser_terminator.cc
index 34052e0a0994061b923adf220440b694cdf84f89..d34f5f24f9149239cdeb54b511cc8a176b702de0 100644
--- a/android_webview/browser/aw_browser_terminator.cc
+++ b/android_webview/browser/aw_browser_terminator.cc
@@ -67,9 +67,18 @@ void OnRenderProcessGoneDetail(int child_process_id, bool crashed) {
GetAwRenderProcessGoneDelegatesForRenderProcess(child_process_id, &delegates);
for (auto delegate : delegates) {
if (!delegate->OnRenderProcessGoneDetail(child_process_id, crashed)) {
- // Keeps this log unchanged, CTS test uses it to detect crash.
- LOG(FATAL) << "Render process's abnormal termination wasn't handled by"
- << " all associated webviews, triggering application crash";
+ if (crashed) {
+ // Keeps this log unchanged, CTS test uses it to detect crash.
+ LOG(FATAL) << "Render process's crash wasn't handled by all associated"
+ << " webviews, triggering application crash";
+ } else {
+ // The render process was most likely killed for OOM or switching
+ // WebView provider, to make WebView backward compatible, kills the
+ // browser process instead of triggering crash.
+ LOG(ERROR) << "Render process kill (OOM or update) wasn't handed by"
+ << " all associated webviews, killing application.";
+ kill(getpid(), SIGKILL);
+ }
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698