File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,11 @@ export class FrameManager {
71
71
this . _mainFrame = undefined as any as Frame ;
72
72
}
73
73
74
+ dispose ( ) {
75
+ for ( const frame of this . _frames . values ( ) )
76
+ frame . _stopNetworkIdleTimer ( ) ;
77
+ }
78
+
74
79
mainFrame ( ) : Frame {
75
80
return this . _mainFrame ;
76
81
}
@@ -926,6 +931,7 @@ export class Frame {
926
931
}
927
932
928
933
_onDetached ( ) {
934
+ this . _stopNetworkIdleTimer ( ) ;
929
935
this . _detached = true ;
930
936
this . _detachedCallback ( ) ;
931
937
for ( const data of this . _contextData . values ( ) ) {
Original file line number Diff line number Diff line change @@ -145,18 +145,21 @@ export class Page extends EventEmitter {
145
145
}
146
146
147
147
_didClose ( ) {
148
+ this . _frameManager . dispose ( ) ;
148
149
assert ( this . _closedState !== 'closed' , 'Page closed twice' ) ;
149
150
this . _closedState = 'closed' ;
150
151
this . emit ( Events . Page . Close ) ;
151
152
this . _closedCallback ( ) ;
152
153
}
153
154
154
155
_didCrash ( ) {
156
+ this . _frameManager . dispose ( ) ;
155
157
this . emit ( Events . Page . Crash ) ;
156
158
this . _crashedCallback ( new Error ( 'Page crashed' ) ) ;
157
159
}
158
160
159
161
_didDisconnect ( ) {
162
+ this . _frameManager . dispose ( ) ;
160
163
assert ( ! this . _disconnected , 'Page disconnected twice' ) ;
161
164
this . _disconnected = true ;
162
165
this . _disconnectedCallback ( new Error ( 'Page closed' ) ) ;
You can’t perform that action at this time.
0 commit comments