mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(close): actually mark the page as closing (#2798)
Currently double-closing flakiness is seen on Firefox bots.
This commit is contained in:
parent
5c4751d5dd
commit
ff1fe3ac39
@ -480,6 +480,7 @@ export class Page extends EventEmitter {
|
||||
return;
|
||||
const runBeforeUnload = !!options && !!options.runBeforeUnload;
|
||||
if (this._closedState !== 'closing') {
|
||||
this._closedState = 'closing';
|
||||
assert(!this._disconnected, 'Protocol error: Connection closed. Most likely the page has been closed.');
|
||||
await this._delegate.closePage(runBeforeUnload);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user