plumb reason upon pipe closing
This commit is contained in:
parent
2e20ac19b2
commit
368f3a206b
|
|
@ -148,8 +148,8 @@ export class BrowserType extends ChannelOwner<channels.BrowserTypeChannel> imple
|
||||||
// Emulate all pages, contexts and the browser closing upon disconnect.
|
// Emulate all pages, contexts and the browser closing upon disconnect.
|
||||||
for (const context of browser?.contexts() || []) {
|
for (const context of browser?.contexts() || []) {
|
||||||
for (const page of context.pages())
|
for (const page of context.pages())
|
||||||
page._onClose();
|
page._onClose(reason);
|
||||||
context._onClose();
|
context._onClose(reason);
|
||||||
}
|
}
|
||||||
connection.close(reason || closeError);
|
connection.close(reason || closeError);
|
||||||
// Give a chance to any API call promises to reject upon page/context closure.
|
// Give a chance to any API call promises to reject upon page/context closure.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue