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

Unified Diff: base/debug/stack_trace.cc

Issue 7766013: [Mac] Capture -dealloc backtrace to log with CrZombie messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mark's comments. Created 9 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 | « base/debug/stack_trace.h ('k') | chrome/browser/ui/cocoa/objc_zombie.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
}
« no previous file with comments | « base/debug/stack_trace.h ('k') | chrome/browser/ui/cocoa/objc_zombie.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698