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

Unified Diff: android_webview/native/aw_debug.cc

Issue 2717223003: Add WebView-specific whitelist for crash keys. (Closed)
Patch Set: 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
Index: android_webview/native/aw_debug.cc
diff --git a/android_webview/native/aw_debug.cc b/android_webview/native/aw_debug.cc
index b7d83b6fb28aa218eebe252ccf74965fb6d20725..e989f3205bcc4b9eed80f18046699c9671b490aa 100644
--- a/android_webview/native/aw_debug.cc
+++ b/android_webview/native/aw_debug.cc
@@ -7,10 +7,12 @@
#include "android_webview/common/crash_reporter/aw_microdump_crash_reporter.h"
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
+#include "base/debug/crash_logging.h"
#include "base/debug/dump_without_crashing.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/threading/thread_restrictions.h"
+#include "components/crash/content/app/breakpad_linux.h"
#include "jni/AwDebug_jni.h"
using base::android::ConvertJavaStringToUTF16;
@@ -23,6 +25,11 @@ namespace android_webview {
static jboolean DumpWithoutCrashing(JNIEnv* env,
const JavaParamRef<jclass>& clazz,
const JavaParamRef<jstring>& dump_path) {
+ // TODO InitCrashReporter must be called from the right thread.
+ // breakpad::InitCrashReporter("");
+ // TODO add a jni-method that SetCrashKeyValue (so we can call it from
+ // AwDebugtest).
+ base::debug::SetCrashKeyValue("AW_DEBUG_KEY", "AW_DEBUG_VALUE");
// This may be called from any thread, and we might be in a state
// where it is impossible to post tasks, so we have to be prepared
// to do IO from this thread.

Powered by Google App Engine
This is Rietveld 408576698