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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 */ | 604 */ |
605 selectedCallFrame: function() | 605 selectedCallFrame: function() |
606 { | 606 { |
607 return this._selectedCallFrame; | 607 return this._selectedCallFrame; |
608 }, | 608 }, |
609 | 609 |
610 /** | 610 /** |
611 * @param {string} code | 611 * @param {string} code |
612 * @param {string} objectGroup | 612 * @param {string} objectGroup |
613 * @param {boolean} includeCommandLineAPI | 613 * @param {boolean} includeCommandLineAPI |
614 * @param {boolean} doNotPauseOnExceptionsAndMuteConsole | 614 * @param {boolean} silent |
615 * @param {boolean} returnByValue | 615 * @param {boolean} returnByValue |
616 * @param {boolean} generatePreview | 616 * @param {boolean} generatePreview |
617 * @param {function(?WebInspector.RemoteObject, !RuntimeAgent.ExceptionDetai
ls=)} callback | 617 * @param {function(?WebInspector.RemoteObject, !RuntimeAgent.ExceptionDetai
ls=)} callback |
618 */ | 618 */ |
619 evaluateOnSelectedCallFrame: function(code, objectGroup, includeCommandLineA
PI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, callba
ck) | 619 evaluateOnSelectedCallFrame: function(code, objectGroup, includeCommandLineA
PI, silent, returnByValue, generatePreview, callback) |
620 { | 620 { |
621 /** | 621 /** |
622 * @param {?RuntimeAgent.RemoteObject} result | 622 * @param {?RuntimeAgent.RemoteObject} result |
623 * @param {!RuntimeAgent.ExceptionDetails=} exceptionDetails | 623 * @param {!RuntimeAgent.ExceptionDetails=} exceptionDetails |
624 * @this {WebInspector.DebuggerModel} | 624 * @this {WebInspector.DebuggerModel} |
625 */ | 625 */ |
626 function didEvaluate(result, exceptionDetails) | 626 function didEvaluate(result, exceptionDetails) |
627 { | 627 { |
628 if (!result) | 628 if (!result) |
629 callback(null); | 629 callback(null); |
630 else | 630 else |
631 callback(this.target().runtimeModel.createRemoteObject(result),
exceptionDetails); | 631 callback(this.target().runtimeModel.createRemoteObject(result),
exceptionDetails); |
632 } | 632 } |
633 | 633 |
634 this.selectedCallFrame().evaluate(code, objectGroup, includeCommandLineA
PI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, didEva
luate.bind(this)); | 634 this.selectedCallFrame().evaluate(code, objectGroup, includeCommandLineA
PI, silent, returnByValue, generatePreview, didEvaluate.bind(this)); |
635 }, | 635 }, |
636 | 636 |
637 /** | 637 /** |
638 * @param {!WebInspector.RemoteObject} remoteObject | 638 * @param {!WebInspector.RemoteObject} remoteObject |
639 * @return {!Promise<?WebInspector.DebuggerModel.FunctionDetails>} | 639 * @return {!Promise<?WebInspector.DebuggerModel.FunctionDetails>} |
640 */ | 640 */ |
641 functionDetailsPromise: function(remoteObject) | 641 functionDetailsPromise: function(remoteObject) |
642 { | 642 { |
643 return remoteObject.getAllPropertiesPromise(/* accessorPropertiesOnly */
false).then(buildDetails.bind(this)); | 643 return remoteObject.getAllPropertiesPromise(/* accessorPropertiesOnly */
false).then(buildDetails.bind(this)); |
644 | 644 |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1054 */ | 1054 */ |
1055 functionLocation: function() | 1055 functionLocation: function() |
1056 { | 1056 { |
1057 return this._functionLocation || null; | 1057 return this._functionLocation || null; |
1058 }, | 1058 }, |
1059 | 1059 |
1060 /** | 1060 /** |
1061 * @param {string} code | 1061 * @param {string} code |
1062 * @param {string} objectGroup | 1062 * @param {string} objectGroup |
1063 * @param {boolean} includeCommandLineAPI | 1063 * @param {boolean} includeCommandLineAPI |
1064 * @param {boolean} doNotPauseOnExceptionsAndMuteConsole | 1064 * @param {boolean} silent |
1065 * @param {boolean} returnByValue | 1065 * @param {boolean} returnByValue |
1066 * @param {boolean} generatePreview | 1066 * @param {boolean} generatePreview |
1067 * @param {function(?RuntimeAgent.RemoteObject, !RuntimeAgent.ExceptionDetai
ls=)} callback | 1067 * @param {function(?RuntimeAgent.RemoteObject, !RuntimeAgent.ExceptionDetai
ls=)} callback |
1068 */ | 1068 */ |
1069 evaluate: function(code, objectGroup, includeCommandLineAPI, doNotPauseOnExc
eptionsAndMuteConsole, returnByValue, generatePreview, callback) | 1069 evaluate: function(code, objectGroup, includeCommandLineAPI, silent, returnB
yValue, generatePreview, callback) |
1070 { | 1070 { |
1071 /** | 1071 /** |
1072 * @param {?Protocol.Error} error | 1072 * @param {?Protocol.Error} error |
1073 * @param {!RuntimeAgent.RemoteObject} result | 1073 * @param {!RuntimeAgent.RemoteObject} result |
1074 * @param {!RuntimeAgent.ExceptionDetails=} exceptionDetails | 1074 * @param {!RuntimeAgent.ExceptionDetails=} exceptionDetails |
1075 */ | 1075 */ |
1076 function didEvaluateOnCallFrame(error, result, exceptionDetails) | 1076 function didEvaluateOnCallFrame(error, result, exceptionDetails) |
1077 { | 1077 { |
1078 if (error) { | 1078 if (error) { |
1079 console.error(error); | 1079 console.error(error); |
1080 callback(null); | 1080 callback(null); |
1081 return; | 1081 return; |
1082 } | 1082 } |
1083 callback(result, exceptionDetails); | 1083 callback(result, exceptionDetails); |
1084 } | 1084 } |
1085 this._debuggerAgent.evaluateOnCallFrame(this._payload.callFrameId, code,
objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, retur
nByValue, generatePreview, didEvaluateOnCallFrame); | 1085 this._debuggerAgent.evaluateOnCallFrame(this._payload.callFrameId, code,
objectGroup, includeCommandLineAPI, silent, returnByValue, generatePreview, did
EvaluateOnCallFrame); |
1086 }, | 1086 }, |
1087 | 1087 |
1088 /** | 1088 /** |
1089 * @param {function(?Protocol.Error=)=} callback | 1089 * @param {function(?Protocol.Error=)=} callback |
1090 */ | 1090 */ |
1091 restart: function(callback) | 1091 restart: function(callback) |
1092 { | 1092 { |
1093 /** | 1093 /** |
1094 * @param {?Protocol.Error} error | 1094 * @param {?Protocol.Error} error |
1095 * @param {!Array.<!DebuggerAgent.CallFrame>=} callFrames | 1095 * @param {!Array.<!DebuggerAgent.CallFrame>=} callFrames |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 /** | 1270 /** |
1271 * @param {?WebInspector.Target} target | 1271 * @param {?WebInspector.Target} target |
1272 * @return {?WebInspector.DebuggerModel} | 1272 * @return {?WebInspector.DebuggerModel} |
1273 */ | 1273 */ |
1274 WebInspector.DebuggerModel.fromTarget = function(target) | 1274 WebInspector.DebuggerModel.fromTarget = function(target) |
1275 { | 1275 { |
1276 if (!target || !target.hasJSCapability()) | 1276 if (!target || !target.hasJSCapability()) |
1277 return null; | 1277 return null; |
1278 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector
.DebuggerModel)); | 1278 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector
.DebuggerModel)); |
1279 } | 1279 } |
OLD | NEW |