Index: base/debug/stack_trace.cc |
diff --git a/base/debug/stack_trace.cc b/base/debug/stack_trace.cc |
index 7c44f7afeaef3f3ace0d3839c8dd51939ace635c..8a5505ab6ad6275935cfa649d3f944d90aca39a6 100644 |
--- a/base/debug/stack_trace.cc |
+++ b/base/debug/stack_trace.cc |
@@ -4,9 +4,19 @@ |
#include "base/debug/stack_trace.h" |
+#include <algorithm> |
+#include <string.h> |
+ |
namespace base { |
namespace debug { |
+StackTrace::StackTrace(const void* const* trace, int count) { |
+ count = std::min(count, kMaxTraces); |
Scott Hess - ex-Googler
2011/08/27 05:15:40
OK, so weird one ... on my 10.6 machine at work ru
Scott Hess - ex-Googler
2011/08/27 05:44:49
http://en.wikipedia.org/wiki/One_Definition_Rule#D
Mark Mentovai
2011/08/28 15:40:01
I know that you found an answer to your question,
Scott Hess - ex-Googler
2011/08/29 20:13:36
Unfortunately, the code still has to set |count_|
|
+ if (count) |
+ memcpy(trace_, trace, count * sizeof(trace[0])); |
+ count_ = count; |
+} |
+ |
StackTrace::~StackTrace() { |
} |