Bug 1508281 - Don't reformat long static_assert r=chutten
authorJan-Erik Rediger <jrediger@mozilla.com>
Thu, 29 Nov 2018 15:41:01 +0000
changeset 505180 15fb49ca9d9f1a37dfffa9af03535c40f9a4c7e0
parent 505179 f56dfb58f1c9a0e632df1448eb46f5bf30a2c70b
child 505181 5e4a5cf81c26fc19a52f9e39e42f0f2470d80774
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschutten
bugs1508281
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508281 - Don't reformat long static_assert r=chutten Differential Revision: https://phabricator.services.mozilla.com/D13413
toolkit/components/telemetry/core/TelemetryHistogram.cpp
--- a/toolkit/components/telemetry/core/TelemetryHistogram.cpp
+++ b/toolkit/components/telemetry/core/TelemetryHistogram.cpp
@@ -2395,36 +2395,38 @@ void TelemetryHistogram::InitializeGloba
 
   if (XRE_IsParentProcess()) {
     gHistogramStorage =
       new Histogram*[HistogramCount * size_t(ProcessID::Count)] {};
     gKeyedHistogramStorage =
       new KeyedHistogram*[HistogramCount * size_t(ProcessID::Count)] {};
   }
 
-    // Some Telemetry histograms depend on the value of C++ constants and hardcode
-    // their values in Histograms.json.
-    // We add static asserts here for those values to match so that future changes
-    // don't go unnoticed.
-    static_assert((JS::gcreason::NUM_TELEMETRY_REASONS + 1) ==
-                        gHistogramInfos[mozilla::Telemetry::GC_MINOR_REASON].bucketCount &&
-                  (JS::gcreason::NUM_TELEMETRY_REASONS + 1) ==
-                        gHistogramInfos[mozilla::Telemetry::GC_MINOR_REASON_LONG].bucketCount &&
-                  (JS::gcreason::NUM_TELEMETRY_REASONS + 1) ==
-                        gHistogramInfos[mozilla::Telemetry::GC_REASON_2].bucketCount,
-                  "NUM_TELEMETRY_REASONS is assumed to be a fixed value in Histograms.json."
-                  " If this was an intentional change, update the n_values for the "
-                  "following in Histograms.json: GC_MINOR_REASON, GC_MINOR_REASON_LONG, "
-                  "GC_REASON_2");
-
-    static_assert((mozilla::StartupTimeline::MAX_EVENT_ID + 1) ==
-                        gHistogramInfos[mozilla::Telemetry::STARTUP_MEASUREMENT_ERRORS].bucketCount,
-                  "MAX_EVENT_ID is assumed to be a fixed value in Histograms.json.  If this"
-                  " was an intentional change, update the n_values for the following in "
-                  "Histograms.json: STARTUP_MEASUREMENT_ERRORS");
+  // Some Telemetry histograms depend on the value of C++ constants and hardcode
+  // their values in Histograms.json.
+  // We add static asserts here for those values to match so that future changes
+  // don't go unnoticed.
+  // clang-format off
+  static_assert((JS::gcreason::NUM_TELEMETRY_REASONS + 1) ==
+      gHistogramInfos[mozilla::Telemetry::GC_MINOR_REASON].bucketCount &&
+      (JS::gcreason::NUM_TELEMETRY_REASONS + 1) ==
+      gHistogramInfos[mozilla::Telemetry::GC_MINOR_REASON_LONG].bucketCount &&
+      (JS::gcreason::NUM_TELEMETRY_REASONS + 1) ==
+      gHistogramInfos[mozilla::Telemetry::GC_REASON_2].bucketCount,
+      "NUM_TELEMETRY_REASONS is assumed to be a fixed value in Histograms.json."
+      " If this was an intentional change, update the n_values for the "
+      "following in Histograms.json: GC_MINOR_REASON, GC_MINOR_REASON_LONG, "
+      "GC_REASON_2");
+
+  static_assert((mozilla::StartupTimeline::MAX_EVENT_ID + 1) ==
+      gHistogramInfos[mozilla::Telemetry::STARTUP_MEASUREMENT_ERRORS].bucketCount,
+      "MAX_EVENT_ID is assumed to be a fixed value in Histograms.json.  If this"
+      " was an intentional change, update the n_values for the following in "
+      "Histograms.json: STARTUP_MEASUREMENT_ERRORS");
+  // clang-format on
 
   gInitDone = true;
 }
 
 void TelemetryHistogram::DeInitializeGlobalState()
 {
   StaticMutexAutoLock locker(gTelemetryHistogramMutex);
   gCanRecordBase = false;