diff options
author | mpearson <mpearson@chromium.org> | 2015-05-13 13:05:32 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-13 20:05:52 +0000 |
commit | 55b415e1407aa2fd0b7f095c9972c28fb053cb96 (patch) | |
tree | a6bff1816f4792eb678bac588474a19ebee4c066 | |
parent | d23fc1d01d40d1e8914905e3bd4d7fffca47749a (diff) | |
download | chromium_src-55b415e1407aa2fd0b7f095c9972c28fb053cb96.zip chromium_src-55b415e1407aa2fd0b7f095c9972c28fb053cb96.tar.gz chromium_src-55b415e1407aa2fd0b7f095c9972c28fb053cb96.tar.bz2 |
Omnibox - Log Addition Crash Data for Rare HQP Crash
In the days of yore, there was an HQP crash:
https://code.google.com/p/chromium/issues/detail?id=359270
I put a band-aid on the crash:
https://codereview.chromium.org/222783006
Later, I fixed the root cause:
https://codereview.chromium.org/255423002
Or at least I thought I did and close that days-of-yore bug.
Apparently this didn't entirely fix the problem. (See the linked bug
below.)
This change adds some information to the minidumps to allow me to
investigate what kinds of inputs are causing trouble.
BUG=464926
Review URL: https://codereview.chromium.org/1133533003
Cr-Commit-Position: refs/heads/master@{#329703}
-rw-r--r-- | chrome/browser/autocomplete/history_quick_provider.cc | 10 | ||||
-rw-r--r-- | chrome/common/crash_keys.cc | 3 | ||||
-rw-r--r-- | chrome/common/crash_keys.h | 3 |
3 files changed, 15 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/history_quick_provider.cc b/chrome/browser/autocomplete/history_quick_provider.cc index 68cd805..57c86ae 100644 --- a/chrome/browser/autocomplete/history_quick_provider.cc +++ b/chrome/browser/autocomplete/history_quick_provider.cc @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/command_line.h" +#include "base/debug/crash_logging.h" #include "base/i18n/break_iterator.h" #include "base/logging.h" #include "base/metrics/field_trial.h" @@ -26,6 +27,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/crash_keys.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #include "components/bookmarks/browser/bookmark_model.h" @@ -258,7 +260,13 @@ AutocompleteMatch HistoryQuickProvider::QuickMatchToACMatch( // Set |inline_autocompletion| and |allowed_to_be_default_match| if possible. if (history_match.can_inline) { - DCHECK(!new_matches.empty()); + base::debug::ScopedCrashKey crash_info( + crash_keys::kBug464926CrashKey, + info.url().spec().substr(0, 30) + " " + + base::UTF16ToUTF8(autocomplete_input_.text()).substr(0, 20) + " " + + base::SizeTToString(history_match.url_matches.size()) + " " + + base::SizeTToString(offsets.size()));; + CHECK(!new_matches.empty()); size_t inline_autocomplete_offset = new_matches[0].offset + new_matches[0].length; // |inline_autocomplete_offset| may be beyond the end of the diff --git a/chrome/common/crash_keys.cc b/chrome/common/crash_keys.cc index ceb9c01..a97cbad 100644 --- a/chrome/common/crash_keys.cc +++ b/chrome/common/crash_keys.cc @@ -128,6 +128,8 @@ const char kKaskoGuid[] = "kasko-guid"; const char kKaskoEquivalentGuid[] = "kasko-equivalent-guid"; #endif +const char kBug464926CrashKey[] = "bug-464926-info"; + size_t RegisterChromeCrashKeys() { // The following keys may be chunked by the underlying crash logging system, // but ultimately constitute a single key-value pair. @@ -189,6 +191,7 @@ size_t RegisterChromeCrashKeys() { { kKaskoGuid, kSmallSize }, { kKaskoEquivalentGuid, kSmallSize }, #endif + { kBug464926CrashKey, kSmallSize }, }; // This dynamic set of keys is used for sets of key value pairs when gathering diff --git a/chrome/common/crash_keys.h b/chrome/common/crash_keys.h index 3f40ff5..b751392 100644 --- a/chrome/common/crash_keys.h +++ b/chrome/common/crash_keys.h @@ -157,6 +157,9 @@ extern const char kKaskoGuid[]; extern const char kKaskoEquivalentGuid[]; #endif +// Used to help investigate bug 464926. +extern const char kBug464926CrashKey[]; + } // namespace crash_keys #endif // CHROME_COMMON_CRASH_KEYS_H_ |