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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js

Issue 2146333003: [DevTools] Replace SetScriptSourceError with ExceptionDetails in protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 scriptsForSourceURL: function(sourceURL) 350 scriptsForSourceURL: function(sourceURL)
351 { 351 {
352 if (!sourceURL) 352 if (!sourceURL)
353 return []; 353 return [];
354 return this._scriptsBySourceURL.get(sourceURL) || []; 354 return this._scriptsBySourceURL.get(sourceURL) || [];
355 }, 355 },
356 356
357 /** 357 /**
358 * @param {!RuntimeAgent.ScriptId} scriptId 358 * @param {!RuntimeAgent.ScriptId} scriptId
359 * @param {string} newSource 359 * @param {string} newSource
360 * @param {function(?Protocol.Error, !DebuggerAgent.SetScriptSourceError=)} callback 360 * @param {function(?Protocol.Error, !RuntimeAgent.ExceptionDetails=)} callb ack
361 */ 361 */
362 setScriptSource: function(scriptId, newSource, callback) 362 setScriptSource: function(scriptId, newSource, callback)
363 { 363 {
364 this._scripts[scriptId].editSource(newSource, this._didEditScriptSource. bind(this, scriptId, newSource, callback)); 364 this._scripts[scriptId].editSource(newSource, this._didEditScriptSource. bind(this, scriptId, newSource, callback));
365 }, 365 },
366 366
367 /** 367 /**
368 * @param {!RuntimeAgent.ScriptId} scriptId 368 * @param {!RuntimeAgent.ScriptId} scriptId
369 * @param {string} newSource 369 * @param {string} newSource
370 * @param {function(?Protocol.Error, !DebuggerAgent.SetScriptSourceError=)} callback 370 * @param {function(?Protocol.Error, !RuntimeAgent.ExceptionDetails=)} callb ack
371 * @param {?Protocol.Error} error 371 * @param {?Protocol.Error} error
372 * @param {!DebuggerAgent.SetScriptSourceError=} errorData 372 * @param {!RuntimeAgent.ExceptionDetails=} exceptionDetails
373 * @param {!Array.<!DebuggerAgent.CallFrame>=} callFrames 373 * @param {!Array.<!DebuggerAgent.CallFrame>=} callFrames
374 * @param {!RuntimeAgent.StackTrace=} asyncStackTrace 374 * @param {!RuntimeAgent.StackTrace=} asyncStackTrace
375 * @param {boolean=} needsStepIn 375 * @param {boolean=} needsStepIn
376 */ 376 */
377 _didEditScriptSource: function(scriptId, newSource, callback, error, errorDa ta, callFrames, asyncStackTrace, needsStepIn) 377 _didEditScriptSource: function(scriptId, newSource, callback, error, excepti onDetails, callFrames, asyncStackTrace, needsStepIn)
378 { 378 {
379 if (needsStepIn) { 379 if (needsStepIn) {
380 this.stepInto(); 380 this.stepInto();
381 this._pendingLiveEditCallback = callback.bind(this, error, errorData ); 381 this._pendingLiveEditCallback = callback.bind(this, error, exception Details);
382 return; 382 return;
383 } 383 }
384 384
385 if (!error && callFrames && callFrames.length) 385 if (!error && callFrames && callFrames.length)
386 this._pausedScript(callFrames, this._debuggerPausedDetails.reason, t his._debuggerPausedDetails.auxData, this._debuggerPausedDetails.breakpointIds, a syncStackTrace); 386 this._pausedScript(callFrames, this._debuggerPausedDetails.reason, t his._debuggerPausedDetails.auxData, this._debuggerPausedDetails.breakpointIds, a syncStackTrace);
387 callback(error, errorData); 387 callback(error, exceptionDetails);
388 }, 388 },
389 389
390 /** 390 /**
391 * @return {?Array.<!WebInspector.DebuggerModel.CallFrame>} 391 * @return {?Array.<!WebInspector.DebuggerModel.CallFrame>}
392 */ 392 */
393 get callFrames() 393 get callFrames()
394 { 394 {
395 return this._debuggerPausedDetails ? this._debuggerPausedDetails.callFra mes : null; 395 return this._debuggerPausedDetails ? this._debuggerPausedDetails.callFra mes : null;
396 }, 396 },
397 397
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 /** 1288 /**
1289 * @param {?WebInspector.Target} target 1289 * @param {?WebInspector.Target} target
1290 * @return {?WebInspector.DebuggerModel} 1290 * @return {?WebInspector.DebuggerModel}
1291 */ 1291 */
1292 WebInspector.DebuggerModel.fromTarget = function(target) 1292 WebInspector.DebuggerModel.fromTarget = function(target)
1293 { 1293 {
1294 if (!target || !target.hasJSCapability()) 1294 if (!target || !target.hasJSCapability())
1295 return null; 1295 return null;
1296 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel)); 1296 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel));
1297 } 1297 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698