Chromium Code Reviews| Index: android_webview/common/crash_reporter/aw_microdump_crash_reporter.cc |
| diff --git a/android_webview/common/crash_reporter/aw_microdump_crash_reporter.cc b/android_webview/common/crash_reporter/aw_microdump_crash_reporter.cc |
| index 3cf45d6bdcb69101d98746613194c90e6bc661b5..70bbdc7f2ea4f3f1fe04259e8b7b7560dce31bef 100644 |
| --- a/android_webview/common/crash_reporter/aw_microdump_crash_reporter.cc |
| +++ b/android_webview/common/crash_reporter/aw_microdump_crash_reporter.cc |
| @@ -156,20 +156,25 @@ void EnableCrashReporter(const std::string& process_type, int crash_signal_fd) { |
| client->set_crash_signal_fd(crash_signal_fd); |
| } |
| ::crash_reporter::SetCrashReporterClient(client); |
| - breakpad::SetShouldSanitizeDumps(true); |
| -#if !defined(COMPONENT_BUILD) |
| - breakpad::SetSkipDumpIfPrincipalMappingNotReferenced( |
| - reinterpret_cast<uintptr_t>(&EnableCrashReporter)); |
| -#endif |
| + breakpad::SanitizationInfo sanitizationInfo; |
|
Robert Sesek
2017/02/15 17:38:43
naming: sanitization_info
gsennton
2017/02/15 18:10:17
Done.
|
| + sanitizationInfo.should_sanitize_dumps = true; |
| +#if defined(COMPONENT_BUILD) |
| + sanitizationInfo.skip_dump_if_principal_mapping_not_referenced = false; |
| +#else |
| + sanitizationInfo.skip_dump_if_principal_mapping_not_referenced = true; |
| + sanitizationInfo.address_within_principal_mapping = |
| + reinterpret_cast<uintptr_t>(&EnableCrashReporter); |
| +#endif // defined(COMPONENT_BUILD) |
| bool is_browser_process = |
| process_type.empty() || |
| process_type == breakpad::kWebViewSingleProcessType || |
| process_type == breakpad::kBrowserProcessType; |
| if (is_browser_process) { |
| - breakpad::InitCrashReporter(""); |
| + breakpad::InitCrashReporter("", sanitizationInfo); |
| } else { |
| - breakpad::InitNonBrowserCrashReporterForAndroid(process_type); |
| + breakpad::InitNonBrowserCrashReporterForAndroid(process_type, |
| + sanitizationInfo); |
| } |
| g_enabled = true; |
| } |