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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.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/timeline/TimelineUIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
index ead369002491d815e16442d76a9088b7579bbca5..ea5c74804d8488e1fcebc3fa552299d4cc618dd5 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -996,11 +996,16 @@ WebInspector.TimelineUIUtils.buildNetworkRequestDetails = function(request, mode
var sendRequest = request.children[0];
var topFrame = WebInspector.TimelineUIUtils.topStackFrame(sendRequest);
if (topFrame) {
- contentHelper.appendElementRow(title, linkifier.linkifyConsoleCallFrameForTimeline(target, topFrame));
+ var link = linkifier.linkifyConsoleCallFrameForTimeline(target, topFrame);
+ if (link)
+ contentHelper.appendElementRow(title, link);
} else if (sendRequest.initiator) {
var initiatorURL = WebInspector.TimelineUIUtils.eventURL(sendRequest.initiator);
- if (initiatorURL)
- contentHelper.appendElementRow(title, linkifier.linkifyScriptLocation(target, null, initiatorURL, 0));
+ if (initiatorURL) {
+ var link = linkifier.linkifyScriptLocation(target, null, initiatorURL, 0);
+ if (link)
+ contentHelper.appendElementRow(title, link);
+ }
}
/**
@@ -2051,7 +2056,10 @@ WebInspector.TimelineDetailsContentHelper.prototype = {
return;
if (startColumn)
--startColumn;
- this.appendElementRow(title, this._linkifier.linkifyScriptLocation(this._target, null, url, startLine - 1, startColumn));
+ var link = this._linkifier.linkifyScriptLocation(this._target, null, url, startLine - 1, startColumn);
+ if (!link)
+ return;
+ this.appendElementRow(title, link);
},
/**

Powered by Google App Engine
This is Rietveld 408576698