Commit 8d0a2f2 Colin Grant
committed
1 parent 32deea2 commit 8d0a2f2 Copy full SHA for 8d0a2f2
File tree 1 file changed +7
-8
lines changed
packages/memory-inspector/src/browser/memory-provider
1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -64,22 +64,21 @@ export class CDTGDBMemoryProvider extends AbstractMemoryProvider {
64
64
expression : addrExp ,
65
65
context : 'watch' ,
66
66
frameId : frame . raw . id ,
67
- } ) ;
67
+ } ) . catch ( e => console . warn ( `Failed to evaluate ${ addrExp } . Corresponding variable will be omitted from Memory Inspector display.` , e ) ) ;
68
+ if ( ! addrResp ) { continue ; }
69
+
68
70
const sizeResp = await session . sendRequest ( 'evaluate' , {
69
71
expression : sizeExp ,
70
72
context : 'watch' ,
71
73
frameId : frame . raw . id ,
72
- } ) ;
74
+ } ) . catch ( e => console . warn ( `Failed to evaluate ${ addrExp } . Corresponding variable will be omitted from Memory Inspector display.` , e ) ) ;
75
+ if ( ! sizeResp ) { continue ; }
73
76
74
77
// Make sure the address is in the format we expect.
75
78
const addressPart = / 0 x [ 0 - 9 a - f ] + / i. exec ( addrResp . body . result ) ;
76
- if ( ! addressPart ) {
77
- continue ;
78
- }
79
+ if ( ! addressPart ) { continue ; }
79
80
80
- if ( ! / ^ [ 0 - 9 ] + $ / . test ( sizeResp . body . result ) ) {
81
- continue ;
82
- }
81
+ if ( ! / ^ [ 0 - 9 ] + $ / . test ( sizeResp . body . result ) ) { continue ; }
83
82
84
83
const size = parseInt ( sizeResp . body . result ) ;
85
84
const address = hexStrToUnsignedLong ( addressPart [ 0 ] ) ;
You can’t perform that action at this time.
0 commit comments