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 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
933 Call: 'call', | 933 Call: 'call', |
934 DebuggerStatement: 'debuggerStatement' | 934 DebuggerStatement: 'debuggerStatement' |
935 }; | 935 }; |
936 | 936 |
937 SDK.DebuggerEventTypes = { | 937 SDK.DebuggerEventTypes = { |
938 JavaScriptPause: 0, | 938 JavaScriptPause: 0, |
939 JavaScriptBreakpoint: 1, | 939 JavaScriptBreakpoint: 1, |
940 NativeBreakpoint: 2 | 940 NativeBreakpoint: 2 |
941 }; | 941 }; |
942 | 942 |
943 SDK.DebuggerModel.ContinueToLocationTargetCallFrames = { | |
944 Any: 'any', | |
945 Current: 'current' | |
946 }; | |
947 | |
943 /** | 948 /** |
944 * @implements {Protocol.DebuggerDispatcher} | 949 * @implements {Protocol.DebuggerDispatcher} |
945 * @unrestricted | 950 * @unrestricted |
946 */ | 951 */ |
947 SDK.DebuggerDispatcher = class { | 952 SDK.DebuggerDispatcher = class { |
948 /** | 953 /** |
949 * @param {!SDK.DebuggerModel} debuggerModel | 954 * @param {!SDK.DebuggerModel} debuggerModel |
950 */ | 955 */ |
951 constructor(debuggerModel) { | 956 constructor(debuggerModel) { |
952 this._debuggerModel = debuggerModel; | 957 this._debuggerModel = debuggerModel; |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1069 script() { | 1074 script() { |
1070 return this.debuggerModel.scriptForId(this.scriptId); | 1075 return this.debuggerModel.scriptForId(this.scriptId); |
1071 } | 1076 } |
1072 | 1077 |
1073 /** | 1078 /** |
1074 * @param {function()=} pausedCallback | 1079 * @param {function()=} pausedCallback |
1075 */ | 1080 */ |
1076 continueToLocation(pausedCallback) { | 1081 continueToLocation(pausedCallback) { |
1077 if (pausedCallback) | 1082 if (pausedCallback) |
1078 this.debuggerModel._continueToLocationCallback = this._paused.bind(this, p ausedCallback); | 1083 this.debuggerModel._continueToLocationCallback = this._paused.bind(this, p ausedCallback); |
1079 this.debuggerModel._agent.continueToLocation(this.payload()); | 1084 this.debuggerModel._agent.continueToLocation( |
1085 this.payload(), SDK.DebuggerModel.ContinueToLocationTargetCallFrames.Cur rent); | |
dgozman
2017/05/18 21:50:32
There is a Protocol.DebuggerAgent..... enum alread
kozy
2017/05/18 23:30:20
Acknowledged.
| |
1080 } | 1086 } |
1081 | 1087 |
1082 /** | 1088 /** |
1083 * @param {function()|undefined} pausedCallback | 1089 * @param {function()|undefined} pausedCallback |
1084 * @param {!SDK.DebuggerPausedDetails} debuggerPausedDetails | 1090 * @param {!SDK.DebuggerPausedDetails} debuggerPausedDetails |
1085 * @return {boolean} | 1091 * @return {boolean} |
1086 */ | 1092 */ |
1087 _paused(pausedCallback, debuggerPausedDetails) { | 1093 _paused(pausedCallback, debuggerPausedDetails) { |
1088 var location = debuggerPausedDetails.callFrames[0].location(); | 1094 var location = debuggerPausedDetails.callFrames[0].location(); |
1089 if (location.scriptId === this.scriptId && location.lineNumber === this.line Number && | 1095 if (location.scriptId === this.scriptId && location.lineNumber === this.line Number && |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1471 stack.callFrames.shift(); | 1477 stack.callFrames.shift(); |
1472 if (previous && (!stack.callFrames.length && !stack.promiseCreationFrame)) | 1478 if (previous && (!stack.callFrames.length && !stack.promiseCreationFrame)) |
1473 previous.parent = stack.parent; | 1479 previous.parent = stack.parent; |
1474 else | 1480 else |
1475 previous = stack; | 1481 previous = stack; |
1476 stack = stack.parent; | 1482 stack = stack.parent; |
1477 } | 1483 } |
1478 return asyncStackTrace; | 1484 return asyncStackTrace; |
1479 } | 1485 } |
1480 }; | 1486 }; |
OLD | NEW |