| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/common/crash_reporter/aw_microdump_crash_reporter.h" | 5 #include "android_webview/common/crash_reporter/aw_microdump_crash_reporter.h" |
| 6 | 6 |
| 7 #include "android_webview/common/aw_descriptors.h" | 7 #include "android_webview/common/aw_descriptors.h" |
| 8 #include "android_webview/common/aw_paths.h" | 8 #include "android_webview/common/aw_paths.h" |
| 9 #include "android_webview/common/aw_version_info_values.h" | 9 #include "android_webview/common/aw_version_info_values.h" |
| 10 #include "base/android/build_info.h" | 10 #include "base/android/build_info.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 LOG(WARNING) << "Can't use breakpad to handle WebView crashes"; | 142 LOG(WARNING) << "Can't use breakpad to handle WebView crashes"; |
| 143 return; | 143 return; |
| 144 } | 144 } |
| 145 #endif | 145 #endif |
| 146 | 146 |
| 147 AwCrashReporterClient* client = g_crash_reporter_client.Pointer(); | 147 AwCrashReporterClient* client = g_crash_reporter_client.Pointer(); |
| 148 if (process_type == switches::kRendererProcess && crash_signal_fd != -1) { | 148 if (process_type == switches::kRendererProcess && crash_signal_fd != -1) { |
| 149 client->set_crash_signal_fd(crash_signal_fd); | 149 client->set_crash_signal_fd(crash_signal_fd); |
| 150 } | 150 } |
| 151 ::crash_reporter::SetCrashReporterClient(client); | 151 ::crash_reporter::SetCrashReporterClient(client); |
| 152 breakpad::SetShouldSanitizeDumps(true); |
| 153 #if !defined(COMPONENT_BUILD) |
| 154 breakpad::SetSkipDumpIfPrincipalMappingNotReferenced( |
| 155 reinterpret_cast<uintptr_t>(&EnableCrashReporter)); |
| 156 #endif |
| 152 | 157 |
| 153 bool is_browser_process = | 158 bool is_browser_process = |
| 154 process_type.empty() || | 159 process_type.empty() || |
| 155 process_type == breakpad::kWebViewSingleProcessType || | 160 process_type == breakpad::kWebViewSingleProcessType || |
| 156 process_type == breakpad::kBrowserProcessType; | 161 process_type == breakpad::kBrowserProcessType; |
| 157 if (is_browser_process) { | 162 if (is_browser_process) { |
| 158 breakpad::InitCrashReporter(""); | 163 breakpad::InitCrashReporter(""); |
| 159 } else { | 164 } else { |
| 160 breakpad::InitNonBrowserCrashReporterForAndroid(process_type); | 165 breakpad::InitNonBrowserCrashReporterForAndroid(process_type); |
| 161 } | 166 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 178 bool IsCrashReporterEnabled() { | 183 bool IsCrashReporterEnabled() { |
| 179 return breakpad::IsCrashReporterEnabled(); | 184 return breakpad::IsCrashReporterEnabled(); |
| 180 } | 185 } |
| 181 | 186 |
| 182 void SuppressDumpGeneration() { | 187 void SuppressDumpGeneration() { |
| 183 breakpad::SuppressDumpGeneration(); | 188 breakpad::SuppressDumpGeneration(); |
| 184 } | 189 } |
| 185 | 190 |
| 186 } // namespace crash_reporter | 191 } // namespace crash_reporter |
| 187 } // namespace android_webview | 192 } // namespace android_webview |
| OLD | NEW |