OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 /** @typedef {{ | |
6 type: string, | |
7 object: !Object, | |
8 name: (string|undefined), | |
9 startLocation: (!RawLocation|undefined), | |
10 endLocation: (!RawLocation|undefined) | |
11 }} */ | |
12 var Scope; | |
13 | |
14 /** @typedef {{ | |
15 scriptId: string, | |
16 lineNumber: number, | |
17 columnNumber: number | |
18 }} */ | |
19 var RawLocation; | |
20 | |
21 /** @typedef {{ | |
22 id: number, | |
23 name: string, | |
24 sourceURL: (string|undefined), | |
25 sourceMappingURL: (string|undefined), | |
26 source: string, | |
27 startLine: number, | |
28 endLine: number, | |
29 startColumn: number, | |
30 endColumn: number, | |
31 executionContextId: number, | |
32 executionContextAuxData: string | |
33 }} */ | |
34 var FormattedScript; | |
35 | |
36 /** @typedef {{ | |
37 functionName: string, | |
38 location: !RawLocation, | |
39 this: !Object, | |
40 scopeChain: !Array<!Scope>, | |
41 functionLocation: (RawLocation|undefined), | |
42 returnValue: (*|undefined) | |
43 }} */ | |
44 var JavaScriptCallFrameDetails; | |
45 | |
46 /** @typedef {{ | |
47 sourceID: function():(number|undefined), | |
48 line: function():number, | |
49 column: function():number, | |
50 thisObject: !Object, | |
51 evaluate: function(string):*, | |
52 restart: function():undefined, | |
53 setVariableValue: function(number, string, *):undefined, | |
54 isAtReturn: boolean, | |
55 details: function():!JavaScriptCallFrameDetails | |
56 }} */ | |
57 var JavaScriptCallFrame; | |
58 | |
59 /** @interface */ | |
60 function DebugClass() | |
61 { | |
62 /** @type {!LiveEditClass} */ | |
63 this.LiveEdit; | |
64 } | |
65 | |
66 DebugClass.prototype.setBreakOnException = function() {} | |
67 | |
68 DebugClass.prototype.clearBreakOnException = function() {} | |
69 | |
70 DebugClass.prototype.setBreakOnUncaughtException = function() {} | |
71 | |
72 DebugClass.prototype.clearBreakOnUncaughtException = function() {} | |
73 | |
74 DebugClass.prototype.clearStepping = function() {} | |
75 | |
76 DebugClass.prototype.clearAllBreakPoints = function() {} | |
77 | |
78 /** @return {!Array<!Script>} */ | |
79 DebugClass.prototype.scripts = function() {} | |
80 | |
81 /** | |
82 * @param {number} scriptId | |
83 * @param {number=} line | |
84 * @param {number=} column | |
85 * @param {string=} condition | |
86 * @param {string=} groupId | |
87 * @param {Debug.BreakPositionAlignment=} positionAlignment | |
88 */ | |
89 DebugClass.prototype.setScriptBreakPointById = function(scriptId, line, column,
condition, groupId, positionAlignment) {} | |
90 | |
91 /** | |
92 * @param {number} breakId | |
93 * @return {!Array<!SourceLocation>} | |
94 */ | |
95 DebugClass.prototype.findBreakPointActualLocations = function(breakId) {} | |
96 | |
97 /** | |
98 * @param {number} breakId | |
99 * @param {boolean} remove | |
100 * @return {!BreakPoint|undefined} | |
101 */ | |
102 DebugClass.prototype.findBreakPoint = function(breakId, remove) {} | |
103 | |
104 /** @return {!DebuggerFlags} */ | |
105 DebugClass.prototype.debuggerFlags = function() {} | |
106 | |
107 /** @type {!DebugClass} */ | |
108 var Debug; | |
109 | |
110 | |
111 /** @enum */ | |
112 Debug.BreakPositionAlignment = { | |
113 Statement: 0, | |
114 BreakPosition: 1 | |
115 }; | |
116 | |
117 /** @enum */ | |
118 Debug.StepAction = { StepOut: 0, | |
119 StepNext: 1, | |
120 StepIn: 2, | |
121 StepFrame: 3 }; | |
122 | |
123 /** @enum */ | |
124 Debug.ScriptCompilationType = { Host: 0, | |
125 Eval: 1, | |
126 JSON: 2 }; | |
127 | |
128 | |
129 /** @interface */ | |
130 function DebuggerFlag() {} | |
131 | |
132 /** @param {boolean} value */ | |
133 DebuggerFlag.prototype.setValue = function(value) {} | |
134 | |
135 | |
136 /** @interface */ | |
137 function DebuggerFlags() | |
138 { | |
139 /** @type {!DebuggerFlag} */ | |
140 this.breakPointsActive; | |
141 } | |
142 | |
143 | |
144 /** @interface */ | |
145 function LiveEditClass() {} | |
146 | |
147 /** | |
148 * @param {!Script} script | |
149 * @param {string} newSource | |
150 * @param {boolean} previewOnly | |
151 * @return {!{stack_modified: (boolean|undefined)}} | |
152 */ | |
153 LiveEditClass.prototype.SetScriptSource = function(script, newSource, previewOnl
y, change_log) {} | |
154 | |
155 | |
156 /** @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() {} | |
186 | |
187 /** @return {!BreakPoint|undefined} */ | |
188 BreakPoint.prototype.script_break_point = function() {} | |
189 | |
190 /** @return {number} */ | |
191 BreakPoint.prototype.number = function() {} | |
192 | |
193 | |
194 /** @interface */ | |
195 function CompileEvent() {} | |
196 | |
197 /** @return {!ScriptMirror} */ | |
198 CompileEvent.prototype.script = function() {} | |
199 | |
200 | |
201 /** @interface */ | |
202 function BreakEvent() {} | |
203 | |
204 /** @return {!Array<!BreakPoint>|undefined} */ | |
205 BreakEvent.prototype.breakPointsHit = function() {} | |
206 | |
207 | |
208 /** @interface */ | |
209 function ExecutionState() {} | |
210 | |
211 /** @param {!Debug.StepAction} action */ | |
212 ExecutionState.prototype.prepareStep = function(action) {} | |
213 | |
214 /** | |
215 * @param {string} source | |
216 * @param {boolean} disableBreak | |
217 * @param {*=} additionalContext | |
218 */ | |
219 ExecutionState.prototype.evaluateGlobal = function(source, disableBreak, additio
nalContext) {} | |
220 | |
221 /** @return {number} */ | |
222 ExecutionState.prototype.frameCount = function() {} | |
223 | |
224 /** | |
225 * @param {number} index | |
226 * @return {!FrameMirror} | |
227 */ | |
228 ExecutionState.prototype.frame = function(index) {} | |
229 | |
230 /** @param {number} index */ | |
231 ExecutionState.prototype.setSelectedFrame = function(index) {} | |
232 | |
233 /** @return {number} */ | |
234 ExecutionState.prototype.selectedFrame = function() {} | |
235 | |
236 | |
237 /** @enum */ | |
238 var ScopeType = { Global: 0, | |
239 Local: 1, | |
240 With: 2, | |
241 Closure: 3, | |
242 Catch: 4, | |
243 Block: 5, | |
244 Script: 6 }; | |
245 | |
246 | |
247 /** @interface */ | |
248 function SourceLocation() | |
249 { | |
250 /** @type {number} */ | |
251 this.script; | |
252 /** @type {number} */ | |
253 this.position; | |
254 /** @type {number} */ | |
255 this.line; | |
256 /** @type {number} */ | |
257 this.column; | |
258 /** @type {number} */ | |
259 this.start; | |
260 /** @type {number} */ | |
261 this.end; | |
262 } | |
263 | |
264 | |
265 /** @interface */ | |
266 function Script() | |
267 { | |
268 /** @type {number} */ | |
269 this.id; | |
270 /** @type {string|undefined} */ | |
271 this.context_data; | |
272 /** @type {string|undefined} */ | |
273 this.source_url; | |
274 /** @type {string|undefined} */ | |
275 this.source_mapping_url; | |
276 /** @type {boolean} */ | |
277 this.is_debugger_script; | |
278 /** @type {string} */ | |
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 | |
295 /** @interface */ | |
296 function ScopeDetails() {} | |
297 | |
298 /** @return {!Object} */ | |
299 ScopeDetails.prototype.object = function() {} | |
300 | |
301 /** @return {string|undefined} */ | |
302 ScopeDetails.prototype.name = function() {} | |
303 | |
304 | |
305 /** @interface */ | |
306 function FrameDetails() {} | |
307 | |
308 /** @return {!Object} */ | |
309 FrameDetails.prototype.receiver = function() {} | |
310 | |
311 /** @return {function()} */ | |
312 FrameDetails.prototype.func = function() {} | |
313 | |
314 /** @return {boolean} */ | |
315 FrameDetails.prototype.isAtReturn = function() {} | |
316 | |
317 /** @return {number} */ | |
318 FrameDetails.prototype.sourcePosition = function() {} | |
319 | |
320 /** @return {*} */ | |
321 FrameDetails.prototype.returnValue = function() {} | |
322 | |
323 /** @return {number} */ | |
324 FrameDetails.prototype.scopeCount = function() {} | |
325 | |
326 | |
327 /** @param {boolean} value */ | |
328 function ToggleMirrorCache(value) {} | |
329 | |
330 /** | |
331 * @param {*} value | |
332 * @param {boolean=} transient | |
333 * @return {!Mirror} | |
334 */ | |
335 function MakeMirror(value, transient) {} | |
336 | |
337 | |
338 /** @interface */ | |
339 function Mirror() {} | |
340 | |
341 /** @return {boolean} */ | |
342 Mirror.prototype.isFunction = function() {} | |
343 | |
344 /** @return {boolean} */ | |
345 Mirror.prototype.isGenerator = function() {} | |
346 | |
347 /** @return {boolean} */ | |
348 Mirror.prototype.isMap = function() {} | |
349 | |
350 /** @return {boolean} */ | |
351 Mirror.prototype.isSet = function() {} | |
352 | |
353 /** @return {boolean} */ | |
354 Mirror.prototype.isIterator = function() {} | |
355 | |
356 | |
357 /** | |
358 * @interface | |
359 * @extends {Mirror} | |
360 */ | |
361 function ObjectMirror() {} | |
362 | |
363 /** @return {!Array<!PropertyMirror>} */ | |
364 ObjectMirror.prototype.properties = function() {} | |
365 | |
366 | |
367 /** | |
368 * @interface | |
369 * @extends {ObjectMirror} | |
370 */ | |
371 function FunctionMirror () {} | |
372 | |
373 /** @return {number} */ | |
374 FunctionMirror.prototype.scopeCount = function() {} | |
375 | |
376 /** | |
377 * @param {number} index | |
378 * @return {!ScopeMirror|undefined} | |
379 */ | |
380 FunctionMirror.prototype.scope = function(index) {} | |
381 | |
382 /** @return {boolean} */ | |
383 FunctionMirror.prototype.resolved = function() {} | |
384 | |
385 /** @return {function()} */ | |
386 FunctionMirror.prototype.value = function() {} | |
387 | |
388 /** @return {string} */ | |
389 FunctionMirror.prototype.debugName = function() {} | |
390 | |
391 /** @return {!ScriptMirror|undefined} */ | |
392 FunctionMirror.prototype.script = function() {} | |
393 | |
394 /** @return {!SourceLocation|undefined} */ | |
395 FunctionMirror.prototype.sourceLocation = function() {} | |
396 | |
397 /** @return {!ContextMirror|undefined} */ | |
398 FunctionMirror.prototype.context = function() {} | |
399 | |
400 /** | |
401 * @constructor | |
402 * @param {*} value | |
403 */ | |
404 function UnresolvedFunctionMirror(value) {} | |
405 | |
406 | |
407 /** | |
408 * @interface | |
409 * @extends {ObjectMirror} | |
410 */ | |
411 function MapMirror () {} | |
412 | |
413 /** | |
414 * @param {number=} limit | |
415 * @return {!Array<!{key: *, value: *}>} | |
416 */ | |
417 MapMirror.prototype.entries = function(limit) {} | |
418 | |
419 | |
420 /** | |
421 * @interface | |
422 * @extends {ObjectMirror} | |
423 */ | |
424 function SetMirror () {} | |
425 | |
426 /** | |
427 * @param {number=} limit | |
428 * @return {!Array<*>} | |
429 */ | |
430 SetMirror.prototype.values = function(limit) {} | |
431 | |
432 | |
433 /** | |
434 * @interface | |
435 * @extends {ObjectMirror} | |
436 */ | |
437 function IteratorMirror () {} | |
438 | |
439 /** | |
440 * @param {number=} limit | |
441 * @return {!Array<*>} | |
442 */ | |
443 IteratorMirror.prototype.preview = function(limit) {} | |
444 | |
445 | |
446 /** | |
447 * @interface | |
448 * @extends {ObjectMirror} | |
449 */ | |
450 function GeneratorMirror () {} | |
451 | |
452 /** @return {string} */ | |
453 GeneratorMirror.prototype.status = function() {} | |
454 | |
455 /** @return {!SourceLocation|undefined} */ | |
456 GeneratorMirror.prototype.sourceLocation = function() {} | |
457 | |
458 /** @return {!FunctionMirror} */ | |
459 GeneratorMirror.prototype.func = function() {} | |
460 | |
461 | |
462 /** | |
463 * @interface | |
464 * @extends {Mirror} | |
465 */ | |
466 function PropertyMirror() | |
467 { | |
468 /** @type {*} */ | |
469 this.value_; | |
470 } | |
471 | |
472 /** @return {!Mirror} */ | |
473 PropertyMirror.prototype.value = function() {} | |
474 | |
475 /** @return {string} */ | |
476 PropertyMirror.prototype.name = function() {} | |
477 | |
478 | |
479 /** | |
480 * @interface | |
481 * @extends {Mirror} | |
482 */ | |
483 function FrameMirror() {} | |
484 | |
485 /** | |
486 * @param {boolean=} ignoreNestedScopes | |
487 * @return {!Array<!ScopeMirror>} | |
488 */ | |
489 FrameMirror.prototype.allScopes = function(ignoreNestedScopes) {} | |
490 | |
491 /** @return {!FrameDetails} */ | |
492 FrameMirror.prototype.details = function() {} | |
493 | |
494 /** | |
495 * @param {string} source | |
496 * @param {boolean} disableBreak | |
497 */ | |
498 FrameMirror.prototype.evaluate = function(source, disableBreak) {} | |
499 | |
500 FrameMirror.prototype.restart = function() {} | |
501 | |
502 /** @param {number} index */ | |
503 FrameMirror.prototype.scope = function(index) {} | |
504 | |
505 | |
506 /** | |
507 * @interface | |
508 * @extends {Mirror} | |
509 */ | |
510 function ScriptMirror() {} | |
511 | |
512 /** @return {!Script} */ | |
513 ScriptMirror.prototype.value = function() {} | |
514 | |
515 /** @return {number} */ | |
516 ScriptMirror.prototype.id = function() {} | |
517 | |
518 /** | |
519 * @param {number} position | |
520 * @param {boolean=} includeResourceOffset | |
521 */ | |
522 ScriptMirror.prototype.locationFromPosition = function(position, includeResource
Offset) {} | |
523 | |
524 | |
525 /** | |
526 * @interface | |
527 * @extends {Mirror} | |
528 */ | |
529 function ScopeMirror() {} | |
530 | |
531 /** @return {!ScopeDetails} */ | |
532 ScopeMirror.prototype.details = function() {} | |
533 | |
534 /** | |
535 * @param {string} name | |
536 * @param {*} newValue | |
537 */ | |
538 ScopeMirror.prototype.setVariableValue = function(name, newValue) {} | |
539 | |
540 /** | |
541 * @interface | |
542 * @extends {Mirror} | |
543 */ | |
544 function ContextMirror() {} | |
545 | |
546 /** @return {string|undefined} */ | |
547 ContextMirror.prototype.data = function() {} | |
OLD | NEW |