fix(firefox): ensure a exception catch when async send call to a dead object; (#5805)

This commit is contained in:
Gilberto Saraiva 2021-03-11 21:04:08 -03:00 committed by GitHub
parent ad69b2af83
commit 7fcb89269e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -114,7 +114,7 @@ export class BrowserContextDispatcher extends Dispatcher<BrowserContext, channel
await this._context._setRequestInterceptor(undefined);
return;
}
this._context._setRequestInterceptor((route, request) => {
await this._context._setRequestInterceptor((route, request) => {
this._dispatchEvent('route', { route: new RouteDispatcher(this._scope, route), request: RequestDispatcher.from(this._scope, request) });
});
}

View file

@ -136,7 +136,7 @@ export class PageDispatcher extends Dispatcher<Page, channels.PageInitializer> i
await this._page._setClientRequestInterceptor(undefined);
return;
}
this._page._setClientRequestInterceptor((route, request) => {
await this._page._setClientRequestInterceptor((route, request) => {
this._dispatchEvent('route', { route: new RouteDispatcher(this._scope, route), request: RequestDispatcher.from(this._scope, request) });
});
}