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

Unified Diff: android_webview/lib/main/aw_main_delegate.cc

Issue 2552753002: Do not generate a microdump if there are no webview pointers on the stack. (Closed)
Patch Set: fix mipsel linker error Created 4 years 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/lib/main/aw_main_delegate.cc
diff --git a/android_webview/lib/main/aw_main_delegate.cc b/android_webview/lib/main/aw_main_delegate.cc
index 3c91dc748dbc69bab0fe1a56e7ea1f998f0b004f..457e91b795be7282625e19c178444a465e8e236c 100644
--- a/android_webview/lib/main/aw_main_delegate.cc
+++ b/android_webview/lib/main/aw_main_delegate.cc
@@ -46,6 +46,21 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/events/gesture_detection/gesture_configuration.h"
+// These declarations just provide the addresses determined by the
+// linker to this source file in order to determine the extent of the
+// webview text section. The declared types are irrelevant - only the
+// symbol names and the addresses they reference are important.
+extern "C" {
+#if defined(ARCH_CPU_MIPSEL)
+// the mipsel linker script invoked as a result of chromium link args
+// doesn't define __executable_start.
+extern char _ftext;
+#else
+extern char __executable_start;
+#endif
+extern char __etext;
+}
+
namespace android_webview {
namespace {
@@ -209,7 +224,15 @@ int AwMainDelegate::RunProcess(
// crash handler on the same thread as the crash handler was initialized.
crash_reporter::AddGpuFingerprintToMicrodumpCrashHandler(
content_client_.gpu_fingerprint());
-
+#if !defined(COMPONENT_BUILD)
+ crash_reporter::SetWebViewTextAddrRange(
+#if defined(ARCH_CPU_MIPSEL)
+ reinterpret_cast<uintptr_t>(&_ftext),
+#else
+ reinterpret_cast<uintptr_t>(&__executable_start),
+#endif
+ reinterpret_cast<uintptr_t>(&__etext));
+#endif
g_allow_wait_in_ui_thread.Get().reset(
new ScopedAllowWaitForLegacyWebViewApi);
« no previous file with comments | « android_webview/crash_reporter/aw_microdump_crash_reporter.cc ('k') | components/crash/content/app/breakpad_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698