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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 return; | 193 return; |
194 // Create stub UISourceCode for the time source mapping is being loaded. | 194 // Create stub UISourceCode for the time source mapping is being loaded. |
195 var stubUISourceCode = this._stubProject.addContentProvider( | 195 var stubUISourceCode = this._stubProject.addContentProvider( |
196 script.sourceURL + ':sourcemap', | 196 script.sourceURL + ':sourcemap', |
197 Common.StaticContentProvider.fromString( | 197 Common.StaticContentProvider.fromString( |
198 script.sourceURL, Common.resourceTypes.Script, | 198 script.sourceURL, Common.resourceTypes.Script, |
199 '\n\n\n\n\n// Please wait a bit.\n// Compiled script is not shown wh
ile source map is being loaded!')); | 199 '\n\n\n\n\n// Please wait a bit.\n// Compiled script is not shown wh
ile source map is being loaded!')); |
200 this._stubUISourceCodes.set(script.scriptId, stubUISourceCode); | 200 this._stubUISourceCodes.set(script.scriptId, stubUISourceCode); |
201 | 201 |
202 this._debuggerWorkspaceBinding.pushSourceMapping(script, this); | 202 this._debuggerWorkspaceBinding.pushSourceMapping(script, this); |
203 this._loadSourceMapForScript(script).then(this._sourceMapLoaded.bind(this, s
cript, stubUISourceCode.url())); | 203 this._loadSourceMapForScript(script).then(sourceMap => { |
| 204 this._sourceMapLoaded(script, stubUISourceCode.url(), sourceMap); |
| 205 this._sourceMapAttachedForTest(sourceMap); |
| 206 }); |
204 } | 207 } |
205 | 208 |
206 /** | 209 /** |
| 210 * @param {?SDK.TextSourceMap} sourceMap |
| 211 */ |
| 212 _sourceMapAttachedForTest(sourceMap) { |
| 213 } |
| 214 |
| 215 /** |
207 * @param {!SDK.Script} script | 216 * @param {!SDK.Script} script |
208 * @param {string} uiSourceCodePath | 217 * @param {string} uiSourceCodePath |
209 * @param {?SDK.TextSourceMap} sourceMap | 218 * @param {?SDK.TextSourceMap} sourceMap |
210 */ | 219 */ |
211 _sourceMapLoaded(script, uiSourceCodePath, sourceMap) { | 220 _sourceMapLoaded(script, uiSourceCodePath, sourceMap) { |
212 Bindings.blackboxManager.sourceMapLoaded(script, sourceMap); | 221 Bindings.blackboxManager.sourceMapLoaded(script, sourceMap); |
213 | 222 |
214 this._stubUISourceCodes.delete(script.scriptId); | 223 this._stubUISourceCodes.delete(script.scriptId); |
215 this._stubProject.removeFile(uiSourceCodePath); | 224 this._stubProject.removeFile(uiSourceCodePath); |
216 | 225 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 } | 380 } |
372 | 381 |
373 dispose() { | 382 dispose() { |
374 Common.EventTarget.removeEventListeners(this._eventListeners); | 383 Common.EventTarget.removeEventListeners(this._eventListeners); |
375 this._debuggerReset(); | 384 this._debuggerReset(); |
376 this._stubProject.dispose(); | 385 this._stubProject.dispose(); |
377 } | 386 } |
378 }; | 387 }; |
379 | 388 |
380 Bindings.CompilerScriptMapping._originSymbol = Symbol('origin'); | 389 Bindings.CompilerScriptMapping._originSymbol = Symbol('origin'); |
OLD | NEW |