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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js

Issue 2186753002: [DevTools] Track URL through the target (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
index 137a2abff6e8d49f2dcafeb677306e782c46400d..d735a3b4de70081a60a1fa4c257d9dfcbc8b3c07 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
@@ -163,11 +163,15 @@ WebInspector.SourcesNavigatorView.prototype = {
*/
_inspectedURLChanged: function(event)
{
- var nodes = this._uiSourceCodeNodes.valuesArray();
- for (var i = 0; i < nodes.length; ++i) {
- var uiSourceCode = nodes[i].uiSourceCode();
- var inspectedPageURL = WebInspector.targetManager.inspectedPageURL();
- if (inspectedPageURL && WebInspector.networkMapping.networkURL(uiSourceCode) === inspectedPageURL)
+ var mainTarget = WebInspector.targetManager.mainTarget();
+ if (event.data !== mainTarget)
+ return;
+ var inspectedURL = mainTarget && mainTarget.inspectedURL();
+ if (!inspectedURL)
+ return
+ for (var node of this._uiSourceCodeNodes.valuesArray()) {
+ var uiSourceCode = node.uiSourceCode();
+ if (WebInspector.networkMapping.networkURL(uiSourceCode) === inspectedURL)
this.revealUISourceCode(uiSourceCode, true);
}
},
@@ -178,7 +182,7 @@ WebInspector.SourcesNavigatorView.prototype = {
*/
uiSourceCodeAdded: function(uiSourceCode)
{
- var inspectedPageURL = WebInspector.targetManager.inspectedPageURL();
+ var inspectedPageURL = WebInspector.targetManager.mainTarget().inspectedURL();
if (inspectedPageURL && WebInspector.networkMapping.networkURL(uiSourceCode) === inspectedPageURL)
this.revealUISourceCode(uiSourceCode, true);
},
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698