diff --git a/components/profile/trace-dump.js b/components/profile/trace-dump.js index d6f1c570e94..93a7c3dff60 100644 --- a/components/profile/trace-dump.js +++ b/components/profile/trace-dump.js @@ -244,11 +244,6 @@ Make sure to upstream changes, or they will get lost! return increment; }; - // Get the category name for the given trace. - const traceCategory = exports.traceCategory = trace => { - return Object.keys(trace.category)[0]; - }; - /*** Window Specific Code ***************************************************/ if (!window) { @@ -528,7 +523,7 @@ Make sure to upstream changes, or they will get lost! inner.style.width = state.nsToSelectionPx(trace.endTime - trace.startTime) + "px"; inner.style.marginLeft = state.nsToSelectionPx(trace.startTime - state.startSelection) + "px"; - let category = traceCategory(trace); + let category = trace.category; inner.textContent = category; inner.style.backgroundColor = state.getColorForCategory(category);