From 35f94273bb8be817181135ea7aba8c009bfdbbc1 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Fri, 31 Mar 2017 14:32:40 -0700 Subject: [PATCH] Update components/profile/trace-dump.js to 6f7906 This updates the trace-dump.js file to https://github.com/fitzgen/servo-trace-dump/commit/6f790668140d44a8641e441d3ac0e64364b8c0ca: > commit 6f790668140d44a8641e441d3ac0e64364b8c0ca > Author: Nick Fitzgerald > Date: Fri Mar 31 14:26:31 2017 -0700 > > Update for new serde-json data format > > Not sure when this happened, but at some point enum variants without any tuple > struct members became simple strings. --- components/profile/trace-dump.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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);