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

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: update a test expectation. 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..1e964fa1d794ca94ce759cefd35bade7bc724f16 100644
--- a/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js
@@ -345,7 +345,7 @@ WebInspector.CPUProfileView.NodeFormatter.prototype = {
/**
* @override
* @param {!WebInspector.ProfileDataGridNode} node
- * @return {!Element}
+ * @return {?Element}
*/
linkifyNode: function(node)
{
@@ -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.linkifyConsoleCallFrame(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