| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 /** | 170 /** |
| 171 * @param {!WebInspector.Script} script | 171 * @param {!WebInspector.Script} script |
| 172 */ | 172 */ |
| 173 _processScript: function(script) | 173 _processScript: function(script) |
| 174 { | 174 { |
| 175 // Create stub UISourceCode for the time source mapping is being loaded. | 175 // Create stub UISourceCode for the time source mapping is being loaded. |
| 176 var stubUISourceCode = this._stubProject.addContentProvider(script.sourc
eURL, new WebInspector.StaticContentProvider(WebInspector.resourceTypes.Script,
"\n\n\n\n\n// Please wait a bit.\n// Compiled script is not shown while source m
ap is being loaded!", script.sourceURL)); | 176 var stubUISourceCode = this._stubProject.addContentProvider(script.sourc
eURL, new WebInspector.StaticContentProvider(WebInspector.resourceTypes.Script,
"\n\n\n\n\n// Please wait a bit.\n// Compiled script is not shown while source m
ap is being loaded!", script.sourceURL)); |
| 177 this._stubUISourceCodes.set(script.scriptId, stubUISourceCode); | 177 this._stubUISourceCodes.set(script.scriptId, stubUISourceCode); |
| 178 | 178 |
| 179 this._debuggerWorkspaceBinding.pushSourceMapping(script, this); | 179 this._debuggerWorkspaceBinding.pushSourceMapping(script, this); |
| 180 this._loadSourceMapForScript(script, this._sourceMapLoaded.bind(this, sc
ript, stubUISourceCode.path())); | 180 this._loadSourceMapForScript(script, this._sourceMapLoaded.bind(this, sc
ript, stubUISourceCode.url())); |
| 181 }, | 181 }, |
| 182 | 182 |
| 183 /** | 183 /** |
| 184 * @param {!WebInspector.Script} script | 184 * @param {!WebInspector.Script} script |
| 185 * @param {string} uiSourceCodePath | 185 * @param {string} uiSourceCodePath |
| 186 * @param {?WebInspector.SourceMap} sourceMap | 186 * @param {?WebInspector.SourceMap} sourceMap |
| 187 */ | 187 */ |
| 188 _sourceMapLoaded: function(script, uiSourceCodePath, sourceMap) | 188 _sourceMapLoaded: function(script, uiSourceCodePath, sourceMap) |
| 189 { | 189 { |
| 190 this._stubUISourceCodes.delete(script.scriptId); | 190 this._stubUISourceCodes.delete(script.scriptId); |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 this._sourceMapForScriptId = {}; | 373 this._sourceMapForScriptId = {}; |
| 374 this._scriptForSourceMap.clear(); | 374 this._scriptForSourceMap.clear(); |
| 375 this._sourceMapForURL.clear(); | 375 this._sourceMapForURL.clear(); |
| 376 }, | 376 }, |
| 377 | 377 |
| 378 dispose: function() | 378 dispose: function() |
| 379 { | 379 { |
| 380 this._workspace.removeEventListener(WebInspector.Workspace.Events.UISour
ceCodeAdded, this._uiSourceCodeAddedToWorkspace, this); | 380 this._workspace.removeEventListener(WebInspector.Workspace.Events.UISour
ceCodeAdded, this._uiSourceCodeAddedToWorkspace, this); |
| 381 } | 381 } |
| 382 } | 382 } |
| OLD | NEW |