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

Side by Side Diff: Source/devtools/front_end/workspace/UISourceCode.js

Issue 1238103002: [DevTools] Do not report edited resources via Page.getResourceContent. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 months 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 * @return {string} 455 * @return {string}
456 */ 456 */
457 workingCopy: function() 457 workingCopy: function()
458 { 458 {
459 if (this._workingCopyGetter) { 459 if (this._workingCopyGetter) {
460 this._workingCopy = this._workingCopyGetter(); 460 this._workingCopy = this._workingCopyGetter();
461 delete this._workingCopyGetter; 461 delete this._workingCopyGetter;
462 } 462 }
463 if (this.isDirty()) 463 if (this.isDirty())
464 return this._workingCopy; 464 return this._workingCopy;
465 return this._content; 465 return this._content || "";
yurys 2015/07/16 16:30:35 I wonder why JS compiler didn't catch this?
dgozman 2015/07/17 14:39:16 Probably because this._content was not initialized
466 }, 466 },
467 467
468 resetWorkingCopy: function() 468 resetWorkingCopy: function()
469 { 469 {
470 this._innerResetWorkingCopy(); 470 this._innerResetWorkingCopy();
471 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.WorkingCo pyChanged); 471 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.WorkingCo pyChanged);
472 }, 472 },
473 473
474 _innerResetWorkingCopy: function() 474 _innerResetWorkingCopy: function()
475 { 475 {
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 * @param {string} query 719 * @param {string} query
720 * @param {boolean} caseSensitive 720 * @param {boolean} caseSensitive
721 * @param {boolean} isRegex 721 * @param {boolean} isRegex
722 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal lback 722 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal lback
723 */ 723 */
724 searchInContent: function(query, caseSensitive, isRegex, callback) 724 searchInContent: function(query, caseSensitive, isRegex, callback)
725 { 725 {
726 callback([]); 726 callback([]);
727 } 727 }
728 } 728 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698