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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 * @param {DebuggerAgent.ScriptId} scriptId | 297 * @param {DebuggerAgent.ScriptId} scriptId |
298 * @param {string} newSource | 298 * @param {string} newSource |
299 * @param {function(?Protocol.Error)} callback | 299 * @param {function(?Protocol.Error)} callback |
300 * @param {?Protocol.Error} error | 300 * @param {?Protocol.Error} error |
301 * @param {Array.<DebuggerAgent.CallFrame>=} callFrames | 301 * @param {Array.<DebuggerAgent.CallFrame>=} callFrames |
302 */ | 302 */ |
303 _didEditScriptSource: function(scriptId, newSource, callback, error, callFra
mes) | 303 _didEditScriptSource: function(scriptId, newSource, callback, error, callFra
mes) |
304 { | 304 { |
305 callback(error); | 305 callback(error); |
306 if (!error && callFrames && callFrames.length) | 306 if (!error && callFrames && callFrames.length) |
307 this._pausedScript(callFrames, this._debuggerPausedDetails.reason, t
his._debuggerPausedDetails.auxData); | 307 this._pausedScript(callFrames, this._debuggerPausedDetails.reason, t
his._debuggerPausedDetails.auxData, this._debuggerPausedDetails.breakpointIds); |
308 }, | 308 }, |
309 | 309 |
310 /** | 310 /** |
311 * @return {Array.<DebuggerAgent.CallFrame>} | 311 * @return {Array.<DebuggerAgent.CallFrame>} |
312 */ | 312 */ |
313 get callFrames() | 313 get callFrames() |
314 { | 314 { |
315 return this._debuggerPausedDetails ? this._debuggerPausedDetails.callFra
mes : null; | 315 return this._debuggerPausedDetails ? this._debuggerPausedDetails.callFra
mes : null; |
316 }, | 316 }, |
317 | 317 |
(...skipping 21 matching lines...) Expand all Loading... |
339 } else { | 339 } else { |
340 this.setSelectedCallFrame(null); | 340 this.setSelectedCallFrame(null); |
341 DebuggerAgent.setOverlayMessage(); | 341 DebuggerAgent.setOverlayMessage(); |
342 } | 342 } |
343 }, | 343 }, |
344 | 344 |
345 /** | 345 /** |
346 * @param {Array.<DebuggerAgent.CallFrame>} callFrames | 346 * @param {Array.<DebuggerAgent.CallFrame>} callFrames |
347 * @param {string} reason | 347 * @param {string} reason |
348 * @param {*} auxData | 348 * @param {*} auxData |
| 349 * @param {Array.<string>} breakpointIds |
349 */ | 350 */ |
350 _pausedScript: function(callFrames, reason, auxData) | 351 _pausedScript: function(callFrames, reason, auxData, breakpointIds) |
351 { | 352 { |
352 this._setDebuggerPausedDetails(new WebInspector.DebuggerPausedDetails(th
is, callFrames, reason, auxData)); | 353 this._setDebuggerPausedDetails(new WebInspector.DebuggerPausedDetails(th
is, callFrames, reason, auxData, breakpointIds)); |
353 }, | 354 }, |
354 | 355 |
355 _resumedScript: function() | 356 _resumedScript: function() |
356 { | 357 { |
357 this._setDebuggerPausedDetails(null); | 358 this._setDebuggerPausedDetails(null); |
358 if (this._executionLineLiveLocation) | 359 if (this._executionLineLiveLocation) |
359 this._executionLineLiveLocation.dispose(); | 360 this._executionLineLiveLocation.dispose(); |
360 this._executionLineLiveLocation = null; | 361 this._executionLineLiveLocation = null; |
361 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Debugger
Resumed); | 362 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Debugger
Resumed); |
362 }, | 363 }, |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 WebInspector.DebuggerDispatcher = function(debuggerModel) | 607 WebInspector.DebuggerDispatcher = function(debuggerModel) |
607 { | 608 { |
608 this._debuggerModel = debuggerModel; | 609 this._debuggerModel = debuggerModel; |
609 } | 610 } |
610 | 611 |
611 WebInspector.DebuggerDispatcher.prototype = { | 612 WebInspector.DebuggerDispatcher.prototype = { |
612 /** | 613 /** |
613 * @param {Array.<DebuggerAgent.CallFrame>} callFrames | 614 * @param {Array.<DebuggerAgent.CallFrame>} callFrames |
614 * @param {string} reason | 615 * @param {string} reason |
615 * @param {Object=} auxData | 616 * @param {Object=} auxData |
| 617 * @param {Array.<string>} breakointsIds |
616 */ | 618 */ |
617 paused: function(callFrames, reason, auxData) | 619 paused: function(callFrames, reason, auxData, breakointsIds) |
618 { | 620 { |
619 this._debuggerModel._pausedScript(callFrames, reason, auxData); | 621 this._debuggerModel._pausedScript(callFrames, reason, auxData, breakoint
sIds); |
620 }, | 622 }, |
621 | 623 |
622 resumed: function() | 624 resumed: function() |
623 { | 625 { |
624 this._debuggerModel._resumedScript(); | 626 this._debuggerModel._resumedScript(); |
625 }, | 627 }, |
626 | 628 |
627 globalObjectCleared: function() | 629 globalObjectCleared: function() |
628 { | 630 { |
629 this._debuggerModel._globalObjectCleared(); | 631 this._debuggerModel._globalObjectCleared(); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 this._locations = []; | 805 this._locations = []; |
804 } | 806 } |
805 } | 807 } |
806 | 808 |
807 /** | 809 /** |
808 * @constructor | 810 * @constructor |
809 * @param {WebInspector.DebuggerModel} model | 811 * @param {WebInspector.DebuggerModel} model |
810 * @param {Array.<DebuggerAgent.CallFrame>} callFrames | 812 * @param {Array.<DebuggerAgent.CallFrame>} callFrames |
811 * @param {string} reason | 813 * @param {string} reason |
812 * @param {*} auxData | 814 * @param {*} auxData |
| 815 * @param {Array.<string>} breakpointIds |
813 */ | 816 */ |
814 WebInspector.DebuggerPausedDetails = function(model, callFrames, reason, auxData
) | 817 WebInspector.DebuggerPausedDetails = function(model, callFrames, reason, auxData
, breakpointIds) |
815 { | 818 { |
816 this.callFrames = []; | 819 this.callFrames = []; |
817 for (var i = 0; i < callFrames.length; ++i) { | 820 for (var i = 0; i < callFrames.length; ++i) { |
818 var callFrame = callFrames[i]; | 821 var callFrame = callFrames[i]; |
819 var script = model.scriptForId(callFrame.location.scriptId); | 822 var script = model.scriptForId(callFrame.location.scriptId); |
820 if (script) | 823 if (script) |
821 this.callFrames.push(new WebInspector.DebuggerModel.CallFrame(script
, callFrame)); | 824 this.callFrames.push(new WebInspector.DebuggerModel.CallFrame(script
, callFrame)); |
822 } | 825 } |
823 this.reason = reason; | 826 this.reason = reason; |
824 this.auxData = auxData; | 827 this.auxData = auxData; |
| 828 this.breakpointIds = breakpointIds; |
825 } | 829 } |
826 | 830 |
827 WebInspector.DebuggerPausedDetails.prototype = { | 831 WebInspector.DebuggerPausedDetails.prototype = { |
828 dispose: function() | 832 dispose: function() |
829 { | 833 { |
830 for (var i = 0; i < this.callFrames.length; ++i) { | 834 for (var i = 0; i < this.callFrames.length; ++i) { |
831 var callFrame = this.callFrames[i]; | 835 var callFrame = this.callFrames[i]; |
832 callFrame.dispose(); | 836 callFrame.dispose(); |
833 } | 837 } |
834 } | 838 } |
835 } | 839 } |
836 | 840 |
837 /** | 841 /** |
838 * @type {?WebInspector.DebuggerModel} | 842 * @type {?WebInspector.DebuggerModel} |
839 */ | 843 */ |
840 WebInspector.debuggerModel = null; | 844 WebInspector.debuggerModel = null; |
OLD | NEW |