| 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);
|
| + }
|
| }
|
| }
|
| }
|
|
|