OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 */ | 899 */ |
900 restartFrame: function(topCallFrame, callFrameId) | 900 restartFrame: function(topCallFrame, callFrameId) |
901 { | 901 { |
902 var callFrame = this._callFrameForId(topCallFrame, callFrameId); | 902 var callFrame = this._callFrameForId(topCallFrame, callFrameId); |
903 if (!callFrame) | 903 if (!callFrame) |
904 return "Could not find call frame with given id"; | 904 return "Could not find call frame with given id"; |
905 return callFrame.restart(); | 905 return callFrame.restart(); |
906 }, | 906 }, |
907 | 907 |
908 /** | 908 /** |
909 * @param {!JavaScriptCallFrame} topCallFrame | |
910 * @param {string} callFrameId | |
911 * @return {*} a stepIn position array ready for protocol JSON or a string e
rror | |
912 */ | |
913 getStepInPositions: function(topCallFrame, callFrameId) | |
914 { | |
915 var callFrame = this._callFrameForId(topCallFrame, callFrameId); | |
916 if (!callFrame) | |
917 return "Could not find call frame with given id"; | |
918 var stepInPositionsUnpacked = JSON.parse(callFrame.stepInPositions); | |
919 if (typeof stepInPositionsUnpacked !== "object") | |
920 return "Step in positions not available"; | |
921 return stepInPositionsUnpacked; | |
922 }, | |
923 | |
924 /** | |
925 * Either callFrameId or functionObjectId must be specified. | 909 * Either callFrameId or functionObjectId must be specified. |
926 * @param {!JavaScriptCallFrame} topCallFrame | 910 * @param {!JavaScriptCallFrame} topCallFrame |
927 * @param {string|boolean} callFrameId or false | 911 * @param {string|boolean} callFrameId or false |
928 * @param {string|boolean} functionObjectId or false | 912 * @param {string|boolean} functionObjectId or false |
929 * @param {number} scopeNumber | 913 * @param {number} scopeNumber |
930 * @param {string} variableName | 914 * @param {string} variableName |
931 * @param {string} newValueJsonString RuntimeAgent.CallArgument structure se
rialized as string | 915 * @param {string} newValueJsonString RuntimeAgent.CallArgument structure se
rialized as string |
932 * @return {string|undefined} undefined if success or an error message | 916 * @return {string|undefined} undefined if success or an error message |
933 */ | 917 */ |
934 setVariableValue: function(topCallFrame, callFrameId, functionObjectId, scop
eNumber, variableName, newValueJsonString) | 918 setVariableValue: function(topCallFrame, callFrameId, functionObjectId, scop
eNumber, variableName, newValueJsonString) |
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1910 */ | 1894 */ |
1911 _logEvent: function(event) | 1895 _logEvent: function(event) |
1912 { | 1896 { |
1913 inspectedGlobalObject.console.log(event.type, event); | 1897 inspectedGlobalObject.console.log(event.type, event); |
1914 } | 1898 } |
1915 } | 1899 } |
1916 | 1900 |
1917 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); | 1901 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); |
1918 return injectedScript; | 1902 return injectedScript; |
1919 }) | 1903 }) |
OLD | NEW |