| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 150     { | 150     { | 
| 151         if (!script.sourceMapURL) { | 151         if (!script.sourceMapURL) { | 
| 152             script.addEventListener(WebInspector.Script.Events.SourceMapURLAdded
     , this._sourceMapURLAdded.bind(this)); | 152             script.addEventListener(WebInspector.Script.Events.SourceMapURLAdded
     , this._sourceMapURLAdded.bind(this)); | 
| 153             return; | 153             return; | 
| 154         } | 154         } | 
| 155 | 155 | 
| 156         this._processScript(script); | 156         this._processScript(script); | 
| 157     }, | 157     }, | 
| 158 | 158 | 
| 159     /** | 159     /** | 
|  | 160      * @param {!WebInspector.Script} script | 
|  | 161      * @return {?WebInspector.SourceMap} | 
|  | 162      */ | 
|  | 163     sourceMapForScript: function(script) | 
|  | 164     { | 
|  | 165         return this._sourceMapForScriptId[script.scriptId]; | 
|  | 166     }, | 
|  | 167 | 
|  | 168     /** | 
| 160      * @param {!WebInspector.Event} event | 169      * @param {!WebInspector.Event} event | 
| 161      */ | 170      */ | 
| 162     _sourceMapURLAdded: function(event) | 171     _sourceMapURLAdded: function(event) | 
| 163     { | 172     { | 
| 164         var script = /** @type {!WebInspector.Script} */ (event.target); | 173         var script = /** @type {!WebInspector.Script} */ (event.target); | 
| 165         if (!script.sourceMapURL) | 174         if (!script.sourceMapURL) | 
| 166             return; | 175             return; | 
| 167         this._processScript(script); | 176         this._processScript(script); | 
| 168     }, | 177     }, | 
| 169 | 178 | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
| 180         this._loadSourceMapForScript(script, this._sourceMapLoaded.bind(this, sc
     ript, stubUISourceCode.url())); | 189         this._loadSourceMapForScript(script, this._sourceMapLoaded.bind(this, sc
     ript, stubUISourceCode.url())); | 
| 181     }, | 190     }, | 
| 182 | 191 | 
| 183     /** | 192     /** | 
| 184      * @param {!WebInspector.Script} script | 193      * @param {!WebInspector.Script} script | 
| 185      * @param {string} uiSourceCodePath | 194      * @param {string} uiSourceCodePath | 
| 186      * @param {?WebInspector.SourceMap} sourceMap | 195      * @param {?WebInspector.SourceMap} sourceMap | 
| 187      */ | 196      */ | 
| 188     _sourceMapLoaded: function(script, uiSourceCodePath, sourceMap) | 197     _sourceMapLoaded: function(script, uiSourceCodePath, sourceMap) | 
| 189     { | 198     { | 
|  | 199         WebInspector.blackboxManager.sourceMapLoaded(script, sourceMap); | 
|  | 200 | 
| 190         this._stubUISourceCodes.delete(script.scriptId); | 201         this._stubUISourceCodes.delete(script.scriptId); | 
| 191         this._stubProject.removeFile(uiSourceCodePath); | 202         this._stubProject.removeFile(uiSourceCodePath); | 
| 192 | 203 | 
| 193         if (!sourceMap) { | 204         if (!sourceMap) { | 
| 194             this._debuggerWorkspaceBinding.updateLocations(script); | 205             this._debuggerWorkspaceBinding.updateLocations(script); | 
| 195             return; | 206             return; | 
| 196         } | 207         } | 
| 197 | 208 | 
| 198         if (this._scriptForSourceMap.get(sourceMap)) { | 209         if (this._scriptForSourceMap.get(sourceMap)) { | 
| 199             this._sourceMapForScriptId[script.scriptId] = sourceMap; | 210             this._sourceMapForScriptId[script.scriptId] = sourceMap; | 
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 373         this._sourceMapForScriptId = {}; | 384         this._sourceMapForScriptId = {}; | 
| 374         this._scriptForSourceMap.clear(); | 385         this._scriptForSourceMap.clear(); | 
| 375         this._sourceMapForURL.clear(); | 386         this._sourceMapForURL.clear(); | 
| 376     }, | 387     }, | 
| 377 | 388 | 
| 378     dispose: function() | 389     dispose: function() | 
| 379     { | 390     { | 
| 380         this._workspace.removeEventListener(WebInspector.Workspace.Events.UISour
     ceCodeAdded, this._uiSourceCodeAddedToWorkspace, this); | 391         this._workspace.removeEventListener(WebInspector.Workspace.Events.UISour
     ceCodeAdded, this._uiSourceCodeAddedToWorkspace, this); | 
| 381     } | 392     } | 
| 382 } | 393 } | 
| OLD | NEW | 
|---|