| Index: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
|
| index 0a2d8db714e87a240de52a7269e22306bad54b79..bc6842fa83bd8df061fb8d46a4e41c8f763e69da 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
|
| @@ -108,6 +108,7 @@ WebInspector.SourcesPanel = function()
|
| WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerPaused, this._debuggerPaused, this);
|
| WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerResumed, this._debuggerResumed, this);
|
| WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.GlobalObjectCleared, this._debuggerReset, this);
|
| + WebInspector.targetManager.addModelListener(WebInspector.SubTargetsManager, WebInspector.SubTargetsManager.Events.SubTargetAdded, this._subTargetAdded, this);
|
| new WebInspector.WorkspaceMappingTip(this, this._workspace);
|
| WebInspector.extensionServer.addEventListener(WebInspector.ExtensionServer.Events.SidebarPaneAdded, this._extensionSidebarPaneAdded, this);
|
| WebInspector.DataSaverInfobar.maybeShowInPanel(this);
|
| @@ -125,13 +126,7 @@ WebInspector.SourcesPanel.prototype = {
|
| */
|
| targetAdded: function(target)
|
| {
|
| - var hasThreads = WebInspector.targetManager.targets(WebInspector.Target.Capability.JS).length > 1;
|
| - if (hasThreads && !this._threadsSidebarPane) {
|
| - this._threadsSidebarPane = /** @type {!WebInspector.View} */ (WebInspector.viewManager.view("sources.threads"));
|
| - if (this._sidebarPaneStack) {
|
| - this._sidebarPaneStack.showView(this._threadsSidebarPane, this._splitWidget.isVertical() ? this._watchSidebarPane : this._callstackPane);
|
| - }
|
| - }
|
| + this._showThreadsIfNeeded();
|
| },
|
|
|
| /**
|
| @@ -142,6 +137,21 @@ WebInspector.SourcesPanel.prototype = {
|
| {
|
| },
|
|
|
| + _subTargetAdded: function()
|
| + {
|
| + this._showThreadsIfNeeded();
|
| + },
|
| +
|
| + _showThreadsIfNeeded: function()
|
| + {
|
| + if (WebInspector.ThreadsSidebarPane.isShown() && !this._threadsSidebarPane) {
|
| + this._threadsSidebarPane = /** @type {!WebInspector.View} */ (WebInspector.viewManager.view("sources.threads"));
|
| + if (this._sidebarPaneStack) {
|
| + this._sidebarPaneStack.showView(this._threadsSidebarPane, this._splitWidget.isVertical() ? this._watchSidebarPane : this._callstackPane);
|
| + }
|
| + }
|
| + },
|
| +
|
| /**
|
| * @param {?WebInspector.Target} target
|
| */
|
|
|