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

Unified Diff: tracing/tracing/value/ui/diagnostic_map_table.html

Issue 2258583003: Modernize DiagnosticMap to subclass ES6 Map. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: fix longTasksMetric and Composition Created 4 years, 4 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
« no previous file with comments | « tracing/tracing/value/histogram_test.html ('k') | tracing/tracing/value/ui/diagnostic_map_table_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/value/ui/diagnostic_map_table.html
diff --git a/tracing/tracing/value/ui/diagnostic_map_table.html b/tracing/tracing/value/ui/diagnostic_map_table.html
index 847c5437ef8b16ae9c47be773e85dee28b5701b1..dc8cdf7574294d94e948dbf9124f260b1084c4d1 100644
--- a/tracing/tracing/value/ui/diagnostic_map_table.html
+++ b/tracing/tracing/value/ui/diagnostic_map_table.html
@@ -45,11 +45,10 @@ found in the LICENSE file.
}
var columnTitles = new Set();
- for (var map of this.diagnosticMaps_) {
- map.forEach(function(name, diagnostic) {
+ for (var map of this.diagnosticMaps_)
+ for (var [name, diagnostic] of map)
columnTitles.add(name);
- });
- }
+
columnTitles = [...columnTitles].sort();
var columns = [];
@@ -61,9 +60,8 @@ found in the LICENSE file.
}
};
}
- for (var title of columnTitles) {
+ for (var title of columnTitles)
columns.push(makeColumn(title));
- }
this.$.table.tableColumns = columns;
this.$.table.tableRows = this.diagnosticMaps_;
« no previous file with comments | « tracing/tracing/value/histogram_test.html ('k') | tracing/tracing/value/ui/diagnostic_map_table_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698