Commit 55b415e1 authored by mpearson's avatar mpearson Committed by Commit bot

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}
parent d23fc1d0
......@@ -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
......
......@@ -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
......
......@@ -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_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment