mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore(webkit): remove _disconnectFromTarget (#567)
This commit is contained in:
parent
05cb267a86
commit
869ffc8afd
@ -76,7 +76,6 @@ export class WKPage implements PageDelegate {
|
|||||||
|
|
||||||
private _setSession(session: WKSession) {
|
private _setSession(session: WKSession) {
|
||||||
helper.removeEventListeners(this._sessionListeners);
|
helper.removeEventListeners(this._sessionListeners);
|
||||||
this._disconnectFromTarget();
|
|
||||||
this._session = session;
|
this._session = session;
|
||||||
this.rawKeyboard.setSession(session);
|
this.rawKeyboard.setSession(session);
|
||||||
this._addSessionListeners();
|
this._addSessionListeners();
|
||||||
@ -165,7 +164,6 @@ export class WKPage implements PageDelegate {
|
|||||||
|
|
||||||
didClose(crashed: boolean) {
|
didClose(crashed: boolean) {
|
||||||
helper.removeEventListeners(this._sessionListeners);
|
helper.removeEventListeners(this._sessionListeners);
|
||||||
this._disconnectFromTarget();
|
|
||||||
if (crashed)
|
if (crashed)
|
||||||
this._page._didCrash();
|
this._page._didCrash();
|
||||||
else
|
else
|
||||||
@ -208,14 +206,6 @@ export class WKPage implements PageDelegate {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
private _disconnectFromTarget() {
|
|
||||||
for (const context of this._contextIdToContext.values()) {
|
|
||||||
(context._delegate as WKExecutionContext)._dispose();
|
|
||||||
context.frame._contextDestroyed(context);
|
|
||||||
}
|
|
||||||
this._contextIdToContext.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
private async _updateState<T extends keyof Protocol.CommandParameters>(
|
private async _updateState<T extends keyof Protocol.CommandParameters>(
|
||||||
method: T,
|
method: T,
|
||||||
params?: Protocol.CommandParameters[T]
|
params?: Protocol.CommandParameters[T]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user