fix(fetch): do clear responses when context closes (#8902)

This commit is contained in:
Yury Semikhatsky 2021-09-13 21:15:23 -07:00 committed by GitHub
parent aa76cb5610
commit 1b66581e34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -133,6 +133,7 @@ export abstract class BrowserContext extends SdkObject {
this._closedStatus = 'closed';
this._deleteAllDownloads();
this._downloads.clear();
this.fetchResponses.clear();
if (this._isPersistentContext)
this._onClosePersistent();
this._closePromiseFulfill!(new Error('Context closed'));