| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 /** | 159 /** |
| 160 * @param {!WebInspector.Script} script | 160 * @param {!WebInspector.Script} script |
| 161 */ | 161 */ |
| 162 _processScript: function(script) | 162 _processScript: function(script) |
| 163 { | 163 { |
| 164 // Create stub UISourceCode for the time source mapping is being loaded. | 164 // Create stub UISourceCode for the time source mapping is being loaded. |
| 165 var url = script.sourceURL; | 165 var url = script.sourceURL; |
| 166 var splitURL = WebInspector.ParsedURL.splitURLIntoPathComponents(url); | 166 var splitURL = WebInspector.ParsedURL.splitURLIntoPathComponents(url); |
| 167 var parentPath = splitURL.slice(1, -1).join("/"); | 167 var parentPath = splitURL.slice(1, -1).join("/"); |
| 168 var name = splitURL.peekLast() || ""; | 168 var name = splitURL.peekLast() || ""; |
| 169 var uiSourceCodePath = this._stubProjectDelegate.addContentProvider(pare
ntPath, name, url, url, new WebInspector.StaticContentProvider(WebInspector.reso
urceTypes.Script, "\n\n\n\n\n// Please wait a bit.\n// Compiled script is not sh
own while source map is being loaded!", url)); | 169 var uiSourceCodePath = this._stubProjectDelegate.addContentProvider(pare
ntPath, name, url, new WebInspector.StaticContentProvider(WebInspector.resourceT
ypes.Script, "\n\n\n\n\n// Please wait a bit.\n// Compiled script is not shown w
hile source map is being loaded!", url)); |
| 170 var stubUISourceCode = /** @type {!WebInspector.UISourceCode} */ (this._
workspace.uiSourceCode(this._stubProjectID, uiSourceCodePath)); | 170 var stubUISourceCode = /** @type {!WebInspector.UISourceCode} */ (this._
workspace.uiSourceCode(this._stubProjectID, uiSourceCodePath)); |
| 171 this._stubUISourceCodes.set(script.scriptId, stubUISourceCode); | 171 this._stubUISourceCodes.set(script.scriptId, stubUISourceCode); |
| 172 | 172 |
| 173 this._debuggerWorkspaceBinding.pushSourceMapping(script, this); | 173 this._debuggerWorkspaceBinding.pushSourceMapping(script, this); |
| 174 this._loadSourceMapForScript(script, this._sourceMapLoaded.bind(this, sc
ript, uiSourceCodePath)); | 174 this._loadSourceMapForScript(script, this._sourceMapLoaded.bind(this, sc
ript, uiSourceCodePath)); |
| 175 }, | 175 }, |
| 176 | 176 |
| 177 /** | 177 /** |
| 178 * @param {!WebInspector.Script} script | 178 * @param {!WebInspector.Script} script |
| 179 * @param {string} uiSourceCodePath | 179 * @param {string} uiSourceCodePath |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 this._sourceMapForScriptId = {}; | 361 this._sourceMapForScriptId = {}; |
| 362 this._scriptForSourceMap.clear(); | 362 this._scriptForSourceMap.clear(); |
| 363 this._sourceMapForURL.clear(); | 363 this._sourceMapForURL.clear(); |
| 364 }, | 364 }, |
| 365 | 365 |
| 366 dispose: function() | 366 dispose: function() |
| 367 { | 367 { |
| 368 this._workspace.removeEventListener(WebInspector.Workspace.Events.UISour
ceCodeAdded, this._uiSourceCodeAddedToWorkspace, this); | 368 this._workspace.removeEventListener(WebInspector.Workspace.Events.UISour
ceCodeAdded, this._uiSourceCodeAddedToWorkspace, this); |
| 369 } | 369 } |
| 370 } | 370 } |
| OLD | NEW |