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

Unified Diff: Source/devtools/front_end/network/NetworkPanel.js

Issue 302783010: DevTools: Do not use displayNameForURL in NetworkRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed nits Created 6 years, 7 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
« no previous file with comments | « no previous file | Source/devtools/front_end/sdk/NetworkRequest.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/network/NetworkPanel.js
diff --git a/Source/devtools/front_end/network/NetworkPanel.js b/Source/devtools/front_end/network/NetworkPanel.js
index 7217a78d28b59041133a28443d563f90b929579f..c308e3c034537538294459097119df671724336c 100644
--- a/Source/devtools/front_end/network/NetworkPanel.js
+++ b/Source/devtools/front_end/network/NetworkPanel.js
@@ -2884,9 +2884,14 @@ WebInspector.NetworkDataGridNode.InitiatorComparator = function(a, b)
if (aInitiator.type > bInitiator.type)
return 1;
- if (aInitiator.source < bInitiator.source)
+ if (typeof aInitiator.__source === "undefined")
+ aInitiator.__source = WebInspector.displayNameForURL(aInitiator.url);
+ if (typeof bInitiator.__source === "undefined")
+ bInitiator.__source = WebInspector.displayNameForURL(bInitiator.url);
+
+ if (aInitiator.__source < bInitiator.__source)
return -1;
- if (aInitiator.source > bInitiator.source)
+ if (aInitiator.__source > bInitiator.__source)
return 1;
if (aInitiator.lineNumber < bInitiator.lineNumber)
« no previous file with comments | « no previous file | Source/devtools/front_end/sdk/NetworkRequest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698