Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: android_webview/common/crash_reporter/aw_microdump_crash_reporter.cc

Issue 2652133004: Sanitize mini- and microdumps for webview (Closed)
Patch Set: Address review comments. Also apply settings when g_breakpad is constructed. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/crash/content/app/breakpad_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 43fe8cd6480ad3693f853a54f0e22e7bafaf2aa2..d27c4465b3c3945c128bc6a7cd8f665b8255bf59 100644
--- a/android_webview/common/crash_reporter/aw_microdump_crash_reporter.cc
+++ b/android_webview/common/crash_reporter/aw_microdump_crash_reporter.cc
@@ -25,6 +25,10 @@ namespace crash_reporter {
namespace {
+#if !defined(COMPONENT_BUILD)
+void PrincipalMappingMarker() {}
+#endif
+
class AwCrashReporterClient : public ::crash_reporter::CrashReporterClient {
public:
AwCrashReporterClient()
@@ -149,6 +153,11 @@ 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>(&PrincipalMappingMarker));
Robert Sesek 2017/02/09 22:21:54 I'd still probably just use EnableCrashReporter.
Tobias Sargeant 2017/02/10 13:24:05 Done. Didn't also realise when moving the call to
+#endif
bool is_browser_process =
process_type.empty() ||
« no previous file with comments | « no previous file | components/crash/content/app/breakpad_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698