Skip to content

Commit 7fcb892

Browse files
fix(firefox): ensure a exception catch when async send call to a dead object; (#5805)
1 parent ad69b2a commit 7fcb892

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/dispatchers/browserContextDispatcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export class BrowserContextDispatcher extends Dispatcher<BrowserContext, channel
114114
await this._context._setRequestInterceptor(undefined);
115115
return;
116116
}
117-
this._context._setRequestInterceptor((route, request) => {
117+
await this._context._setRequestInterceptor((route, request) => {
118118
this._dispatchEvent('route', { route: new RouteDispatcher(this._scope, route), request: RequestDispatcher.from(this._scope, request) });
119119
});
120120
}

src/dispatchers/pageDispatcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class PageDispatcher extends Dispatcher<Page, channels.PageInitializer> i
136136
await this._page._setClientRequestInterceptor(undefined);
137137
return;
138138
}
139-
this._page._setClientRequestInterceptor((route, request) => {
139+
await this._page._setClientRequestInterceptor((route, request) => {
140140
this._dispatchEvent('route', { route: new RouteDispatcher(this._scope, route), request: RequestDispatcher.from(this._scope, request) });
141141
});
142142
}

0 commit comments

Comments
 (0)