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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js

Issue 2576983004: [DevTools] Avoid assertion failure (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 */ 531 */
532 _runSnippet() { 532 _runSnippet() {
533 var uiSourceCode = this._sourcesView.currentUISourceCode(); 533 var uiSourceCode = this._sourcesView.currentUISourceCode();
534 if (!uiSourceCode) 534 if (!uiSourceCode)
535 return false; 535 return false;
536 536
537 var currentExecutionContext = UI.context.flavor(SDK.ExecutionContext); 537 var currentExecutionContext = UI.context.flavor(SDK.ExecutionContext);
538 if (!currentExecutionContext) 538 if (!currentExecutionContext)
539 return false; 539 return false;
540 540
541 if (uiSourceCode.project().type() !== Workspace.projectTypes.Snippets)
542 return false;
543
541 Snippets.scriptSnippetModel.evaluateScriptSnippet(currentExecutionContext, u iSourceCode); 544 Snippets.scriptSnippetModel.evaluateScriptSnippet(currentExecutionContext, u iSourceCode);
542 return true; 545 return true;
543 } 546 }
544 547
545 /** 548 /**
546 * @param {!Common.Event} event 549 * @param {!Common.Event} event
547 */ 550 */
548 _editorSelected(event) { 551 _editorSelected(event) {
549 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); 552 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data);
550 if (this.editorView.mainWidget() && Common.moduleSetting('autoRevealInNaviga tor').get()) 553 if (this.editorView.mainWidget() && Common.moduleSetting('autoRevealInNaviga tor').get())
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 */ 1310 */
1308 willHide() { 1311 willHide() {
1309 UI.inspectorView.setDrawerMinimized(false); 1312 UI.inspectorView.setDrawerMinimized(false);
1310 setImmediate(() => Sources.SourcesPanel.updateResizerAndSidebarButtons(Sourc es.SourcesPanel.instance())); 1313 setImmediate(() => Sources.SourcesPanel.updateResizerAndSidebarButtons(Sourc es.SourcesPanel.instance()));
1311 } 1314 }
1312 1315
1313 _showViewInWrapper() { 1316 _showViewInWrapper() {
1314 this._view.show(this.element); 1317 this._view.show(this.element);
1315 } 1318 }
1316 }; 1319 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698