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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 return this._selectedCallFrame; | 609 return this._selectedCallFrame; |
610 }, | 610 }, |
611 | 611 |
612 /** | 612 /** |
613 * @param {string} code | 613 * @param {string} code |
614 * @param {string} objectGroup | 614 * @param {string} objectGroup |
615 * @param {boolean} includeCommandLineAPI | 615 * @param {boolean} includeCommandLineAPI |
616 * @param {boolean} doNotPauseOnExceptionsAndMuteConsole | 616 * @param {boolean} doNotPauseOnExceptionsAndMuteConsole |
617 * @param {boolean} returnByValue | 617 * @param {boolean} returnByValue |
618 * @param {boolean} generatePreview | 618 * @param {boolean} generatePreview |
619 * @param {function(?WebInspector.RemoteObject, boolean, ?RuntimeAgent.Remot
eObject=)} callback | 619 * @param {function(?WebInspector.RemoteObject, boolean, ?RuntimeAgent.Remot
eObject=, ?DebuggerAgent.ExceptionDetails=)} callback |
620 */ | 620 */ |
621 evaluateOnSelectedCallFrame: function(code, objectGroup, includeCommandLineA
PI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, callba
ck) | 621 evaluateOnSelectedCallFrame: function(code, objectGroup, includeCommandLineA
PI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, callba
ck) |
622 { | 622 { |
623 /** | 623 /** |
624 * @param {?RuntimeAgent.RemoteObject} result | 624 * @param {?RuntimeAgent.RemoteObject} result |
625 * @param {boolean=} wasThrown | 625 * @param {boolean=} wasThrown |
| 626 * @param {?DebuggerAgent.ExceptionDetails=} exceptionDetails |
626 * @this {WebInspector.DebuggerModel} | 627 * @this {WebInspector.DebuggerModel} |
627 */ | 628 */ |
628 function didEvaluate(result, wasThrown) | 629 function didEvaluate(result, wasThrown, exceptionDetails) |
629 { | 630 { |
630 if (!result) | 631 if (!result) |
631 callback(null, false); | 632 callback(null, false); |
632 else if (returnByValue) | 633 else if (returnByValue) |
633 callback(null, !!wasThrown, wasThrown ? null : result); | 634 callback(null, !!wasThrown, wasThrown ? null : result, exception
Details); |
634 else | 635 else |
635 callback(this.target().runtimeModel.createRemoteObject(result),
!!wasThrown); | 636 callback(this.target().runtimeModel.createRemoteObject(result),
!!wasThrown, undefined, exceptionDetails); |
636 | 637 |
637 if (objectGroup === "console") | 638 if (objectGroup === "console") |
638 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.
ConsoleCommandEvaluatedInSelectedCallFrame); | 639 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.
ConsoleCommandEvaluatedInSelectedCallFrame); |
639 } | 640 } |
640 | 641 |
641 this.selectedCallFrame().evaluate(code, objectGroup, includeCommandLineA
PI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, didEva
luate.bind(this)); | 642 this.selectedCallFrame().evaluate(code, objectGroup, includeCommandLineA
PI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, didEva
luate.bind(this)); |
642 }, | 643 }, |
643 | 644 |
644 /** | 645 /** |
645 * @param {function(!Object)} callback | 646 * @param {function(!Object)} callback |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 return !!this._isAsync; | 1047 return !!this._isAsync; |
1047 }, | 1048 }, |
1048 | 1049 |
1049 /** | 1050 /** |
1050 * @param {string} code | 1051 * @param {string} code |
1051 * @param {string} objectGroup | 1052 * @param {string} objectGroup |
1052 * @param {boolean} includeCommandLineAPI | 1053 * @param {boolean} includeCommandLineAPI |
1053 * @param {boolean} doNotPauseOnExceptionsAndMuteConsole | 1054 * @param {boolean} doNotPauseOnExceptionsAndMuteConsole |
1054 * @param {boolean} returnByValue | 1055 * @param {boolean} returnByValue |
1055 * @param {boolean} generatePreview | 1056 * @param {boolean} generatePreview |
1056 * @param {function(?RuntimeAgent.RemoteObject, boolean=)=} callback | 1057 * @param {function(?RuntimeAgent.RemoteObject, boolean=, ?DebuggerAgent.Exc
eptionDetails=)} callback |
1057 */ | 1058 */ |
1058 evaluate: function(code, objectGroup, includeCommandLineAPI, doNotPauseOnExc
eptionsAndMuteConsole, returnByValue, generatePreview, callback) | 1059 evaluate: function(code, objectGroup, includeCommandLineAPI, doNotPauseOnExc
eptionsAndMuteConsole, returnByValue, generatePreview, callback) |
1059 { | 1060 { |
1060 /** | 1061 /** |
1061 * @param {?Protocol.Error} error | 1062 * @param {?Protocol.Error} error |
1062 * @param {!RuntimeAgent.RemoteObject} result | 1063 * @param {!RuntimeAgent.RemoteObject} result |
1063 * @param {boolean=} wasThrown | 1064 * @param {boolean=} wasThrown |
| 1065 * @param {?DebuggerAgent.ExceptionDetails=} exceptionDetails |
1064 */ | 1066 */ |
1065 function didEvaluateOnCallFrame(error, result, wasThrown) | 1067 function didEvaluateOnCallFrame(error, result, wasThrown, exceptionDetai
ls) |
1066 { | 1068 { |
1067 if (error) { | 1069 if (error) { |
1068 console.error(error); | 1070 console.error(error); |
1069 callback(null, false); | 1071 callback(null, false); |
1070 return; | 1072 return; |
1071 } | 1073 } |
1072 callback(result, wasThrown); | 1074 callback(result, wasThrown, exceptionDetails); |
1073 } | 1075 } |
1074 this._debuggerAgent.evaluateOnCallFrame(this._payload.callFrameId, code,
objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, retur
nByValue, generatePreview, didEvaluateOnCallFrame); | 1076 this._debuggerAgent.evaluateOnCallFrame(this._payload.callFrameId, code,
objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, retur
nByValue, generatePreview, didEvaluateOnCallFrame); |
1075 }, | 1077 }, |
1076 | 1078 |
1077 /** | 1079 /** |
1078 * @param {function(?Protocol.Error=)=} callback | 1080 * @param {function(?Protocol.Error=)=} callback |
1079 */ | 1081 */ |
1080 restart: function(callback) | 1082 restart: function(callback) |
1081 { | 1083 { |
1082 /** | 1084 /** |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 this.asyncStackTrace.dispose(); | 1198 this.asyncStackTrace.dispose(); |
1197 }, | 1199 }, |
1198 | 1200 |
1199 __proto__: WebInspector.SDKObject.prototype | 1201 __proto__: WebInspector.SDKObject.prototype |
1200 } | 1202 } |
1201 | 1203 |
1202 /** | 1204 /** |
1203 * @type {!WebInspector.DebuggerModel} | 1205 * @type {!WebInspector.DebuggerModel} |
1204 */ | 1206 */ |
1205 WebInspector.debuggerModel; | 1207 WebInspector.debuggerModel; |
OLD | NEW |