Index: base/debug/stack_trace_win.cc |
diff --git a/base/debug/stack_trace_win.cc b/base/debug/stack_trace_win.cc |
index 33329792a07912e14c87ab31eb47752f9f0f0b50..f069b702e66a6f565a78ea745e69d868d8ad5435 100644 |
--- a/base/debug/stack_trace_win.cc |
+++ b/base/debug/stack_trace_win.cc |
@@ -23,7 +23,7 @@ namespace { |
// of functions. The Sym* family of functions may only be invoked by one |
// thread at a time. SymbolContext code may access a symbol server over the |
// network while holding the lock for this singleton. In the case of high |
-// latency, this code will adversly affect performance. |
+// latency, this code will adversely affect performance. |
// |
// There is also a known issue where this backtrace code can interact |
// badly with breakpad if breakpad is invoked in a separate thread while |
@@ -57,7 +57,7 @@ class SymbolContext { |
// LOG(FATAL) here because this code is called might be triggered by a |
// LOG(FATAL) itself. |
void OutputTraceToStream(const void* const* trace, |
- int count, |
+ size_t count, |
std::ostream* os) { |
base::AutoLock lock(lock_); |
@@ -95,7 +95,7 @@ class SymbolContext { |
(*os) << symbol->Name << " [0x" << trace[i] << "+" |
<< sym_displacement << "]"; |
} else { |
- // If there is no symbol informtion, add a spacer. |
+ // If there is no symbol information, add a spacer. |
(*os) << "(No symbol) [0x" << trace[i] << "]"; |
} |
if (has_line) { |
@@ -185,6 +185,9 @@ StackTrace::StackTrace(EXCEPTION_POINTERS* exception_pointers) { |
count_ < arraysize(trace_)) { |
trace_[count_++] = reinterpret_cast<void*>(stack_frame.AddrPC.Offset); |
} |
+ |
+ for (size_t i = count_; i < arraysize(trace_); ++i) |
brettw
2012/07/25 17:37:26
I'd probably use kMacTrace here instead (since you
James Hawkins
2012/07/25 18:58:09
OK. I actually searched for arraysize to get back
|
+ trace_[i] = NULL; |
} |
void StackTrace::PrintBacktrace() const { |