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

Unified Diff: tracing/tracing/metrics/metric_map_function.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase 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: tracing/tracing/metrics/metric_map_function.html
diff --git a/tracing/tracing/metrics/metric_map_function.html b/tracing/tracing/metrics/metric_map_function.html
index a4f10972021338995dade1d19d7067bd850cbee3..0095c5c43fd2548e50990db44ab09e2a509e638a 100644
--- a/tracing/tracing/metrics/metric_map_function.html
+++ b/tracing/tracing/metrics/metric_map_function.html
@@ -21,19 +21,22 @@ tr.exportTo('tr.metrics', function() {
* @return {!tr.v.HistogramSet}
*/
function runMetrics(model, options) {
- if (options === undefined)
+ if (options === undefined) {
throw new Error('Options are required.');
+ }
var metricNames = options.metrics;
- if (!metricNames)
+ if (!metricNames) {
throw new Error('Metric names should be specified.');
+ }
var histograms = new tr.v.HistogramSet();
for (var metricName of metricNames) {
var metric = tr.metrics.MetricRegistry.findTypeInfoWithName(metricName);
- if (metric === undefined)
+ if (metric === undefined) {
throw new Error('"' + metricName + '" is not a registered metric.');
+ }
metric.constructor(histograms, model, options);
}

Powered by Google App Engine
This is Rietveld 408576698