Chromium Code Reviews| Index: Source/devtools/front_end/CPUProfileView.js |
| diff --git a/Source/devtools/front_end/CPUProfileView.js b/Source/devtools/front_end/CPUProfileView.js |
| index b22f46f37443bee4d3d4315daafa737216a09e1a..88cfe33d1c69f75a7e95579d7974d0d0ac5062f0 100644 |
| --- a/Source/devtools/front_end/CPUProfileView.js |
| +++ b/Source/devtools/front_end/CPUProfileView.js |
| @@ -52,7 +52,7 @@ WebInspector.CPUProfileView = function(profileHeader) |
| this.viewSelectComboBox = new WebInspector.StatusBarComboBox(this._changeView.bind(this)); |
| var options = {}; |
| - options[WebInspector.CPUProfileView._TypeFlame] = this.viewSelectComboBox.createOption(WebInspector.UIString("Flame Chart"), "", WebInspector.CPUProfileView._TypeFlame); |
| + options[WebInspector.CPUProfileView._TypeFlame] = this.viewSelectComboBox.createOption(WebInspector.UIString("Icicle Chart"), "", WebInspector.CPUProfileView._TypeFlame); |
| options[WebInspector.CPUProfileView._TypeHeavy] = this.viewSelectComboBox.createOption(WebInspector.UIString("Heavy (Bottom Up)"), "", WebInspector.CPUProfileView._TypeHeavy); |
| options[WebInspector.CPUProfileView._TypeTree] = this.viewSelectComboBox.createOption(WebInspector.UIString("Tree (Top Down)"), "", WebInspector.CPUProfileView._TypeTree); |
| @@ -1056,6 +1056,7 @@ WebInspector.CPUFlameChartDataProvider = function(cpuProfileView) |
| WebInspector.FlameChartDataProvider.call(this); |
| this._cpuProfileView = cpuProfileView; |
| this._colorGenerator = WebInspector.CPUProfileView.colorGenerator(); |
| + this._linkifier = new WebInspector.Linkifier(); |
| } |
| WebInspector.CPUFlameChartDataProvider.prototype = { |
| @@ -1284,8 +1285,11 @@ WebInspector.CPUFlameChartDataProvider.prototype = { |
| var totalTime = this._millisecondsToString(timelineData.entryTotalTimes[entryIndex]); |
| pushEntryInfoRow(WebInspector.UIString("Self time"), selfTime); |
| pushEntryInfoRow(WebInspector.UIString("Total time"), totalTime); |
| - if (node.url) |
| - pushEntryInfoRow(WebInspector.UIString("URL"), node.url + ":" + node.lineNumber); |
| + var linkElement = this._linkifier.linkifyRawLocation(new WebInspector.DebuggerModel.Location(node.scriptId, node.lineNumber, node.columnNumber)); |
|
pfeldman
2014/03/26 09:33:46
just create local linkifier.
|
| + pushEntryInfoRow(WebInspector.UIString("URL"), linkElement ? linkElement.innerText : ""); |
|
pfeldman
2014/03/26 09:33:46
You should never use innerText. Use textContent in
|
| + // We need only text of the link so we can reset linkifier immedeately. |
| + // Othervise linkifier will keep the references to the elements and update them each time when user clicks pretty print. |
| + this._linkifier.reset(); |
| pushEntryInfoRow(WebInspector.UIString("Aggregated self time"), Number.secondsToString(node.selfTime / 1000, true)); |
| pushEntryInfoRow(WebInspector.UIString("Aggregated total time"), Number.secondsToString(node.totalTime / 1000, true)); |
| if (node.deoptReason && node.deoptReason !== "no reason") |