fix(firefox): ensure a exception catch when async send call to a dead object; (#5805)
This commit is contained in:
parent
ad69b2af83
commit
7fcb89269e
|
|
@ -114,7 +114,7 @@ export class BrowserContextDispatcher extends Dispatcher<BrowserContext, channel
|
||||||
await this._context._setRequestInterceptor(undefined);
|
await this._context._setRequestInterceptor(undefined);
|
||||||
return;
|
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) });
|
this._dispatchEvent('route', { route: new RouteDispatcher(this._scope, route), request: RequestDispatcher.from(this._scope, request) });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ export class PageDispatcher extends Dispatcher<Page, channels.PageInitializer> i
|
||||||
await this._page._setClientRequestInterceptor(undefined);
|
await this._page._setClientRequestInterceptor(undefined);
|
||||||
return;
|
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) });
|
this._dispatchEvent('route', { route: new RouteDispatcher(this._scope, route), request: RequestDispatcher.from(this._scope, request) });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue