| 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 cf933de55a06e1f0fdd09966b3a18b2ff02a80f4..33e33f3f9927e60b5af1b79290eea62c30c6be45 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
|
| @@ -540,7 +540,7 @@ Sources.SourcesPanel = class extends UI.Panel {
|
| */
|
| _runSnippet() {
|
| var uiSourceCode = this._sourcesView.currentUISourceCode();
|
| - if (uiSourceCode.project().type() !== Workspace.projectTypes.Snippets)
|
| + if (!uiSourceCode || !Snippets.ScriptSnippetModel.isSnippetUISourceCode(uiSourceCode))
|
| return false;
|
|
|
| var currentExecutionContext = UI.context.flavor(SDK.ExecutionContext);
|
| @@ -789,7 +789,7 @@ Sources.SourcesPanel = class extends UI.Panel {
|
|
|
| if (Runtime.experiments.isEnabled('persistence2'))
|
| return;
|
| - if (uiSourceCode.project().type() === Workspace.projectTypes.FileSystem) {
|
| + if (Persistence.FileSystemWorkspaceBinding.isFileSystemUISourceCode(uiSourceCode)) {
|
| var binding = Persistence.persistence.binding(uiSourceCode);
|
| if (!binding) {
|
| contextMenu.appendItem(
|
| @@ -802,16 +802,8 @@ Sources.SourcesPanel = class extends UI.Panel {
|
| }
|
| }
|
|
|
| - /**
|
| - * @param {!Workspace.Project} project
|
| - */
|
| - function filterProject(project) {
|
| - return project.type() === Workspace.projectTypes.FileSystem;
|
| - }
|
| -
|
| - if (uiSourceCode.project().type() === Workspace.projectTypes.Network ||
|
| - uiSourceCode.project().type() === Workspace.projectTypes.ContentScripts) {
|
| - if (!this._workspace.projects().filter(filterProject).length)
|
| + if (Bindings.NetworkProject.isNetworkUISourceCode(uiSourceCode)) {
|
| + if (!Persistence.FileSystemWorkspaceBinding.uiSourceCodes(this._workspace).length)
|
| return;
|
| if (this._workspace.uiSourceCodeForURL(uiSourceCode.url()) === uiSourceCode) {
|
| contextMenu.appendItem(
|
| @@ -840,7 +832,7 @@ Sources.SourcesPanel = class extends UI.Panel {
|
| contextMenu.appendSeparator();
|
| }
|
| this._appendUISourceCodeMappingItems(contextMenu, uiSourceCode);
|
| - if (projectType !== Workspace.projectTypes.FileSystem) {
|
| + if (!uiSourceCode.project().canSetFileContent()) {
|
| contextMenu.appendItem(
|
| Common.UIString.capitalize('Local ^modifications\u2026'), this._showLocalHistory.bind(this, uiSourceCode));
|
| }
|
| @@ -876,10 +868,8 @@ Sources.SourcesPanel = class extends UI.Panel {
|
| contextMenu.appendItem(
|
| Common.UIString.capitalize('Continue to ^here'), this._continueToLocation.bind(this, uiLocation));
|
| }
|
| - }
|
| -
|
| - if (contentType.hasScripts() && projectType !== Workspace.projectTypes.Snippets)
|
| this._callstackPane.appendBlackboxURLContextMenuItems(contextMenu, uiSourceCode);
|
| + }
|
| }
|
|
|
| /**
|
|
|