Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Unified Diff: third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js

Issue 2151653005: DevTools: Do not linkify to pseudo (program) node when there's no URL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js b/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js
index 4fc4152c7ff598c20563ab72dd12350db4e140be..5650b471331862f606ebf42175b1f8cfae3a8e81 100644
--- a/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js
@@ -345,11 +345,11 @@ WebInspector.CPUProfileView.NodeFormatter.prototype = {
/**
* @override
* @param {!WebInspector.ProfileDataGridNode} node
- * @return {!Element}
+ * @return {?Element}
*/
linkifyNode: function(node)
{
- return this._profileView.linkifier().linkifyConsoleCallFrame(this._profileView.target(), node.profileNode.callFrame, "profile-node-file");
+ return this._profileView.linkifier().maybeLinkifyConsoleCallFrame(this._profileView.target(), node.profileNode.callFrame, "profile-node-file");
}
}
@@ -485,9 +485,10 @@ WebInspector.CPUFlameChartDataProvider.prototype = {
pushEntryInfoRow(WebInspector.UIString("Self time"), selfTime);
pushEntryInfoRow(WebInspector.UIString("Total time"), totalTime);
var linkifier = new WebInspector.Linkifier();
- var text = linkifier.linkifyConsoleCallFrame(this._target, node.callFrame).textContent;
+ var link = linkifier.maybeLinkifyConsoleCallFrame(this._target, node.callFrame);
+ if (link)
+ pushEntryInfoRow(WebInspector.UIString("URL"), link.textContent);
linkifier.dispose();
- pushEntryInfoRow(WebInspector.UIString("URL"), text);
pushEntryInfoRow(WebInspector.UIString("Aggregated self time"), Number.secondsToString(node.self / 1000, true));
pushEntryInfoRow(WebInspector.UIString("Aggregated total time"), Number.secondsToString(node.total / 1000, true));
if (node.deoptReason && node.deoptReason !== "no reason")

Powered by Google App Engine
This is Rietveld 408576698