Commit 4f3db5b5 authored by thakis@chromium.org's avatar thakis@chromium.org

mac: Delete some pre-10.5 code.

BUG=none

Review URL: https://chromiumcodereview.appspot.com/10827175

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150171 0039d316-1c4b-4281-b951-d872f2087c98
parent 244a17d7
...@@ -148,22 +148,12 @@ bool GetBacktraceStrings(void *const *trace, int size, ...@@ -148,22 +148,12 @@ bool GetBacktraceStrings(void *const *trace, int size,
} // namespace } // namespace
StackTrace::StackTrace() { StackTrace::StackTrace() {
#if defined(OS_MACOSX) && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
if (backtrace == NULL) {
count_ = 0;
return;
}
#endif
// Though the backtrace API man page does not list any possible negative // Though the backtrace API man page does not list any possible negative
// return values, we take no chance. // return values, we take no chance.
count_ = std::max(backtrace(trace_, arraysize(trace_)), 0); count_ = std::max(backtrace(trace_, arraysize(trace_)), 0);
} }
void StackTrace::PrintBacktrace() const { void StackTrace::PrintBacktrace() const {
#if defined(OS_MACOSX) && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
if (backtrace_symbols_fd == NULL)
return;
#endif
fflush(stderr); fflush(stderr);
std::vector<std::string> trace_strings; std::vector<std::string> trace_strings;
GetBacktraceStrings(trace_, count_, &trace_strings, NULL); GetBacktraceStrings(trace_, count_, &trace_strings, NULL);
...@@ -173,10 +163,6 @@ void StackTrace::PrintBacktrace() const { ...@@ -173,10 +163,6 @@ void StackTrace::PrintBacktrace() const {
} }
void StackTrace::OutputToStream(std::ostream* os) const { void StackTrace::OutputToStream(std::ostream* os) const {
#if defined(OS_MACOSX) && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
if (backtrace_symbols == NULL)
return;
#endif
std::vector<std::string> trace_strings; std::vector<std::string> trace_strings;
std::string error_message; std::string error_message;
if (GetBacktraceStrings(trace_, count_, &trace_strings, &error_message)) { if (GetBacktraceStrings(trace_, count_, &trace_strings, &error_message)) {
......
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