From 8d460f9783d8dd4d92e67b8b709176f09422badb Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Wed, 8 Apr 2015 11:25:56 -0700 Subject: [PATCH] Bug 1151703 - Part 2: Show XML and HTML parsing markers in the performance tool; r=jsantell --- browser/devtools/shared/timeline/global.js | 10 ++++++++++ .../en-US/chrome/browser/devtools/timeline.properties | 2 ++ toolkit/devtools/server/actors/timeline.js | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/browser/devtools/shared/timeline/global.js b/browser/devtools/shared/timeline/global.js index 24f94a302e16..c1192ace0fee 100644 --- a/browser/devtools/shared/timeline/global.js +++ b/browser/devtools/shared/timeline/global.js @@ -53,6 +53,16 @@ const TIMELINE_BLUEPRINT = { colorName: "highlight-lightorange", label: L10N.getStr("timeline.label.javascript2") }, + "Parse HTML": { + group: 1, + colorName: "highlight-purple", + label: L10N.getStr("timeline.label.parseHTML") + }, + "Parse XML": { + group: 1, + colorName: "highlight-purple", + label: L10N.getStr("timeline.label.parseXML") + }, "ConsoleTime": { group: 2, colorName: "highlight-bluegrey", diff --git a/browser/locales/en-US/chrome/browser/devtools/timeline.properties b/browser/locales/en-US/chrome/browser/devtools/timeline.properties index ec3d0b61f458..bc6336a8bccd 100644 --- a/browser/locales/en-US/chrome/browser/devtools/timeline.properties +++ b/browser/locales/en-US/chrome/browser/devtools/timeline.properties @@ -40,6 +40,8 @@ timeline.label.styles2=Recalculate Style timeline.label.reflow2=Layout timeline.label.paint=Paint timeline.label.javascript2=Function Call +timeline.label.parseHTML=Parse HTML +timeline.label.parseXML=Parse XML timeline.label.domevent=DOM Event timeline.label.consoleTime=Console diff --git a/toolkit/devtools/server/actors/timeline.js b/toolkit/devtools/server/actors/timeline.js index ad9015095245..3d2cef62a2b3 100644 --- a/toolkit/devtools/server/actors/timeline.js +++ b/toolkit/devtools/server/actors/timeline.js @@ -184,7 +184,7 @@ let TimelineActor = exports.TimelineActor = protocol.ActorClass({ let markers = []; for (let docShell of this.docShells) { - markers = [...markers, ...docShell.popProfileTimelineMarkers()]; + markers.push(...docShell.popProfileTimelineMarkers()); } // The docshell may return markers with stack traces attached.