OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "android_webview/browser/aw_browser_terminator.h" | 5 #include "android_webview/browser/aw_browser_terminator.h" |
6 | 6 |
7 #include <unistd.h> | 7 #include <unistd.h> |
8 | 8 |
9 #include "android_webview/browser/aw_browser_process.h" | |
9 #include "android_webview/browser/aw_render_process_gone_delegate.h" | 10 #include "android_webview/browser/aw_render_process_gone_delegate.h" |
10 #include "android_webview/common/aw_descriptors.h" | 11 #include "android_webview/common/aw_descriptors.h" |
11 #include "android_webview/common/crash_reporter/aw_microdump_crash_reporter.h" | 12 #include "android_webview/common/crash_reporter/aw_microdump_crash_reporter.h" |
12 #include "base/bind.h" | 13 #include "base/bind.h" |
13 #include "base/logging.h" | 14 #include "base/logging.h" |
14 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
15 #include "base/sync_socket.h" | 16 #include "base/sync_socket.h" |
16 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
17 #include "content/public/browser/child_process_data.h" | 18 #include "content/public/browser/child_process_data.h" |
18 #include "content/public/browser/notification_service.h" | 19 #include "content/public/browser/notification_service.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 // The render process was most likely killed for OOM or switching | 79 // The render process was most likely killed for OOM or switching |
79 // WebView provider, to make WebView backward compatible, kills the | 80 // WebView provider, to make WebView backward compatible, kills the |
80 // browser process instead of triggering crash. | 81 // browser process instead of triggering crash. |
81 LOG(ERROR) << "Render process (" << child_process_pid << ") kill (OOM" | 82 LOG(ERROR) << "Render process (" << child_process_pid << ") kill (OOM" |
82 << " or update) wasn't handed by all associated webviews," | 83 << " or update) wasn't handed by all associated webviews," |
83 << " killing application."; | 84 << " killing application."; |
84 kill(getpid(), SIGKILL); | 85 kill(getpid(), SIGKILL); |
85 } | 86 } |
86 } | 87 } |
87 } | 88 } |
89 TriggerMinidumpUploading(); | |
gsennton
2017/04/20 20:37:06
Oooh, another question for Toby: is the minidump f
Tobias Sargeant
2017/04/21 16:18:04
breakpad::CrashDumpManager is registered prior to
gsennton
2017/04/24 12:39:54
Thanks, I added a comment about this :) (please le
| |
88 } | 90 } |
89 | 91 |
90 } // namespace | 92 } // namespace |
91 | 93 |
92 AwBrowserTerminator::AwBrowserTerminator() {} | 94 AwBrowserTerminator::AwBrowserTerminator() {} |
93 | 95 |
94 AwBrowserTerminator::~AwBrowserTerminator() {} | 96 AwBrowserTerminator::~AwBrowserTerminator() {} |
95 | 97 |
96 void AwBrowserTerminator::OnChildStart(int child_process_id, | 98 void AwBrowserTerminator::OnChildStart(int child_process_id, |
97 content::FileDescriptorInfo* mappings) { | 99 content::FileDescriptorInfo* mappings) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
154 return; | 156 return; |
155 OnRenderProcessGone(child_process_id); | 157 OnRenderProcessGone(child_process_id); |
156 DCHECK(pipe->handle() != base::SyncSocket::kInvalidHandle); | 158 DCHECK(pipe->handle() != base::SyncSocket::kInvalidHandle); |
157 BrowserThread::PostTask( | 159 BrowserThread::PostTask( |
158 BrowserThread::FILE, FROM_HERE, | 160 BrowserThread::FILE, FROM_HERE, |
159 base::Bind(&AwBrowserTerminator::ProcessTerminationStatus, | 161 base::Bind(&AwBrowserTerminator::ProcessTerminationStatus, |
160 child_process_id, pid, base::Passed(std::move(pipe)))); | 162 child_process_id, pid, base::Passed(std::move(pipe)))); |
161 } | 163 } |
162 | 164 |
163 } // namespace breakpad | 165 } // namespace breakpad |
OLD | NEW |