chore: remove special handling for shared_worker (#9096)

With Chromium M107+ this should not be required anymore.
This commit is contained in:
Alex Rudenko 2022-10-11 14:18:06 +02:00 committed by GitHub
parent 3df375baed
commit 8acafe2fd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -231,13 +231,6 @@ export class ChromeTargetManager extends EventEmitter implements TargetManager {
const target = this.#targetFactory(event.targetInfo, undefined);
this.#attachedTargetsByTargetId.set(event.targetInfo.targetId, target);
}
if (event.targetInfo.type === 'shared_worker') {
// Special case (https://crbug.com/1338156): currently, shared_workers
// don't get auto-attached. This should be removed once the auto-attach
// works.
await this.#connection._createSession(event.targetInfo, true);
}
};
#onTargetDestroyed = (event: Protocol.Target.TargetDestroyedEvent) => {