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

Unified Diff: android_webview/crash_reporter/aw_microdump_crash_reporter.cc

Issue 2483203002: Always install the microdump signal handler on N+ devices. (Closed)
Patch Set: Created 4 years, 1 month 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 | base/android/build_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/crash_reporter/aw_microdump_crash_reporter.cc
diff --git a/android_webview/crash_reporter/aw_microdump_crash_reporter.cc b/android_webview/crash_reporter/aw_microdump_crash_reporter.cc
index 23e4bd938187c168e27915cc2bb36c03c22cfc44..f8138424080bc10b75c8a4ab5b00b440e5e0efc1 100644
--- a/android_webview/crash_reporter/aw_microdump_crash_reporter.cc
+++ b/android_webview/crash_reporter/aw_microdump_crash_reporter.cc
@@ -5,6 +5,7 @@
#include "android_webview/crash_reporter/aw_microdump_crash_reporter.h"
#include "android_webview/common/aw_version_info_values.h"
+#include "base/android/build_info.h"
#include "base/debug/dump_without_crashing.h"
#include "base/files/file_path.h"
#include "base/lazy_instance.h"
@@ -67,6 +68,14 @@ bool g_enabled = false;
#if defined(ARCH_CPU_X86_FAMILY)
bool SafeToUseSignalHandler() {
+ // N+ shared library namespacing means that we are unable to dlopen
+ // libnativebridge (because it isn't in the NDK). However we know
+ // that, were we able to, the tests below would pass, so just return
+ // true here.
+ if (base::android::BuildInfo::GetInstance()->sdk_int() >=
+ base::android::SDK_VERSION_NOUGAT) {
+ return true;
+ }
// On X86/64 there are binary translators that handle SIGSEGV in userspace and
// may get chained after our handler - see http://crbug.com/477444
// We attempt to detect this to work out when it's safe to install breakpad.
« no previous file with comments | « no previous file | base/android/build_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698