Index: third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js |
index 270a9eec694fcb9169a92b62e8539e2e272f11c1..918e7274d23d51f89c8a0714c33488a0a05e3921 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js |
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js |
@@ -26,7 +26,7 @@ WebInspector.SourcesView = function(workspace, sourcesPanel) |
this._searchableView.setMinimalSearchQuerySize(0); |
this._searchableView.show(this.element); |
- /** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.VBoxWithToolbarItems>} */ |
+ /** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.Widget>} */ |
this._sourceViewByUISourceCode = new Map(); |
var tabbedEditorPlaceholderText = WebInspector.isMac() ? WebInspector.UIString("Hit Cmd+P to open a file") : WebInspector.UIString("Hit Ctrl+P to open a file"); |
@@ -281,9 +281,9 @@ WebInspector.SourcesView.prototype = { |
_updateScriptViewToolbarItems: function() |
{ |
this._scriptViewToolbar.removeToolbarItems(); |
- var view = /** @type {?WebInspector.VBoxWithToolbarItems} */(this.visibleView()); |
- if (view) { |
- for (var item of view.toolbarItems()) |
+ var view = this.visibleView() |
+ if (view instanceof WebInspector.VBoxWithToolbarItems) { |
+ for (var item of (/** @type {?WebInspector.VBoxWithToolbarItems} */(view)).toolbarItems()) |
this._scriptViewToolbar.appendToolbarItem(item); |
} |
}, |
@@ -356,7 +356,7 @@ WebInspector.SourcesView.prototype = { |
sourceFrame.setHighlighterType(WebInspector.NetworkProject.uiSourceCodeMimeType(uiSourceCode)); |
this._historyManager.trackSourceFrameCursorJumps(sourceFrame); |
} |
- this._sourceViewByUISourceCode.set(uiSourceCode, /** @type {!WebInspector.VBoxWithToolbarItems} */(sourceFrame || sourceView)); |
+ this._sourceViewByUISourceCode.set(uiSourceCode, /** @type {!WebInspector.Widget} */(sourceFrame || sourceView)); |
return /** @type {!WebInspector.Widget} */(sourceFrame || sourceView); |
}, |