Commit 20c2ed10 authored by Jungshik Shin's avatar Jungshik Shin Committed by Commit Bot

Add a crash key to debug crash on iOS

Bug: 734093
Test: None
Change-Id: I49be629d3d0afe2e329fd4fada263d7746e23e5e
Reviewed-on: https://chromium-review.googlesource.com/892287Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533064}
parent c71a585c
......@@ -25,6 +25,7 @@
#include "third_party/icu/source/i18n/unicode/coll.h"
#if defined(OS_IOS)
#include "base/debug/crash_logging.h"
#include "base/ios/ios_util.h"
#endif
......@@ -154,6 +155,12 @@ std::string ICULocaleName(const std::string& locale_string) {
}
void SetICUDefaultLocale(const std::string& locale_string) {
#if defined(OS_IOS)
static base::debug::CrashKeyString* crash_key_locale =
base::debug::AllocateCrashKeyString("icu_locale_input",
base::debug::CrashKeySize::Size256);
base::debug::SetCrashKeyString(crash_key_locale, locale_string);
#endif
icu::Locale locale(ICULocaleName(locale_string).c_str());
UErrorCode error_code = U_ZERO_ERROR;
const char* lang = locale.getLanguage();
......
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