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

Unified Diff: base/debug/stack_trace_win.cc

Issue 2632643004: Remove WTFReportAssertionFailure and WTFReportBacktrace. (Closed)
Patch Set: Address review comments 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
« no previous file with comments | « base/debug/stack_trace_unittest.cc ('k') | third_party/WebKit/Source/wtf/Assertions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/stack_trace_win.cc
diff --git a/base/debug/stack_trace_win.cc b/base/debug/stack_trace_win.cc
index 9369663b95a1ca02a9b9250802c3f95bd2485224..1d7c2b3c6ce2342c8e1b37d49b49368ca62d9462 100644
--- a/base/debug/stack_trace_win.cc
+++ b/base/debug/stack_trace_win.cc
@@ -8,6 +8,7 @@
#include <dbghelp.h>
#include <stddef.h>
+#include <algorithm>
#include <iostream>
#include <memory>
@@ -209,9 +210,11 @@ bool EnableInProcessStackDumping() {
#pragma optimize("", off)
#endif
-StackTrace::StackTrace() {
+StackTrace::StackTrace(size_t count) {
+ count = std::min(arraysize(trace_), count);
+
// When walking our own stack, use CaptureStackBackTrace().
- count_ = CaptureStackBackTrace(0, arraysize(trace_), trace_, NULL);
+ count_ = CaptureStackBackTrace(0, count, trace_, NULL);
}
#if defined(COMPILER_MSVC)
« no previous file with comments | « base/debug/stack_trace_unittest.cc ('k') | third_party/WebKit/Source/wtf/Assertions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698