Chromium Code Reviews| Index: base/logging.cc |
| diff --git a/base/logging.cc b/base/logging.cc |
| index 0771b47c182e5c18c868f1124a0784bf411d74a9..75d29f363f01c54b37e24ebf91cdce8d52089ef8 100644 |
| --- a/base/logging.cc |
| +++ b/base/logging.cc |
| @@ -53,9 +53,11 @@ typedef pthread_mutex_t* MutexHandle; |
| #include <ostream> |
| #include <string> |
| +#include "base/auto_reset.h" |
| #include "base/base_switches.h" |
| #include "base/command_line.h" |
| #include "base/debug/alias.h" |
| +#include "base/debug/crash_logging.h" |
| #include "base/debug/debugger.h" |
| #include "base/debug/stack_trace.h" |
| #include "base/posix/eintr_wrapper.h" |
| @@ -537,6 +539,14 @@ LogMessage::~LogMessage() { |
| stream_ << std::endl; |
| std::string str_newline(stream_.str()); |
| +// NaCl targets do not have base/debug/crash_logging.cc. |
| +#if !defined(OS_NACL) |
| + if (severity_ == LOG_FATAL) { |
|
dcheng
2016/10/06 08:52:40
This still needs to protect against reentrancy, un
rkuksin
2016/10/07 07:44:12
Done.
|
| + base::debug::SetCrashKeyValue( |
| + "LOG_FATAL", base::StringPiece(str_newline.c_str() + message_start_)); |
| + } |
| +#endif // !defined(OS_NACL) |
| + |
| // Give any log message handler first dibs on the message. |
| if (log_message_handler && |
| log_message_handler(severity_, file_, line_, |