| OLD | NEW |
| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 */ | 369 */ |
| 370 _didEditScriptSource( | 370 _didEditScriptSource( |
| 371 scriptId, | 371 scriptId, |
| 372 newSource, | 372 newSource, |
| 373 callback, | 373 callback, |
| 374 error, | 374 error, |
| 375 exceptionDetails, | 375 exceptionDetails, |
| 376 callFrames, | 376 callFrames, |
| 377 asyncStackTrace, | 377 asyncStackTrace, |
| 378 needsStepIn) { | 378 needsStepIn) { |
| 379 callback(error, exceptionDetails); |
| 379 if (needsStepIn) { | 380 if (needsStepIn) { |
| 380 this.stepInto(); | 381 this.stepInto(); |
| 381 this._pendingLiveEditCallback = callback.bind(this, error, exceptionDetail
s); | |
| 382 return; | 382 return; |
| 383 } | 383 } |
| 384 | 384 |
| 385 if (!error && callFrames && callFrames.length) { | 385 if (!error && callFrames && callFrames.length) { |
| 386 this._pausedScript( | 386 this._pausedScript( |
| 387 callFrames, this._debuggerPausedDetails.reason, this._debuggerPausedDe
tails.auxData, | 387 callFrames, this._debuggerPausedDetails.reason, this._debuggerPausedDe
tails.auxData, |
| 388 this._debuggerPausedDetails.breakpointIds, asyncStackTrace); | 388 this._debuggerPausedDetails.breakpointIds, asyncStackTrace); |
| 389 } | 389 } |
| 390 callback(error, exceptionDetails); | |
| 391 } | 390 } |
| 392 | 391 |
| 393 /** | 392 /** |
| 394 * @return {?Array.<!SDK.DebuggerModel.CallFrame>} | 393 * @return {?Array.<!SDK.DebuggerModel.CallFrame>} |
| 395 */ | 394 */ |
| 396 get callFrames() { | 395 get callFrames() { |
| 397 return this._debuggerPausedDetails ? this._debuggerPausedDetails.callFrames
: null; | 396 return this._debuggerPausedDetails ? this._debuggerPausedDetails.callFrames
: null; |
| 398 } | 397 } |
| 399 | 398 |
| 400 /** | 399 /** |
| (...skipping 27 matching lines...) Expand all Loading... |
| 428 /** | 427 /** |
| 429 * @param {!Array.<!Protocol.Debugger.CallFrame>} callFrames | 428 * @param {!Array.<!Protocol.Debugger.CallFrame>} callFrames |
| 430 * @param {string} reason | 429 * @param {string} reason |
| 431 * @param {!Object|undefined} auxData | 430 * @param {!Object|undefined} auxData |
| 432 * @param {!Array.<string>} breakpointIds | 431 * @param {!Array.<string>} breakpointIds |
| 433 * @param {!Protocol.Runtime.StackTrace=} asyncStackTrace | 432 * @param {!Protocol.Runtime.StackTrace=} asyncStackTrace |
| 434 */ | 433 */ |
| 435 _pausedScript(callFrames, reason, auxData, breakpointIds, asyncStackTrace) { | 434 _pausedScript(callFrames, reason, auxData, breakpointIds, asyncStackTrace) { |
| 436 var pausedDetails = | 435 var pausedDetails = |
| 437 new SDK.DebuggerPausedDetails(this, callFrames, reason, auxData, breakpo
intIds, asyncStackTrace); | 436 new SDK.DebuggerPausedDetails(this, callFrames, reason, auxData, breakpo
intIds, asyncStackTrace); |
| 438 if (this._setDebuggerPausedDetails(pausedDetails)) { | 437 if (!this._setDebuggerPausedDetails(pausedDetails)) |
| 439 if (this._pendingLiveEditCallback) { | |
| 440 var callback = this._pendingLiveEditCallback; | |
| 441 delete this._pendingLiveEditCallback; | |
| 442 callback(); | |
| 443 } | |
| 444 } else { | |
| 445 this._agent.stepInto(); | 438 this._agent.stepInto(); |
| 446 } | |
| 447 } | 439 } |
| 448 | 440 |
| 449 _resumedScript() { | 441 _resumedScript() { |
| 450 this._setDebuggerPausedDetails(null); | 442 this._setDebuggerPausedDetails(null); |
| 451 this.dispatchEventToListeners(SDK.DebuggerModel.Events.DebuggerResumed); | 443 this.dispatchEventToListeners(SDK.DebuggerModel.Events.DebuggerResumed); |
| 452 } | 444 } |
| 453 | 445 |
| 454 /** | 446 /** |
| 455 * @param {!Protocol.Runtime.ScriptId} scriptId | 447 * @param {!Protocol.Runtime.ScriptId} scriptId |
| 456 * @param {string} sourceURL | 448 * @param {string} sourceURL |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1313 stack.callFrames.shift(); | 1305 stack.callFrames.shift(); |
| 1314 if (previous && !stack.callFrames.length) | 1306 if (previous && !stack.callFrames.length) |
| 1315 previous.parent = stack.parent; | 1307 previous.parent = stack.parent; |
| 1316 else | 1308 else |
| 1317 previous = stack; | 1309 previous = stack; |
| 1318 stack = stack.parent; | 1310 stack = stack.parent; |
| 1319 } | 1311 } |
| 1320 return asyncStackTrace; | 1312 return asyncStackTrace; |
| 1321 } | 1313 } |
| 1322 }; | 1314 }; |
| OLD | NEW |