diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-03 18:36:33 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-03 18:36:33 +0000 |
commit | 50cdead453a66955b443060b338c7232fe03fc34 (patch) | |
tree | 2671dc2884531f3a7b65442eea1eadd9c0a86005 /chrome/common/mac | |
parent | e0521140e09b03dca21735082e672e3bbaf908e8 (diff) | |
download | chromium_src-50cdead453a66955b443060b338c7232fe03fc34.zip chromium_src-50cdead453a66955b443060b338c7232fe03fc34.tar.gz chromium_src-50cdead453a66955b443060b338c7232fe03fc34.tar.bz2 |
Replace all uses of base/mac/crash_logging.h with base/debug/crash_logging.h.
This also centralizes most crash keys into a constants file.
BUG=77656
Review URL: https://codereview.chromium.org/11734011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174985 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/mac')
-rw-r--r-- | chrome/common/mac/objc_zombie.mm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/chrome/common/mac/objc_zombie.mm b/chrome/common/mac/objc_zombie.mm index 0f01a52..a0cd90e 100644 --- a/chrome/common/mac/objc_zombie.mm +++ b/chrome/common/mac/objc_zombie.mm @@ -11,14 +11,15 @@ #include <algorithm> +#include "base/debug/crash_logging.h" #include "base/debug/stack_trace.h" #include "base/lazy_instance.h" #include "base/logging.h" -#include "base/mac/crash_logging.h" +#include "base/stringprintf.h" #include "base/synchronization/lock.h" +#include "chrome/common/crash_keys.h" #import "chrome/common/mac/objc_method_swizzle.h" - #if !defined(OS_IOS) && (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_6) // Apparently objc/runtime.h doesn't define this with the 10.6 SDK yet. // The docs say it exists since 10.6 however. @@ -204,21 +205,20 @@ void ZombieObjectCrash(id object, SEL aSelector, SEL viaSelector) { } const char* wasaName = (wasa ? class_getName(wasa) : "<unknown>"); - NSString* aString = - [NSString stringWithFormat:@"Zombie <%s: %p> received -%s", - wasaName, object, sel_getName(aSelector)]; + std::string aString = base::StringPrintf("Zombie <%s: %p> received -%s", + wasaName, object, sel_getName(aSelector)); if (viaSelector != NULL) { const char* viaName = sel_getName(viaSelector); - aString = [aString stringByAppendingFormat:@" (via -%s)", viaName]; + base::StringAppendF(&aString, " (via -%s)", viaName); } // Set a value for breakpad to report. - base::mac::SetCrashKeyValue(@"zombie", aString); + base::debug::SetCrashKeyValue(crash_keys::mac::kZombie, aString); // Encode trace into a breakpad key. if (found) { - base::mac::SetCrashKeyFromAddresses( - @"zombie_dealloc_bt", record.trace, record.traceDepth); + base::debug::SetCrashKeyFromAddresses( + crash_keys::mac::kZombieTrace, record.trace, record.traceDepth); } // Log -dealloc backtrace in debug builds then crash with a useful @@ -228,7 +228,7 @@ void ZombieObjectCrash(id object, SEL aSelector, SEL viaSelector) { } else { DLOG(INFO) << "Unable to generate backtrace from -dealloc."; } - DLOG(FATAL) << [aString UTF8String]; + DLOG(FATAL) << aString; // This is how about:crash is implemented. Using instead of // |base::debug::BreakDebugger()| or |LOG(FATAL)| to make the top of |