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..77185d0982a7734f7875caa6d933002dabda8093 100644 |
--- a/android_webview/browser/aw_browser_terminator.cc |
+++ b/android_webview/browser/aw_browser_terminator.cc |
@@ -67,9 +67,19 @@ 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) << "The event of render process has been killed wasn't" |
Torne
2017/01/31 11:56:41
not very clear wording; how about "Render process
michaelbai
2017/01/31 17:46:21
Done.
|
+ << " handled by all associated webviews, killing the" |
+ << " process."; |
+ kill(getpid(), SIGKILL); |
+ } |
} |
} |
} |