Disable histogram bad minimum warning (see https://crbug.com/1288842#c29)

This commit is contained in:
Marshall Greenblatt 2022-02-22 18:56:09 -05:00
parent f97f0bbda6
commit d24ea7572f
2 changed files with 20 additions and 0 deletions

View File

@ -544,5 +544,11 @@ patches = [
# Fix missing lock.h include causing build failure with Windows sandbox.
# https://chromium-review.googlesource.com/c/chromium/src/+/3479396
'name': 'base_debug_3479396',
},
{
# Disable the "Histogram: <name> has bad minimum: 0" warning which is
# spamming the debug log.
# https://bugs.chromium.org/p/chromium/issues/detail?id=1288842#c29
'name': 'base_metrics_1288842',
}
]

View File

@ -0,0 +1,14 @@
diff --git base/metrics/histogram.cc base/metrics/histogram.cc
index aa8973128e806..884723c48c552 100644
--- base/metrics/histogram.cc
+++ base/metrics/histogram.cc
@@ -442,7 +442,8 @@ bool Histogram::InspectConstructionArguments(StringPiece name,
// Defensive code for backward compatibility.
if (*minimum < 1) {
- DLOG(ERROR) << "Histogram: " << name << " has bad minimum: " << *minimum;
+ // TODO(crbug.com/1288842): Temporarily disabled during cleanup.
+ // DLOG(ERROR) << "Histogram: " << name << " has bad minimum: " << *minimum;
*minimum = 1;
if (*maximum < 1)
*maximum = 1;