summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorcaseq <caseq@chromium.org>2015-11-02 19:20:22 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-03 03:20:59 +0000
commit497461fa4b777712656dc6b3ba5b133b36e00693 (patch)
tree14c5042608cc3095880f870d75afcc2c48f60ba8 /third_party
parent35f6d1912e47787a0e62f2bcaf7b9d9f67b5ed34 (diff)
downloadchromium_src-497461fa4b777712656dc6b3ba5b133b36e00693.zip
chromium_src-497461fa4b777712656dc6b3ba5b133b36e00693.tar.gz
chromium_src-497461fa4b777712656dc6b3ba5b133b36e00693.tar.bz2
Timeline: fix datagrid node data construction
BUG= Review URL: https://codereview.chromium.org/1407953010 Cr-Commit-Position: refs/heads/master@{#357522}
Diffstat (limited to 'third_party')
-rw-r--r--third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js
index e04c917..1e5db322 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js
@@ -263,13 +263,15 @@ WebInspector.TimelineTreeView.GridNode = function(profileNode, grandTotalTime, m
var totalTime = profileNode.totalTime;
var totalPercent = totalTime / grandTotalTime * 100;
var data = {
- "startTime": formatMilliseconds(profileNode.event.startTime - treeView._model.minimumRecordTime()),
"activity": profileNode.name,
"self-percent": formatPercent(selfPercent),
"self": formatMilliseconds(selfTime),
"total-percent": formatPercent(totalPercent),
"total": formatMilliseconds(totalTime),
};
+ if (profileNode.event)
+ data["startTime"] = formatMilliseconds(profileNode.event.startTime - treeView._model.minimumRecordTime());
+
var hasChildren = this._profileNode.children ? this._profileNode.children.size > 0 : false;
WebInspector.SortableDataGridNode.call(this, data, hasChildren);
}