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

Unified Diff: base/debug/stack_trace.cc

Issue 2632643004: Remove WTFReportAssertionFailure and WTFReportBacktrace. (Closed)
Patch Set: Add Truncate() helper Created 3 years, 11 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
Index: base/debug/stack_trace.cc
diff --git a/base/debug/stack_trace.cc b/base/debug/stack_trace.cc
index fb2f6b508f2e0e582299e4321c9b5ef117cd8e53..8092bbbb2c5448e0d628131613b16b810be642e2 100644
--- a/base/debug/stack_trace.cc
+++ b/base/debug/stack_trace.cc
@@ -199,7 +199,8 @@ StackTrace::StackTrace(const void* const* trace, size_t count) {
count_ = count;
}
-StackTrace::~StackTrace() {
+StackTrace StackTrace::Truncate(size_t max_entries) const {
+ return StackTrace(trace_, std::min(count_, max_entries));
}
const void *const *StackTrace::Addresses(size_t* count) const {

Powered by Google App Engine
This is Rietveld 408576698