@@ -192,7 +192,7 @@ export class JerryDebugProtocolHandler {
192
192
}
193
193
194
194
// FIXME: this lets test suite run for now
195
- unused ( ) {
195
+ public unused ( ) : void {
196
196
// tslint:disable-next-line no-unused-expression
197
197
this . lastBreakpointExact ;
198
198
}
@@ -220,7 +220,7 @@ export class JerryDebugProtocolHandler {
220
220
return this . resumeExec ( SP . CLIENT . JERRY_DEBUGGER_CONTINUE ) ;
221
221
}
222
222
223
- getPossibleBreakpoints ( scriptId : number , startLine : number , endLine ?: number ) : Array < Breakpoint > {
223
+ public getPossibleBreakpoints ( scriptId : number , startLine : number , endLine ?: number ) : Array < Breakpoint > {
224
224
const array = [ ] ;
225
225
const lineList = this . lineLists [ scriptId ] ;
226
226
for ( const line in lineList ) {
@@ -236,18 +236,18 @@ export class JerryDebugProtocolHandler {
236
236
return array ;
237
237
}
238
238
239
- getSource ( scriptId : number ) {
239
+ public getSource ( scriptId : number ) : string {
240
240
if ( scriptId < this . sources . length ) {
241
241
return this . sources [ scriptId ] . source || '' ;
242
242
}
243
243
return '' ;
244
244
}
245
245
246
- decodeMessage ( format : string , message : Uint8Array , offset : number ) {
246
+ public decodeMessage ( format : string , message : Uint8Array , offset : number ) : any {
247
247
return decodeMessage ( this . byteConfig , format , message , offset ) ;
248
248
}
249
249
250
- onConfiguration ( data : Uint8Array ) {
250
+ public onConfiguration ( data : Uint8Array ) : void {
251
251
this . logPacket ( 'Configuration' ) ;
252
252
if ( data . length < 5 ) {
253
253
this . abort ( 'configuration message wrong size' ) ;
@@ -268,7 +268,7 @@ export class JerryDebugProtocolHandler {
268
268
}
269
269
}
270
270
271
- onByteCodeCP ( data : Uint8Array ) {
271
+ public onByteCodeCP ( data : Uint8Array ) : void {
272
272
this . logPacket ( 'Byte Code CP' , true ) ;
273
273
if ( this . evalsPending ) {
274
274
return ;
@@ -313,7 +313,7 @@ export class JerryDebugProtocolHandler {
313
313
this . newFunctions = { } ;
314
314
}
315
315
316
- onParseFunction ( data : Uint8Array ) {
316
+ public onParseFunction ( data : Uint8Array ) : void {
317
317
this . logPacket ( 'Parse Function' ) ;
318
318
const position = this . decodeMessage ( 'II' , data , 1 ) ;
319
319
this . stack . push ( {
@@ -331,7 +331,7 @@ export class JerryDebugProtocolHandler {
331
331
return ;
332
332
}
333
333
334
- onBreakpointList ( data : Uint8Array ) {
334
+ public onBreakpointList ( data : Uint8Array ) : void {
335
335
this . logPacket ( 'Breakpoint List' , true ) ;
336
336
if ( this . evalsPending ) {
337
337
return ;
@@ -354,7 +354,7 @@ export class JerryDebugProtocolHandler {
354
354
}
355
355
}
356
356
357
- onSourceCode ( data : Uint8Array ) {
357
+ public onSourceCode ( data : Uint8Array ) : void {
358
358
this . logPacket ( 'Source Code' , true ) ;
359
359
if ( this . evalsPending ) {
360
360
return ;
@@ -391,7 +391,7 @@ export class JerryDebugProtocolHandler {
391
391
}
392
392
}
393
393
394
- onSourceCodeName ( data : Uint8Array ) {
394
+ public onSourceCodeName ( data : Uint8Array ) : void {
395
395
this . logPacket ( 'Source Code Name' ) ;
396
396
this . sourceNameData = assembleUint8Arrays ( this . sourceNameData , data ) ;
397
397
if ( data [ 0 ] === SP . SERVER . JERRY_DEBUGGER_SOURCE_CODE_NAME_END ) {
@@ -402,7 +402,7 @@ export class JerryDebugProtocolHandler {
402
402
}
403
403
}
404
404
405
- onFunctionName ( data : Uint8Array ) {
405
+ private onFunctionName ( data : Uint8Array ) : void {
406
406
this . logPacket ( 'Function Name' ) ;
407
407
this . functionNameData = assembleUint8Arrays ( this . functionNameData , data ) ;
408
408
if ( data [ 0 ] === SP . SERVER . JERRY_DEBUGGER_FUNCTION_NAME_END ) {
@@ -411,7 +411,7 @@ export class JerryDebugProtocolHandler {
411
411
}
412
412
}
413
413
414
- releaseFunction ( byteCodeCP : number ) {
414
+ public releaseFunction ( byteCodeCP : number ) : void {
415
415
const func = this . functions [ byteCodeCP ] ;
416
416
417
417
const lineList = this . lineLists [ func . scriptId ] ;
@@ -429,7 +429,7 @@ export class JerryDebugProtocolHandler {
429
429
delete this . functions [ byteCodeCP ] ;
430
430
}
431
431
432
- onReleaseByteCodeCP ( data : Uint8Array ) {
432
+ private onReleaseByteCodeCP ( data : Uint8Array ) : void {
433
433
this . logPacket ( 'Release Byte Code CP' , true ) ;
434
434
if ( ! this . evalsPending ) {
435
435
const byteCodeCP = this . decodeMessage ( 'C' , data , 1 ) [ 0 ] ;
@@ -445,7 +445,7 @@ export class JerryDebugProtocolHandler {
445
445
this . sendSimpleRequest ( data ) ;
446
446
}
447
447
448
- getBreakpoint ( breakpointData : Array < number > ) {
448
+ private getBreakpoint ( breakpointData : Array < number > ) : JerryMessageBreakpointHit {
449
449
const func = this . functions [ breakpointData [ 0 ] ] ;
450
450
const offset = breakpointData [ 1 ] ;
451
451
@@ -477,7 +477,7 @@ export class JerryDebugProtocolHandler {
477
477
} ;
478
478
}
479
479
480
- onBreakpointHit ( data : Uint8Array ) {
480
+ public onBreakpointHit ( data : Uint8Array ) : void {
481
481
if ( data [ 0 ] === SP . SERVER . JERRY_DEBUGGER_BREAKPOINT_HIT ) {
482
482
this . logPacket ( 'Breakpoint Hit' ) ;
483
483
} else {
@@ -520,7 +520,7 @@ export class JerryDebugProtocolHandler {
520
520
}
521
521
}
522
522
523
- onBacktrace ( data : Uint8Array ) : Breakpoint [ ] {
523
+ public onBacktrace ( data : Uint8Array ) : Breakpoint [ ] {
524
524
this . logPacket ( 'Backtrace' ) ;
525
525
for ( let i = 1 ; i < data . byteLength ; i += this . byteConfig . cpointerSize + 4 ) {
526
526
const breakpointData = this . decodeMessage ( 'CI' , data , i ) ;
@@ -568,7 +568,7 @@ export class JerryDebugProtocolHandler {
568
568
return result ;
569
569
}
570
570
571
- onMessage ( message : Uint8Array ) {
571
+ public onMessage ( message : Uint8Array ) : void {
572
572
if ( message . byteLength < 1 ) {
573
573
this . abort ( 'message too short' ) ;
574
574
return ;
@@ -606,7 +606,7 @@ export class JerryDebugProtocolHandler {
606
606
}
607
607
}
608
608
609
- getLastBreakpoint ( ) {
609
+ public getLastBreakpoint ( ) : Breakpoint {
610
610
return this . lastBreakpointHit ;
611
611
}
612
612
@@ -616,7 +616,7 @@ export class JerryDebugProtocolHandler {
616
616
throw new Error ( 'no such source' ) ;
617
617
}
618
618
619
- getActiveBreakpoint ( breakpointId : number ) {
619
+ public getActiveBreakpoint ( breakpointId : number ) : Breakpoint {
620
620
return this . activeBreakpoints [ breakpointId ] ;
621
621
}
622
622
@@ -695,7 +695,7 @@ export class JerryDebugProtocolHandler {
695
695
] ) ) ;
696
696
}
697
697
698
- requestBacktrace ( ) {
698
+ public requestBacktrace ( ) : Promise < any > {
699
699
if ( ! this . lastBreakpointHit ) {
700
700
return Promise . reject ( 'backtrace not allowed while app running' ) ;
701
701
}
@@ -768,7 +768,7 @@ export class JerryDebugProtocolHandler {
768
768
return this . sendSimpleRequest ( encodeMessage ( this . byteConfig , 'B' , [ code ] ) ) ;
769
769
}
770
770
771
- onWaitForSource ( ) {
771
+ public onWaitForSource ( ) : void {
772
772
this . waitForSourceEnabled = true ;
773
773
if ( this . delegate . onWaitForSource ) {
774
774
this . delegate . onWaitForSource ( ) ;
@@ -805,7 +805,7 @@ export class JerryDebugProtocolHandler {
805
805
return true ;
806
806
}
807
807
808
- onExceptionStr ( data : Uint8Array ) {
808
+ private onExceptionStr ( data : Uint8Array ) : void {
809
809
this . logPacket ( 'onExceptionStr' ) ;
810
810
this . exceptionData = assembleUint8Arrays ( this . exceptionData , data ) ;
811
811
if ( data [ 0 ] === SP . SERVER . JERRY_DEBUGGER_EXCEPTION_STR_END ) {
0 commit comments