OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 */ | 211 */ |
212 _appendSourceURLCommentIfNeeded: function(source) | 212 _appendSourceURLCommentIfNeeded: function(source) |
213 { | 213 { |
214 if (!this.hasSourceURL) | 214 if (!this.hasSourceURL) |
215 return source; | 215 return source; |
216 return source + "\n //# sourceURL=" + this.sourceURL; | 216 return source + "\n //# sourceURL=" + this.sourceURL; |
217 }, | 217 }, |
218 | 218 |
219 /** | 219 /** |
220 * @param {string} newSource | 220 * @param {string} newSource |
221 * @param {function(?Protocol.Error, !DebuggerAgent.SetScriptSourceError=, !
Array.<!DebuggerAgent.CallFrame>=, !RuntimeAgent.StackTrace=, boolean=)} callbac
k | 221 * @param {function(?Protocol.Error, !RuntimeAgent.ExceptionDetails=, !Array
.<!DebuggerAgent.CallFrame>=, !RuntimeAgent.StackTrace=, boolean=)} callback |
222 */ | 222 */ |
223 editSource: function(newSource, callback) | 223 editSource: function(newSource, callback) |
224 { | 224 { |
225 /** | 225 /** |
226 * @this {WebInspector.Script} | 226 * @this {WebInspector.Script} |
227 * @param {?Protocol.Error} error | 227 * @param {?Protocol.Error} error |
228 * @param {!Array.<!DebuggerAgent.CallFrame>=} callFrames | 228 * @param {!Array.<!DebuggerAgent.CallFrame>=} callFrames |
229 * @param {boolean=} stackChanged | 229 * @param {boolean=} stackChanged |
230 * @param {!RuntimeAgent.StackTrace=} asyncStackTrace | 230 * @param {!RuntimeAgent.StackTrace=} asyncStackTrace |
231 * @param {!DebuggerAgent.SetScriptSourceError=} compileError | 231 * @param {!RuntimeAgent.ExceptionDetails=} compileError |
232 */ | 232 */ |
233 function didEditScriptSource(error, callFrames, stackChanged, asyncStack
Trace, compileError) | 233 function didEditScriptSource(error, callFrames, stackChanged, asyncStack
Trace, compileError) |
234 { | 234 { |
235 if (!error && !compileError) | 235 if (!error && !compileError) |
236 this._source = newSource; | 236 this._source = newSource; |
237 var needsStepIn = !!stackChanged; | 237 var needsStepIn = !!stackChanged; |
238 callback(error, compileError, callFrames, asyncStackTrace, needsStep
In); | 238 callback(error, compileError, callFrames, asyncStackTrace, needsStep
In); |
239 } | 239 } |
240 | 240 |
241 newSource = WebInspector.Script._trimSourceURLComment(newSource); | 241 newSource = WebInspector.Script._trimSourceURLComment(newSource); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 { | 317 { |
318 if (error) | 318 if (error) |
319 console.error(error); | 319 console.error(error); |
320 fulfill(!error); | 320 fulfill(!error); |
321 } | 321 } |
322 } | 322 } |
323 }, | 323 }, |
324 | 324 |
325 __proto__: WebInspector.SDKObject.prototype | 325 __proto__: WebInspector.SDKObject.prototype |
326 } | 326 } |
OLD | NEW |