Make DUMP_WILL_BE_* fatal for non-official builds
This is a proxy for non-user-facing builds (testing, fuzzing). Any early detection for will-be-fatal invariant violations seems good at face value, let's try it out. Bug: None Change-Id: I46322b144d8e871bb4a83e9fe45f0958ebe97eee Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5783255 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Daniel Cheng <dcheng@chromium.org> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Auto-Submit: Peter Boström <pbos@chromium.org> Cr-Commit-Position: refs/heads/main@{#1341369}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
85a0bef092
commit
029ef5893a
@ -30,12 +30,13 @@ namespace logging {
|
||||
namespace {
|
||||
|
||||
LogSeverity GetDumpSeverity() {
|
||||
#if BUILDFLAG(USE_FUZZING_ENGINE)
|
||||
// Crash in fuzzing builds because non-fatal CHECKs will eventually be
|
||||
// migrated to fatal CHECKs.
|
||||
return LOGGING_FATAL;
|
||||
#else
|
||||
#if defined(OFFICIAL_BUILD)
|
||||
return DCHECK_IS_ON() ? LOGGING_DCHECK : LOGGING_ERROR;
|
||||
#else
|
||||
// Crash outside official builds (outside user-facing builds) to detect
|
||||
// invariant violations early in release-build testing like fuzzing, etc.
|
||||
// These should eventually be migrated to fatal CHECKs.
|
||||
return LOGGING_FATAL;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user