Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** @typedef {{ | 5 /** @typedef {{ |
| 6 type: string, | 6 type: string, |
| 7 object: !Object, | 7 object: !Object, |
| 8 name: (string|undefined), | 8 name: (string|undefined), |
| 9 startLocation: (!RawLocation|undefined), | 9 startLocation: (!RawLocation|undefined), |
| 10 endLocation: (!RawLocation|undefined) | 10 endLocation: (!RawLocation|undefined) |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 column: function():number, | 49 column: function():number, |
| 50 thisObject: !Object, | 50 thisObject: !Object, |
| 51 evaluate: function(string):*, | 51 evaluate: function(string):*, |
| 52 restart: function():undefined, | 52 restart: function():undefined, |
| 53 setVariableValue: function(number, string, *):undefined, | 53 setVariableValue: function(number, string, *):undefined, |
| 54 isAtReturn: boolean, | 54 isAtReturn: boolean, |
| 55 details: function():!JavaScriptCallFrameDetails | 55 details: function():!JavaScriptCallFrameDetails |
| 56 }} */ | 56 }} */ |
| 57 var JavaScriptCallFrame; | 57 var JavaScriptCallFrame; |
| 58 | 58 |
| 59 /** @interface */ | 59 /** |
| 60 function DebugClass() | 60 * @const |
| 61 { | 61 */ |
| 62 /** @type {!LiveEditClass} */ | 62 var Debug = {}; |
| 63 this.LiveEdit; | |
| 64 } | |
| 65 | 63 |
| 66 DebugClass.prototype.setBreakOnException = function() {} | 64 Debug.setBreakOnException = function() {} |
| 67 | 65 |
| 68 DebugClass.prototype.clearBreakOnException = function() {} | 66 Debug.clearBreakOnException = function() {} |
| 69 | 67 |
| 70 DebugClass.prototype.setBreakOnUncaughtException = function() {} | 68 Debug.setBreakOnUncaughtException = function() {} |
| 71 | 69 |
| 72 DebugClass.prototype.clearBreakOnUncaughtException = function() {} | 70 /** |
| 71 * @return {undefined} | |
| 72 */ | |
| 73 Debug.clearBreakOnUncaughtException = function() {} | |
| 73 | 74 |
| 74 DebugClass.prototype.clearStepping = function() {} | 75 Debug.clearStepping = function() {} |
| 75 | 76 |
| 76 DebugClass.prototype.clearAllBreakPoints = function() {} | 77 Debug.clearAllBreakPoints = function() {} |
| 77 | 78 |
| 78 /** @return {!Array<!Script>} */ | 79 /** @return {!Array<!Script>} */ |
| 79 DebugClass.prototype.scripts = function() {} | 80 Debug.scripts = function() {} |
| 80 | 81 |
| 81 /** | 82 /** |
| 82 * @param {number} scriptId | 83 * @param {number} scriptId |
| 83 * @param {number=} line | 84 * @param {number=} line |
| 84 * @param {number=} column | 85 * @param {number=} column |
| 85 * @param {string=} condition | 86 * @param {string=} condition |
| 86 * @param {string=} groupId | 87 * @param {string=} groupId |
| 87 * @param {Debug.BreakPositionAlignment=} positionAlignment | 88 * @param {Debug.BreakPositionAlignment=} positionAlignment |
| 88 */ | 89 */ |
| 89 DebugClass.prototype.setScriptBreakPointById = function(scriptId, line, column, condition, groupId, positionAlignment) {} | 90 Debug.setScriptBreakPointById = function(scriptId, line, column, condition, grou pId, positionAlignment) {} |
| 90 | 91 |
| 91 /** | 92 /** |
| 92 * @param {number} breakId | 93 * @param {number} breakId |
| 93 * @return {!Array<!SourceLocation>} | 94 * @return {!Array<!SourceLocation>} |
| 94 */ | 95 */ |
| 95 DebugClass.prototype.findBreakPointActualLocations = function(breakId) {} | 96 Debug.findBreakPointActualLocations = function(breakId) {} |
| 96 | 97 |
| 97 /** | 98 /** |
| 98 * @param {number} breakId | 99 * @param {number} breakId |
| 99 * @param {boolean} remove | 100 * @param {boolean} remove |
| 100 * @return {!BreakPoint|undefined} | 101 * @return {!BreakPoint|undefined} |
| 101 */ | 102 */ |
| 102 DebugClass.prototype.findBreakPoint = function(breakId, remove) {} | 103 Debug.findBreakPoint = function(breakId, remove) {} |
| 103 | 104 |
| 104 /** @return {!DebuggerFlags} */ | 105 /** @return {!DebuggerFlags} */ |
| 105 DebugClass.prototype.debuggerFlags = function() {} | 106 Debug.debuggerFlags = function() {} |
| 106 | |
| 107 /** @type {!DebugClass} */ | |
| 108 var Debug; | |
| 109 | 107 |
| 110 | 108 |
| 111 /** @enum */ | 109 /** @enum */ |
| 112 Debug.BreakPositionAlignment = { | 110 const BreakPositionAlignment = { |
| 113 Statement: 0, | 111 Statement: 0, |
| 114 BreakPosition: 1 | 112 BreakPosition: 1 |
| 115 }; | 113 }; |
| 114 Debug.BreakPositionAlignment = BreakPositionAlignment; | |
| 116 | 115 |
| 117 /** @enum */ | 116 /** @enum */ |
| 118 Debug.StepAction = { StepOut: 0, | 117 Debug.StepAction = { StepOut: 0, |
| 119 StepNext: 1, | 118 StepNext: 1, |
| 120 StepIn: 2, | 119 StepIn: 2, |
| 121 StepFrame: 3 }; | 120 StepFrame: 3 }; |
| 122 | 121 |
| 123 /** @enum */ | 122 /** @enum */ |
| 124 Debug.ScriptCompilationType = { Host: 0, | 123 var ScriptCompilationType = { Host: 0, |
|
dgozman
2016/09/22 16:50:00
const?
kozy
2016/09/23 20:22:46
Done.
| |
| 125 Eval: 1, | 124 Eval: 1, |
| 126 JSON: 2 }; | 125 JSON: 2 }; |
| 126 Debug.ScriptCompilationType = ScriptCompilationType; | |
| 127 | 127 |
| 128 | 128 |
| 129 /** @interface */ | 129 /** @interface */ |
| 130 function DebuggerFlag() {} | 130 function DebuggerFlag() {} |
| 131 | 131 |
| 132 /** @param {boolean} value */ | 132 /** @param {boolean} value */ |
| 133 DebuggerFlag.prototype.setValue = function(value) {} | 133 DebuggerFlag.prototype.setValue = function(value) {} |
| 134 | 134 |
| 135 | 135 |
| 136 /** @interface */ | 136 /** @typedef {{ |
| 137 function DebuggerFlags() | 137 * breakPointsActive: !DebuggerFlag |
| 138 { | 138 * }} |
| 139 /** @type {!DebuggerFlag} */ | 139 */ |
| 140 this.breakPointsActive; | 140 var DebuggerFlags; |
| 141 } | |
| 142 | 141 |
| 143 | 142 /** @const */ |
| 144 /** @interface */ | 143 var LiveEdit = {} |
| 145 function LiveEditClass() {} | |
| 146 | 144 |
| 147 /** | 145 /** |
| 148 * @param {!Script} script | 146 * @param {!Script} script |
| 149 * @param {string} newSource | 147 * @param {string} newSource |
| 150 * @param {boolean} previewOnly | 148 * @param {boolean} previewOnly |
| 151 * @return {!{stack_modified: (boolean|undefined)}} | 149 * @return {!{stack_modified: (boolean|undefined)}} |
| 152 */ | 150 */ |
| 153 LiveEditClass.prototype.SetScriptSource = function(script, newSource, previewOnl y, change_log) {} | 151 LiveEdit.SetScriptSource = function(script, newSource, previewOnly, change_log) {} |
| 152 | |
| 153 /** @constructor */ | |
| 154 function Failure() {} | |
| 155 LiveEdit.Failure = Failure; | |
| 156 | |
| 157 Debug.LiveEdit = LiveEdit; | |
| 158 | |
| 159 /** @typedef {{ | |
| 160 * type: string, | |
| 161 * syntaxErrorMessage: string, | |
| 162 * position: !{start: !{line: number, column: number}}, | |
| 163 * }} | |
| 164 */ | |
| 165 var LiveEditErrorDetails; | |
| 166 | |
| 167 /** @typedef {{ | |
| 168 * breakpointId: number, | |
| 169 * sourceID: number, | |
| 170 * lineNumber: (number|undefined), | |
| 171 * columnNumber: (number|undefined), | |
| 172 * condition: (string|undefined), | |
| 173 * interstatementLocation: (boolean|undefined), | |
| 174 * }} | |
| 175 */ | |
| 176 var BreakpointInfo; | |
| 154 | 177 |
| 155 | 178 |
| 156 /** @interface */ | 179 /** @interface */ |
| 157 function LiveEditErrorDetails() | |
| 158 { | |
| 159 /** @type {string} */ | |
| 160 this.syntaxErrorMessage; | |
| 161 /** @type {!{start: !{line: number, column: number}}} */ | |
| 162 this.position; | |
| 163 } | |
| 164 | |
| 165 | |
| 166 /** @interface */ | |
| 167 function BreakpointInfo() | |
| 168 { | |
| 169 /** @type {number} */ | |
| 170 this.breakpointId; | |
| 171 /** @type {number} */ | |
| 172 this.sourceID; | |
| 173 /** @type {number|undefined} */ | |
| 174 this.lineNumber; | |
| 175 /** @type {number|undefined} */ | |
| 176 this.columnNumber; | |
| 177 /** @type {string|undefined} */ | |
| 178 this.condition; | |
| 179 /** @type {boolean|undefined} */ | |
| 180 this.interstatementLocation; | |
| 181 } | |
| 182 | |
| 183 | |
| 184 /** @interface */ | |
| 185 function BreakPoint() {} | 180 function BreakPoint() {} |
| 186 | 181 |
| 187 /** @return {!BreakPoint|undefined} */ | 182 /** @return {!BreakPoint|undefined} */ |
| 188 BreakPoint.prototype.script_break_point = function() {} | 183 BreakPoint.prototype.script_break_point = function() {} |
| 189 | 184 |
| 190 /** @return {number} */ | 185 /** @return {number} */ |
| 191 BreakPoint.prototype.number = function() {} | 186 BreakPoint.prototype.number = function() {} |
| 192 | 187 |
| 193 | 188 |
| 194 /** @interface */ | 189 /** @interface */ |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 237 /** @enum */ | 232 /** @enum */ |
| 238 var ScopeType = { Global: 0, | 233 var ScopeType = { Global: 0, |
| 239 Local: 1, | 234 Local: 1, |
| 240 With: 2, | 235 With: 2, |
| 241 Closure: 3, | 236 Closure: 3, |
| 242 Catch: 4, | 237 Catch: 4, |
| 243 Block: 5, | 238 Block: 5, |
| 244 Script: 6 }; | 239 Script: 6 }; |
| 245 | 240 |
| 246 | 241 |
| 247 /** @interface */ | 242 /** @typedef {{ |
| 248 function SourceLocation() | 243 * script: number, |
| 249 { | 244 * position: number, |
| 250 /** @type {number} */ | 245 * line: number, |
| 251 this.script; | 246 * column:number, |
| 252 /** @type {number} */ | 247 * start: number, |
| 253 this.position; | 248 * end: number, |
| 254 /** @type {number} */ | 249 * }} |
| 255 this.line; | 250 */ |
| 256 /** @type {number} */ | 251 var SourceLocation; |
| 257 this.column; | |
| 258 /** @type {number} */ | |
| 259 this.start; | |
| 260 /** @type {number} */ | |
| 261 this.end; | |
| 262 } | |
| 263 | 252 |
| 264 | 253 /** @typedef{{ |
| 265 /** @interface */ | 254 * id: number, |
| 266 function Script() | 255 * context_data: (string|undefined), |
| 267 { | 256 * source_url: (string|undefined), |
| 268 /** @type {number} */ | 257 * source_mapping_url: (string|undefined), |
| 269 this.id; | 258 * is_debugger_script: boolean, |
| 270 /** @type {string|undefined} */ | 259 * source: string, |
| 271 this.context_data; | 260 * line_ends: !Array<number>, |
| 272 /** @type {string|undefined} */ | 261 * line_offset: number, |
| 273 this.source_url; | 262 * column_offset: number, |
| 274 /** @type {string|undefined} */ | 263 * nameOrSourceURL: function():string, |
| 275 this.source_mapping_url; | 264 * compilationType: function():!ScriptCompilationType, |
| 276 /** @type {boolean} */ | 265 * }} |
| 277 this.is_debugger_script; | 266 */ |
| 278 /** @type {string} */ | 267 var Script; |
| 279 this.source; | |
| 280 /** @type {!Array<number>} */ | |
| 281 this.line_ends; | |
| 282 /** @type {number} */ | |
| 283 this.line_offset; | |
| 284 /** @type {number} */ | |
| 285 this.column_offset; | |
| 286 } | |
| 287 | |
| 288 /** @return {string} */ | |
| 289 Script.prototype.nameOrSourceURL = function() {} | |
| 290 | |
| 291 /** @return {!Debug.ScriptCompilationType} */ | |
| 292 Script.prototype.compilationType = function() {} | |
| 293 | |
| 294 | 268 |
| 295 /** @interface */ | 269 /** @interface */ |
| 296 function ScopeDetails() {} | 270 function ScopeDetails() {} |
| 297 | 271 |
| 298 /** @return {!Object} */ | 272 /** @return {!Object} */ |
| 299 ScopeDetails.prototype.object = function() {} | 273 ScopeDetails.prototype.object = function() {} |
| 300 | 274 |
| 301 /** @return {string|undefined} */ | 275 /** @return {string|undefined} */ |
| 302 ScopeDetails.prototype.name = function() {} | 276 ScopeDetails.prototype.name = function() {} |
| 303 | 277 |
| 278 /** @return {number} */ | |
| 279 ScopeDetails.prototype.type = function() {} | |
| 280 | |
| 304 | 281 |
| 305 /** @interface */ | 282 /** @interface */ |
| 306 function FrameDetails() {} | 283 function FrameDetails() {} |
| 307 | 284 |
| 308 /** @return {!Object} */ | 285 /** @return {!Object} */ |
| 309 FrameDetails.prototype.receiver = function() {} | 286 FrameDetails.prototype.receiver = function() {} |
| 310 | 287 |
| 311 /** @return {function()} */ | 288 /** @return {function()} */ |
| 312 FrameDetails.prototype.func = function() {} | 289 FrameDetails.prototype.func = function() {} |
| 313 | 290 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 456 GeneratorMirror.prototype.sourceLocation = function() {} | 433 GeneratorMirror.prototype.sourceLocation = function() {} |
| 457 | 434 |
| 458 /** @return {!FunctionMirror} */ | 435 /** @return {!FunctionMirror} */ |
| 459 GeneratorMirror.prototype.func = function() {} | 436 GeneratorMirror.prototype.func = function() {} |
| 460 | 437 |
| 461 | 438 |
| 462 /** | 439 /** |
| 463 * @interface | 440 * @interface |
| 464 * @extends {Mirror} | 441 * @extends {Mirror} |
| 465 */ | 442 */ |
| 466 function PropertyMirror() | 443 function PropertyMirror() {} |
| 467 { | |
| 468 /** @type {*} */ | |
| 469 this.value_; | |
| 470 } | |
| 471 | 444 |
| 472 /** @return {!Mirror} */ | 445 /** @return {!Mirror} */ |
| 473 PropertyMirror.prototype.value = function() {} | 446 PropertyMirror.prototype.value = function() {} |
| 474 | 447 |
| 475 /** @return {string} */ | 448 /** @return {string} */ |
| 476 PropertyMirror.prototype.name = function() {} | 449 PropertyMirror.prototype.name = function() {} |
| 477 | 450 |
| 451 /** @type {*} */ | |
| 452 PropertyMirror.prototype.value_; | |
| 478 | 453 |
| 479 /** | 454 /** |
| 480 * @interface | 455 * @interface |
| 481 * @extends {Mirror} | 456 * @extends {Mirror} |
| 482 */ | 457 */ |
| 483 function FrameMirror() {} | 458 function FrameMirror() {} |
| 484 | 459 |
| 485 /** | 460 /** |
| 486 * @param {boolean=} ignoreNestedScopes | 461 * @param {boolean=} ignoreNestedScopes |
| 487 * @return {!Array<!ScopeMirror>} | 462 * @return {!Array<!ScopeMirror>} |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 538 ScopeMirror.prototype.setVariableValue = function(name, newValue) {} | 513 ScopeMirror.prototype.setVariableValue = function(name, newValue) {} |
| 539 | 514 |
| 540 /** | 515 /** |
| 541 * @interface | 516 * @interface |
| 542 * @extends {Mirror} | 517 * @extends {Mirror} |
| 543 */ | 518 */ |
| 544 function ContextMirror() {} | 519 function ContextMirror() {} |
| 545 | 520 |
| 546 /** @return {string|undefined} */ | 521 /** @return {string|undefined} */ |
| 547 ContextMirror.prototype.data = function() {} | 522 ContextMirror.prototype.data = function() {} |
| OLD | NEW |