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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 * @param {!RuntimeAgent.ScriptId=} scriptId | 241 * @param {!RuntimeAgent.ScriptId=} scriptId |
242 * @param {?RuntimeAgent.ExceptionDetails=} exceptionDetails | 242 * @param {?RuntimeAgent.ExceptionDetails=} exceptionDetails |
243 * @this {WebInspector.ScriptSnippetModel} | 243 * @this {WebInspector.ScriptSnippetModel} |
244 */ | 244 */ |
245 function compileCallback(scriptId, exceptionDetails) | 245 function compileCallback(scriptId, exceptionDetails) |
246 { | 246 { |
247 var mapping = this._mappingForTarget.get(target); | 247 var mapping = this._mappingForTarget.get(target); |
248 if (mapping.evaluationIndex(uiSourceCode) !== evaluationIndex) | 248 if (mapping.evaluationIndex(uiSourceCode) !== evaluationIndex) |
249 return; | 249 return; |
250 | 250 |
251 mapping._addScript(executionContext.debuggerModel.scriptForId(script
Id || exceptionDetails.scriptId), uiSourceCode); | 251 var script = /** @type {!WebInspector.Script} */(executionContext.de
buggerModel.scriptForId(scriptId || exceptionDetails.scriptId)); |
| 252 mapping._addScript(script, uiSourceCode); |
252 if (!scriptId) { | 253 if (!scriptId) { |
253 this._printRunOrCompileScriptResultFailure(target, exceptionDeta
ils, evaluationUrl); | 254 this._printRunOrCompileScriptResultFailure(target, exceptionDeta
ils, evaluationUrl); |
254 return; | 255 return; |
255 } | 256 } |
256 | 257 |
257 var breakpointLocations = this._removeBreakpoints(uiSourceCode); | 258 var breakpointLocations = this._removeBreakpoints(uiSourceCode); |
258 this._restoreBreakpoints(uiSourceCode, breakpointLocations); | 259 this._restoreBreakpoints(uiSourceCode, breakpointLocations); |
259 | 260 |
260 this._runScript(scriptId, executionContext, evaluationUrl); | 261 this._runScript(scriptId, executionContext, evaluationUrl); |
261 } | 262 } |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 this._model.deleteScriptSnippet(url); | 684 this._model.deleteScriptSnippet(url); |
684 }, | 685 }, |
685 | 686 |
686 __proto__: WebInspector.ContentProviderBasedProject.prototype | 687 __proto__: WebInspector.ContentProviderBasedProject.prototype |
687 } | 688 } |
688 | 689 |
689 /** | 690 /** |
690 * @type {!WebInspector.ScriptSnippetModel} | 691 * @type {!WebInspector.ScriptSnippetModel} |
691 */ | 692 */ |
692 WebInspector.scriptSnippetModel = new WebInspector.ScriptSnippetModel(WebInspect
or.workspace); | 693 WebInspector.scriptSnippetModel = new WebInspector.ScriptSnippetModel(WebInspect
or.workspace); |
OLD | NEW |