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

Unified Diff: third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.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/HeapProfileView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.js b/third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.js
index f1774126b7de0b574f5343ea7e5abd233159eb7d..26eaf4331c8df29c1ff437f607f09e8500416d65 100644
--- a/third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.js
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.js
@@ -308,7 +308,7 @@ WebInspector.HeapProfileView.NodeFormatter.prototype = {
/**
* @override
* @param {!WebInspector.ProfileDataGridNode} node
- * @return {!Element}
+ * @return {?Element}
*/
linkifyNode: function(node)
{
@@ -432,9 +432,10 @@ WebInspector.HeapFlameChartDataProvider.prototype = {
pushEntryInfoRow(WebInspector.UIString("Self size"), Number.bytesToString(node.self));
pushEntryInfoRow(WebInspector.UIString("Total size"), Number.bytesToString(node.total));
var linkifier = new WebInspector.Linkifier();
- var text = (new WebInspector.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);
return entryInfo;
},

Powered by Google App Engine
This is Rietveld 408576698