mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(chromium): ensure we resume service worker before detaching from it (#850)
This commit is contained in:
parent
a4c40fff82
commit
28c4a1697c
@ -218,9 +218,10 @@ export class CRPage implements PageDelegate {
|
||||
_onAttachedToTarget(event: Protocol.Target.attachedToTargetPayload) {
|
||||
const session = CRConnection.fromSession(this._client).session(event.sessionId)!;
|
||||
if (event.targetInfo.type !== 'worker') {
|
||||
// Ideally, detaching should resume any target, but there is bug in the backend.
|
||||
session.send('Runtime.runIfWaitingForDebugger').catch(debugError);
|
||||
this._client.send('Target.detachFromTarget', { sessionId: event.sessionId }).catch(debugError);
|
||||
// Ideally, detaching should resume any target, but there is a bug in the backend.
|
||||
session.send('Runtime.runIfWaitingForDebugger').catch(debugError).then(() => {
|
||||
this._client.send('Target.detachFromTarget', { sessionId: event.sessionId }).catch(debugError);
|
||||
});
|
||||
return;
|
||||
}
|
||||
const url = event.targetInfo.url;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user