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

Side by Side Diff: Source/devtools/front_end/ResourceScriptMapping.js

Issue 216183003: DevTools: Make sure UISC content is up-to-date when running performSearchInContent() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Introduce callback array for pending requests Created 6 years, 8 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
« no previous file with comments | « no previous file | Source/devtools/front_end/SourcesSearchScope.js » ('j') | 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 * @param {!Array.<!WebInspector.Script>} scripts 165 * @param {!Array.<!WebInspector.Script>} scripts
166 */ 166 */
167 _bindUISourceCodeToScripts: function(uiSourceCode, scripts) 167 _bindUISourceCodeToScripts: function(uiSourceCode, scripts)
168 { 168 {
169 console.assert(scripts.length); 169 console.assert(scripts.length);
170 var scriptFile = new WebInspector.ResourceScriptFile(this, uiSourceCode, scripts); 170 var scriptFile = new WebInspector.ResourceScriptFile(this, uiSourceCode, scripts);
171 uiSourceCode.setScriptFile(scriptFile); 171 uiSourceCode.setScriptFile(scriptFile);
172 for (var i = 0; i < scripts.length; ++i) 172 for (var i = 0; i < scripts.length; ++i)
173 scripts[i].updateLocations(); 173 scripts[i].updateLocations();
174 uiSourceCode.setSourceMapping(this); 174 uiSourceCode.setSourceMapping(this);
175 this._boundURLs.put(uiSourceCode.url); 175 this._boundURLs.add(uiSourceCode.url);
176 }, 176 },
177 177
178 /** 178 /**
179 * @param {!WebInspector.UISourceCode} uiSourceCode 179 * @param {!WebInspector.UISourceCode} uiSourceCode
180 */ 180 */
181 _unbindUISourceCode: function(uiSourceCode) 181 _unbindUISourceCode: function(uiSourceCode)
182 { 182 {
183 var scriptFile = /** @type {!WebInspector.ResourceScriptFile} */ (uiSour ceCode.scriptFile()); 183 var scriptFile = /** @type {!WebInspector.ResourceScriptFile} */ (uiSour ceCode.scriptFile());
184 if (scriptFile) { 184 if (scriptFile) {
185 scriptFile.dispose(); 185 scriptFile.dispose();
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 }, 375 },
376 376
377 dispose: function() 377 dispose: function()
378 { 378 {
379 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events. WorkingCopyCommitted, this._workingCopyCommitted, this); 379 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events. WorkingCopyCommitted, this._workingCopyCommitted, this);
380 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events. WorkingCopyChanged, this._workingCopyChanged, this); 380 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events. WorkingCopyChanged, this._workingCopyChanged, this);
381 }, 381 },
382 382
383 __proto__: WebInspector.Object.prototype 383 __proto__: WebInspector.Object.prototype
384 } 384 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/SourcesSearchScope.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698