Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2353)

Side by Side Diff: Source/devtools/front_end/sdk/Script.js

Issue 1249013002: DevTools: simplify setScriptSource and restartFrame return values (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed dgozman's comments Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/sdk/DebuggerModel.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 * @param {string} newSource 186 * @param {string} newSource
187 * @param {function(?Protocol.Error, !DebuggerAgent.SetScriptSourceError=, ! Array.<!DebuggerAgent.CallFrame>=, !DebuggerAgent.StackTrace=, boolean=)} callba ck 187 * @param {function(?Protocol.Error, !DebuggerAgent.SetScriptSourceError=, ! Array.<!DebuggerAgent.CallFrame>=, !DebuggerAgent.StackTrace=, boolean=)} callba ck
188 */ 188 */
189 editSource: function(newSource, callback) 189 editSource: function(newSource, callback)
190 { 190 {
191 /** 191 /**
192 * @this {WebInspector.Script} 192 * @this {WebInspector.Script}
193 * @param {?Protocol.Error} error 193 * @param {?Protocol.Error} error
194 * @param {!DebuggerAgent.SetScriptSourceError=} errorData 194 * @param {!DebuggerAgent.SetScriptSourceError=} errorData
195 * @param {!Array.<!DebuggerAgent.CallFrame>=} callFrames 195 * @param {!Array.<!DebuggerAgent.CallFrame>=} callFrames
196 * @param {!Object=} debugData 196 * @param {boolean=} stackChanged
197 * @param {!DebuggerAgent.StackTrace=} asyncStackTrace 197 * @param {!DebuggerAgent.StackTrace=} asyncStackTrace
198 */ 198 */
199 function didEditScriptSource(error, errorData, callFrames, debugData, as yncStackTrace) 199 function didEditScriptSource(error, errorData, callFrames, stackChanged, asyncStackTrace)
200 { 200 {
201 // FIXME: support debugData.stack_update_needs_step_in flag by calli ng WebInspector.debugger_model.callStackModified
202 if (!error) 201 if (!error)
203 this._source = newSource; 202 this._source = newSource;
204 var needsStepIn = !!debugData && debugData["stack_update_needs_step_ in"] === true; 203 var needsStepIn = !!stackChanged;
205 callback(error, errorData, callFrames, asyncStackTrace, needsStepIn) ; 204 callback(error, errorData, callFrames, asyncStackTrace, needsStepIn) ;
206 if (!error) 205 if (!error)
207 this.dispatchEventToListeners(WebInspector.Script.Events.ScriptE dited, newSource); 206 this.dispatchEventToListeners(WebInspector.Script.Events.ScriptE dited, newSource);
208 } 207 }
209 208
210 newSource = WebInspector.Script._trimSourceURLComment(newSource); 209 newSource = WebInspector.Script._trimSourceURLComment(newSource);
211 // We append correct sourceURL to script for consistency only. It's not actually needed for things to work correctly. 210 // We append correct sourceURL to script for consistency only. It's not actually needed for things to work correctly.
212 newSource = this._appendSourceURLCommentIfNeeded(newSource); 211 newSource = this._appendSourceURLCommentIfNeeded(newSource);
213 212
214 if (this.scriptId) 213 if (this.scriptId)
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 /** 257 /**
259 * @return {boolean} 258 * @return {boolean}
260 */ 259 */
261 isInlineScriptWithSourceURL: function() 260 isInlineScriptWithSourceURL: function()
262 { 261 {
263 return !!this.hasSourceURL && this.isInlineScript(); 262 return !!this.hasSourceURL && this.isInlineScript();
264 }, 263 },
265 264
266 __proto__: WebInspector.SDKObject.prototype 265 __proto__: WebInspector.SDKObject.prototype
267 } 266 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/DebuggerModel.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698