| 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 b80abb420e442970e64a9e32c0622547a65809cb..127f7104c0ddeb6ce2d5845ef6b8f469463dbfd7 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesNavigator.js
|
| @@ -59,7 +59,7 @@ WebInspector.SourcesNavigatorView.prototype = {
|
| return;
|
| var inspectedURL = mainTarget && mainTarget.inspectedURL();
|
| if (!inspectedURL)
|
| - return
|
| + return;
|
| for (var node of this._uiSourceCodeNodes.valuesArray()) {
|
| var uiSourceCode = node.uiSourceCode();
|
| if (uiSourceCode.url() === inspectedURL)
|
| @@ -73,8 +73,11 @@ WebInspector.SourcesNavigatorView.prototype = {
|
| */
|
| uiSourceCodeAdded: function(uiSourceCode)
|
| {
|
| - var inspectedPageURL = WebInspector.targetManager.mainTarget().inspectedURL();
|
| - if (uiSourceCode.url() === inspectedPageURL)
|
| + var mainTarget = WebInspector.targetManager.mainTarget();
|
| + var inspectedURL = mainTarget && mainTarget.inspectedURL();
|
| + if (!inspectedURL)
|
| + return;
|
| + if (uiSourceCode.url() === inspectedURL)
|
| this.revealUISourceCode(uiSourceCode, true);
|
| },
|
|
|
| @@ -137,8 +140,11 @@ WebInspector.NetworkNavigatorView.prototype = {
|
| */
|
| uiSourceCodeAdded: function(uiSourceCode)
|
| {
|
| - var inspectedPageURL = WebInspector.targetManager.mainTarget().inspectedURL();
|
| - if (uiSourceCode.url() === inspectedPageURL)
|
| + var mainTarget = WebInspector.targetManager.mainTarget();
|
| + var inspectedURL = mainTarget && mainTarget.inspectedURL();
|
| + if (!inspectedURL)
|
| + return;
|
| + if (uiSourceCode.url() === inspectedURL)
|
| this.revealUISourceCode(uiSourceCode, true);
|
| },
|
|
|
|
|