@@ -24,8 +24,8 @@ export default class AsyncTaskManager {
24
24
} > = [ ] ;
25
25
private aborted = false ;
26
26
private destroyed = false ;
27
+ #debugTimeout: NodeJS . Timeout | null = null ;
27
28
#browserFrame: IBrowserFrame ;
28
- #debugTimeout: NodeJS . Timeout | null ;
29
29
30
30
/**
31
31
* Constructor.
@@ -89,8 +89,8 @@ export default class AsyncTaskManager {
89
89
this . waitUntilCompleteTimer = null ;
90
90
}
91
91
this . runningTimers . push ( timerID ) ;
92
- if ( this . #browserFrame. page ? .context ? .browser ? .settings ? .debug ? .traceWaitUntilComplete > 0 ) {
93
- this . debugTrace . set ( timerID , new Error ( ) . stack ) ;
92
+ if ( this . #browserFrame. page . context . browser . settings . debug . traceWaitUntilComplete > 0 ) {
93
+ this . debugTrace . set ( timerID , new Error ( ) . stack ! ) ;
94
94
}
95
95
}
96
96
@@ -109,7 +109,7 @@ export default class AsyncTaskManager {
109
109
this . runningTimers . splice ( index , 1 ) ;
110
110
this . resolveWhenComplete ( ) ;
111
111
}
112
- if ( this . #browserFrame. page ? .context ? .browser ? .settings ? .debug ? .traceWaitUntilComplete > 0 ) {
112
+ if ( this . #browserFrame. page . context . browser . settings . debug . traceWaitUntilComplete > 0 ) {
113
113
this . debugTrace . delete ( timerID ) ;
114
114
}
115
115
}
@@ -129,8 +129,8 @@ export default class AsyncTaskManager {
129
129
this . waitUntilCompleteTimer = null ;
130
130
}
131
131
this . runningImmediates . push ( immediateID ) ;
132
- if ( this . #browserFrame. page ? .context ? .browser ? .settings ? .debug ? .traceWaitUntilComplete > 0 ) {
133
- this . debugTrace . set ( immediateID , new Error ( ) . stack ) ;
132
+ if ( this . #browserFrame. page . context . browser . settings . debug . traceWaitUntilComplete > 0 ) {
133
+ this . debugTrace . set ( immediateID , new Error ( ) . stack ! ) ;
134
134
}
135
135
}
136
136
@@ -149,7 +149,7 @@ export default class AsyncTaskManager {
149
149
this . runningImmediates . splice ( index , 1 ) ;
150
150
this . resolveWhenComplete ( ) ;
151
151
}
152
- if ( this . #browserFrame. page ? .context ? .browser ? .settings ? .debug ? .traceWaitUntilComplete > 0 ) {
152
+ if ( this . #browserFrame. page . context . browser . settings . debug . traceWaitUntilComplete > 0 ) {
153
153
this . debugTrace . delete ( immediateID ) ;
154
154
}
155
155
}
@@ -176,8 +176,8 @@ export default class AsyncTaskManager {
176
176
const taskID = this . newTaskID ( ) ;
177
177
this . runningTasks [ taskID ] = abortHandler ? abortHandler : ( ) => { } ;
178
178
this . runningTaskCount ++ ;
179
- if ( this . #browserFrame. page ? .context ? .browser ? .settings ? .debug ? .traceWaitUntilComplete > 0 ) {
180
- this . debugTrace . set ( taskID , new Error ( ) . stack ) ;
179
+ if ( this . #browserFrame. page . context . browser . settings . debug . traceWaitUntilComplete > 0 ) {
180
+ this . debugTrace . set ( taskID , new Error ( ) . stack ! ) ;
181
181
}
182
182
return taskID ;
183
183
}
@@ -196,7 +196,7 @@ export default class AsyncTaskManager {
196
196
this . runningTaskCount -- ;
197
197
this . resolveWhenComplete ( ) ;
198
198
}
199
- if ( this . #browserFrame. page ? .context ? .browser ? .settings ? .debug ? .traceWaitUntilComplete > 0 ) {
199
+ if ( this . #browserFrame. page . context . browser . settings . debug . traceWaitUntilComplete > 0 ) {
200
200
this . debugTrace . delete ( taskID ) ;
201
201
}
202
202
}
@@ -260,7 +260,7 @@ export default class AsyncTaskManager {
260
260
* Applies debugging.
261
261
*/
262
262
private applyDebugging ( ) : void {
263
- const debug = this . #browserFrame. page ? .context ? .browser ? .settings ? .debug ;
263
+ const debug = this . #browserFrame. page . context . browser . settings . debug ;
264
264
if ( ! debug ?. traceWaitUntilComplete || debug . traceWaitUntilComplete < 1 ) {
265
265
return ;
266
266
}
0 commit comments