Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(611)

Unified Diff: base/debug/stack_trace_posix.cc

Issue 10827175: mac: Delete some pre-10.5 code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/stack_trace_posix.cc
diff --git a/base/debug/stack_trace_posix.cc b/base/debug/stack_trace_posix.cc
index 163f471021dfa12cc3591773a55b89a0d235b63c..aef80b3c117006d94dfba05c8dbc807d8f8d0e04 100644
--- a/base/debug/stack_trace_posix.cc
+++ b/base/debug/stack_trace_posix.cc
@@ -148,22 +148,12 @@ bool GetBacktraceStrings(void *const *trace, int size,
} // namespace
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
// return values, we take no chance.
count_ = std::max(backtrace(trace_, arraysize(trace_)), 0);
}
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);
std::vector<std::string> trace_strings;
GetBacktraceStrings(trace_, count_, &trace_strings, NULL);
@@ -173,10 +163,6 @@ void StackTrace::PrintBacktrace() 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::string error_message;
if (GetBacktraceStrings(trace_, count_, &trace_strings, &error_message)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698