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

Unified Diff: base/logging.cc

Issue 2377963002: restore LOG_FATAL crash key on windows
Patch Set: review issues Created 4 years, 2 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 | « no previous file | blimp/engine/app/blimp_engine_crash_keys.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_,
« no previous file with comments | « no previous file | blimp/engine/app/blimp_engine_crash_keys.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698