mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(workers): swallow errors when auto-detaching from page subtargets (#2649)
Page subtargets (e.g. out-of-process iframes and others) sometimes die before we send the 'detach' command. This is harmless to us, but we shouldn't have an unhandled promise rejection in this case. Example crash: https://cirrus-ci.com/task/4884032470908928
This commit is contained in:
parent
1c0ecc3d9c
commit
35e3f12afa
@ -97,7 +97,7 @@ class Page extends EventEmitter {
|
|||||||
// If we don't detach from service workers, they will never die.
|
// If we don't detach from service workers, they will never die.
|
||||||
client.send('Target.detachFromTarget', {
|
client.send('Target.detachFromTarget', {
|
||||||
sessionId: event.sessionId
|
sessionId: event.sessionId
|
||||||
});
|
}).catch(debugError);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const session = client._createSession(event.targetInfo.targetId, event.sessionId);
|
const session = client._createSession(event.targetInfo.targetId, event.sessionId);
|
||||||
|
Loading…
Reference in New Issue
Block a user