| Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
|
| index b4d110908d1e448bb31b971b1af1356d0fc41c1c..a048529b60574103524268abd836ee1550952c24 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
|
| @@ -1269,14 +1269,20 @@ WebInspector.TimelinePanel.prototype = {
|
| */
|
| _setLineLevelCPUProfile: function(profile)
|
| {
|
| + var debuggerModel = WebInspector.DebuggerModel.fromTarget(WebInspector.targetManager.mainTarget());
|
| + if (!debuggerModel)
|
| + return;
|
| for (var fileInfo of profile.files()) {
|
| - var uiSourceCode = WebInspector.workspace.uiSourceCodeForURL(/** @type {string} */ (fileInfo[0]));
|
| - if (!uiSourceCode)
|
| - continue;
|
| + var url = /** @type {string} */ (fileInfo[0]);
|
| + var uiSourceCode = WebInspector.workspace.uiSourceCodeForURL(url);
|
| for (var lineInfo of fileInfo[1]) {
|
| - var line = lineInfo[0];
|
| + var line = lineInfo[0] - 1;
|
| var time = lineInfo[1];
|
| - uiSourceCode.addLineDecoration(line, WebInspector.TimelineUIUtils.PerformanceLineDecorator.type, time);
|
| + var rawLocation = debuggerModel.createRawLocationByURL(url, line, 0);
|
| + if (rawLocation)
|
| + new WebInspector.TimelineUIUtils.LineLevelProfilePresentation(rawLocation, time);
|
| + else if (uiSourceCode)
|
| + uiSourceCode.addLineDecoration(line, WebInspector.TimelineUIUtils.PerformanceLineDecorator.type, time);
|
| }
|
| }
|
| },
|
|
|