| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |