@@ -62,7 +62,7 @@ async function testFrameList(t, sess, frameNumber, sourceCode, cb) {
6262}
6363
6464tape ( 'v8 stack' , async ( t ) => {
65- t . timeoutAfter ( 15000 ) ;
65+ t . timeoutAfter ( 30000 ) ;
6666
6767 const sess = common . Session . create ( 'frame-scenario.js' ) ;
6868 sess . waitBreak = promisify ( sess . waitBreak ) ;
@@ -78,15 +78,19 @@ tape('v8 stack', async (t) => {
7878 t . ok ( lines . length > 4 , 'frame count' ) ;
7979
8080 lines = lines . filter ( ( s ) => ! / < b u i l t i n > | < s t u b > / . test ( s ) ) ;
81- const exit = lines [ 5 ] ;
82- const crasher = lines [ 4 ] ;
83- const adapter = lines [ 3 ] ;
81+ const hasArgumentAdaptorFrame = nodejsVersion ( ) [ 0 ] < 16 ;
82+ const argumentAdaptorOffset = hasArgumentAdaptorFrame ? 1 : 0 ;
83+ const exit = lines [ 4 + argumentAdaptorOffset ] ;
84+ const crasher = lines [ 3 + argumentAdaptorOffset ] ;
85+ if ( hasArgumentAdaptorFrame ) {
86+ const adaptor = lines [ 3 ] ;
87+ t . ok ( / < a d a p t o r > / . test ( adaptor ) , 'arguments adapter frame' ) ;
88+ }
8489 const fnInferredName = lines [ 2 ] ;
8590 const fnInferredNamePrototype = lines [ 1 ] ;
8691 const fnFunctionName = lines [ 0 ] ;
8792 t . ok ( / < e x i t > / . test ( exit ) , 'exit frame' ) ;
8893 t . ok ( / c r a s h e r / . test ( crasher ) , 'crasher frame' ) ;
89- t . ok ( / < a d a p t o r > / . test ( adapter ) , 'arguments adapter frame' ) ;
9094 if ( nodejsVersion ( ) [ 0 ] < 12 )
9195 t . ok ( / \s f n I n f e r r e d N a m e \( / . test ( fnInferredName ) , 'fnInferredName frame' ) ;
9296 t . ok ( / \s M o d u l e .f n I n f e r r e d N a m e P r o t o t y p e \( / . test ( fnInferredNamePrototype ) ,
0 commit comments