Index: tracing/tracing/value/ui/diagnostic_span.html |
diff --git a/tracing/tracing/value/ui/diagnostic_span.html b/tracing/tracing/value/ui/diagnostic_span.html |
index e0812f24b1c3236f4ea8aca972531474f8978b93..86c5547c99fa4ecfb60dd7fe3b137d9803c8ad89 100644 |
--- a/tracing/tracing/value/ui/diagnostic_span.html |
+++ b/tracing/tracing/value/ui/diagnostic_span.html |
@@ -61,14 +61,15 @@ tr.exportTo('tr.v.ui', function() { |
* Create a visualization for |diagnostic|. |
* |
* @param {!tr.v.d.Diagnostic} diagnostic |
- * @param {!tr.v.Histogram=} opt_histogram |
+ * @param {string} name |
+ * @param {!tr.v.Histogram} histogram |
* @return {Element} |
*/ |
- function createDiagnosticSpan(diagnostic, opt_histogram) { |
+ function createDiagnosticSpan(diagnostic, name, histogram) { |
const tagName = findElementNameForDiagnostic(diagnostic); |
const span = document.createElement(tagName); |
- span.histogram = opt_histogram; |
- span.diagnostic = diagnostic; |
+ if (span.build === undefined) throw new Error(tagName); |
+ span.build(diagnostic, name, histogram); |
return span; |
} |