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

Unified Diff: chrome/common/logging_chrome.cc

Issue 2638763004: Report CHECK/DCHECK to test launcher summary output. (Closed)
Patch Set: Fix error on ios. Created 3 years, 9 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: chrome/common/logging_chrome.cc
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index e9e51b130ea2b85aa63275000f81fbe022f939cd..01e1a9618fedec75883ac013d667c6ba6d0a8afb 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -69,6 +69,7 @@ namespace {
// When true, this means that error dialogs should not be shown.
bool dialogs_are_suppressed_ = false;
+logging::ScopedLogAssertHandler* assert_handler_ = nullptr;
// This should be true for exactly the period between the end of
// InitChromeLogging() and the beginning of CleanupChromeLogging().
@@ -92,7 +93,10 @@ const GUID kChromeTraceProviderName = {
// silenced. To record a new error, pass the log string associated
// with that error in the str parameter.
MSVC_DISABLE_OPTIMIZE();
-void SilentRuntimeAssertHandler(const std::string& str) {
+void SilentRuntimeAssertHandler(const char* file,
+ int line,
+ const base::StringPiece& message,
+ const base::StringPiece& stack_trace) {
base::debug::BreakDebugger();
}
MSVC_ENABLE_OPTIMIZE();
@@ -103,7 +107,8 @@ void SuppressDialogs() {
if (dialogs_are_suppressed_)
return;
- logging::SetLogAssertHandler(SilentRuntimeAssertHandler);
+ assert_handler_ = new logging::ScopedLogAssertHandler(
+ base::Bind(SilentRuntimeAssertHandler));
#if defined(OS_WIN)
UINT new_flags = SEM_FAILCRITICALERRORS |

Powered by Google App Engine
This is Rietveld 408576698