| 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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 else | 722 else |
| 723 callback(this.target().runtimeModel.createRemoteObject(result),
!!wasThrown, undefined, exceptionDetails); | 723 callback(this.target().runtimeModel.createRemoteObject(result),
!!wasThrown, undefined, exceptionDetails); |
| 724 | 724 |
| 725 if (objectGroup === "console") | 725 if (objectGroup === "console") |
| 726 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.
ConsoleCommandEvaluatedInSelectedCallFrame); | 726 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.
ConsoleCommandEvaluatedInSelectedCallFrame); |
| 727 } | 727 } |
| 728 | 728 |
| 729 this.selectedCallFrame().evaluate(code, objectGroup, includeCommandLineA
PI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, didEva
luate.bind(this)); | 729 this.selectedCallFrame().evaluate(code, objectGroup, includeCommandLineA
PI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, didEva
luate.bind(this)); |
| 730 }, | 730 }, |
| 731 | 731 |
| 732 /** | |
| 733 * Handles notification from JavaScript VM about updated stack (liveedit or
frame restart action). | |
| 734 * @param {!Array.<!DebuggerAgent.CallFrame>=} newCallFrames | |
| 735 * @param {!Object=} details | |
| 736 * @param {!DebuggerAgent.StackTrace=} asyncStackTrace | |
| 737 */ | |
| 738 callStackModified: function(newCallFrames, details, asyncStackTrace) | |
| 739 { | |
| 740 // FIXME: declare this property in protocol and in JavaScript. | |
| 741 if (details && details["stack_update_needs_step_in"]) | |
| 742 this.stepInto(); | |
| 743 else if (newCallFrames && newCallFrames.length) | |
| 744 this._pausedScript(newCallFrames, this._debuggerPausedDetails.reason
, this._debuggerPausedDetails.auxData, this._debuggerPausedDetails.breakpointIds
, asyncStackTrace); | |
| 745 }, | |
| 746 | |
| 747 _applySkipStackFrameSettings: function() | 732 _applySkipStackFrameSettings: function() |
| 748 { | 733 { |
| 749 this._agent.skipStackFrames(WebInspector.moduleSetting("skipStackFramesP
attern").get(), WebInspector.moduleSetting("skipContentScripts").get()); | 734 this._agent.skipStackFrames(WebInspector.moduleSetting("skipStackFramesP
attern").get(), WebInspector.moduleSetting("skipContentScripts").get()); |
| 750 }, | 735 }, |
| 751 | 736 |
| 752 /** | 737 /** |
| 753 * @param {!WebInspector.RemoteObject} remoteObject | 738 * @param {!WebInspector.RemoteObject} remoteObject |
| 754 * @param {function(?WebInspector.DebuggerModel.FunctionDetails)} callback | 739 * @param {function(?WebInspector.DebuggerModel.FunctionDetails)} callback |
| 755 */ | 740 */ |
| 756 functionDetails: function(remoteObject, callback) | 741 functionDetails: function(remoteObject, callback) |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1274 }, | 1259 }, |
| 1275 | 1260 |
| 1276 /** | 1261 /** |
| 1277 * @param {function(?Protocol.Error=)=} callback | 1262 * @param {function(?Protocol.Error=)=} callback |
| 1278 */ | 1263 */ |
| 1279 restart: function(callback) | 1264 restart: function(callback) |
| 1280 { | 1265 { |
| 1281 /** | 1266 /** |
| 1282 * @param {?Protocol.Error} error | 1267 * @param {?Protocol.Error} error |
| 1283 * @param {!Array.<!DebuggerAgent.CallFrame>=} callFrames | 1268 * @param {!Array.<!DebuggerAgent.CallFrame>=} callFrames |
| 1284 * @param {!Object=} details | |
| 1285 * @param {!DebuggerAgent.StackTrace=} asyncStackTrace | 1269 * @param {!DebuggerAgent.StackTrace=} asyncStackTrace |
| 1286 * @this {WebInspector.DebuggerModel.CallFrame} | 1270 * @this {WebInspector.DebuggerModel.CallFrame} |
| 1287 */ | 1271 */ |
| 1288 function protocolCallback(error, callFrames, details, asyncStackTrace) | 1272 function protocolCallback(error, callFrames, asyncStackTrace) |
| 1289 { | 1273 { |
| 1290 if (!error) | 1274 if (!error) |
| 1291 this.debuggerModel.callStackModified(callFrames, details, asyncS
tackTrace); | 1275 this.debuggerModel.stepInto(); |
| 1292 if (callback) | 1276 if (callback) |
| 1293 callback(error); | 1277 callback(error); |
| 1294 } | 1278 } |
| 1295 this._debuggerAgent.restartFrame(this._payload.callFrameId, protocolCall
back.bind(this)); | 1279 this._debuggerAgent.restartFrame(this._payload.callFrameId, protocolCall
back.bind(this)); |
| 1296 }, | 1280 }, |
| 1297 | 1281 |
| 1298 /** | 1282 /** |
| 1299 * @param {function(!Object)} callback | 1283 * @param {function(!Object)} callback |
| 1300 */ | 1284 */ |
| 1301 variableNames: function(callback) | 1285 variableNames: function(callback) |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1454 /** | 1438 /** |
| 1455 * @param {?WebInspector.Target} target | 1439 * @param {?WebInspector.Target} target |
| 1456 * @return {?WebInspector.DebuggerModel} | 1440 * @return {?WebInspector.DebuggerModel} |
| 1457 */ | 1441 */ |
| 1458 WebInspector.DebuggerModel.fromTarget = function(target) | 1442 WebInspector.DebuggerModel.fromTarget = function(target) |
| 1459 { | 1443 { |
| 1460 if (!target || !target.hasJSContext()) | 1444 if (!target || !target.hasJSContext()) |
| 1461 return null; | 1445 return null; |
| 1462 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector
.DebuggerModel)); | 1446 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector
.DebuggerModel)); |
| 1463 } | 1447 } |
| OLD | NEW |