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

Unified Diff: tracing/tracing/value/ui/value_set_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/ui/histogram_span_test.html ('k') | tracing/tracing/value/value_set.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/value/ui/value_set_table.html
diff --git a/tracing/tracing/value/ui/value_set_table.html b/tracing/tracing/value/ui/value_set_table.html
index 0fca1962820708989fec7958455d55a98f2f5783..f4d8639084bb8fa21141f17c096e21ca1e9df10a 100644
--- a/tracing/tracing/value/ui/value_set_table.html
+++ b/tracing/tracing/value/ui/value_set_table.html
@@ -297,25 +297,29 @@ tr.exportTo('tr.ui', function() {
},
addDiagnosticSubRows_: function(value, row, column) {
- value.diagnostics.forEach(function(name, diagnostic) {
+ for (var [name, diagnostic] of value.diagnostics) {
if (name === tr.v.SUMMARY_VALUE_MAP_DIAGNOSTIC_NAME)
- return;
+ continue;
// If a previous |value| had a diagnostic with the same name, then
// there is already a subRow that should contain this diagnostic.
+ var foundSubRow = false;
for (var subRow of row.subRows) {
if (subRow.name === name) {
+ foundSubRow = true;
subRow.columns[column] = diagnostic;
- return;
+ continue;
}
}
+ if (foundSubRow)
+ continue;
// This is the first time that a diagnostic with this name has been
// seen for Values whose name is |value.name|, so create a new subRow.
var subRow = {name: name, columns: {}};
subRow.columns[column] = diagnostic;
row.subRows.push(subRow);
- });
+ }
},
get values() {
« no previous file with comments | « tracing/tracing/value/ui/histogram_span_test.html ('k') | tracing/tracing/value/value_set.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698