From 412d1a272f9f7b68803ca5932e96049ae86171be Mon Sep 17 00:00:00 2001 From: mnaganov Date: Fri, 11 Dec 2015 11:12:49 -0800 Subject: [Android WebView] Update microdump generation for sandboxed renderers Now microdump handling has three modes depending on the process type: "webview" -- displays crash dialog, supports dump on demand; "" (browser) -- displays crash dialog, doesn't support dump on demand; "renderer" -- doesn't display crash dialog, no dump on demand. Dump on demand may be enabled later if we figure out how to do it properly for sandboxed renderers. Exported `InitMicrodumpCrashHandlerIfNecessary` as calling `InitNonBrowserCrashReporterForAndroid` for that purpose is misleading, and WebView doesn't need any of the functionality that it can enable. BUG=568825 Review URL: https://codereview.chromium.org/1518913002 Cr-Commit-Position: refs/heads/master@{#364766} --- android_webview/crash_reporter/aw_microdump_crash_reporter.cc | 5 ++--- android_webview/crash_reporter/aw_microdump_crash_reporter.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'android_webview/crash_reporter') diff --git a/android_webview/crash_reporter/aw_microdump_crash_reporter.cc b/android_webview/crash_reporter/aw_microdump_crash_reporter.cc index 165c4b3..aac36e8 100644 --- a/android_webview/crash_reporter/aw_microdump_crash_reporter.cc +++ b/android_webview/crash_reporter/aw_microdump_crash_reporter.cc @@ -109,7 +109,7 @@ bool SafeToUseSignalHandler() { } // namespace -void EnableMicrodumpCrashReporter() { +void EnableMicrodumpCrashReporter(const std::string& process_type) { if (g_enabled) { NOTREACHED() << "EnableMicrodumpCrashReporter called more than once"; return; @@ -124,8 +124,7 @@ void EnableMicrodumpCrashReporter() { ::crash_reporter::SetCrashReporterClient(g_crash_reporter_client.Pointer()); - // |process_type| is not really relevant here, as long as it not empty. - breakpad::InitNonBrowserCrashReporterForAndroid("webview" /* process_type */); + breakpad::InitMicrodumpCrashHandlerIfNecessary(process_type); g_enabled = true; } diff --git a/android_webview/crash_reporter/aw_microdump_crash_reporter.h b/android_webview/crash_reporter/aw_microdump_crash_reporter.h index 067363f..ae567a8 100644 --- a/android_webview/crash_reporter/aw_microdump_crash_reporter.h +++ b/android_webview/crash_reporter/aw_microdump_crash_reporter.h @@ -10,7 +10,7 @@ namespace android_webview { namespace crash_reporter { -void EnableMicrodumpCrashReporter(); +void EnableMicrodumpCrashReporter(const std::string& process_type); void AddGpuFingerprintToMicrodumpCrashHandler( const std::string& gpu_fingerprint); bool DumpWithoutCrashingToFd(int fd); -- cgit v1.1