chore(extension): bind relay lifetime to browser context (#804)

This commit is contained in:
Yury Semikhatsky
2025-07-31 22:25:40 -07:00
committed by GitHub
parent 3787439fc1
commit 7c07cc86eb
7 changed files with 101 additions and 83 deletions

View File

@@ -30,7 +30,6 @@ import type { Tool } from './tools/tool.js';
export class BrowserServerBackend implements ServerBackend {
name = 'Playwright';
version = packageJSON.version;
onclose?: () => void;
private _tools: Tool[];
private _context: Context | undefined;
@@ -75,7 +74,6 @@ export class BrowserServerBackend implements ServerBackend {
}
serverClosed() {
this.onclose?.();
void this._context!.dispose().catch(logUnhandledError);
}
}