refactor: rename methods for clarity (#2442)

This commit is contained in:
Nikolay Vitkov
2026-07-30 15:37:59 +02:00
committed by GitHub
parent b4e8f74ae5
commit dc23bcd894
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -393,7 +393,7 @@ export class HeapSnapshotManager {
return this.#snapshots.size > 0;
}
dispose(filePath: string): boolean {
disposeSnapshot(filePath: string): boolean {
const absolutePath = path.resolve(filePath);
const cached = this.#snapshots.get(absolutePath);
if (cached) {
@@ -404,7 +404,7 @@ export class HeapSnapshotManager {
return false;
}
disposeAll(): void {
dispose(): void {
for (const cached of this.#snapshots.values()) {
cached.worker.dispose();
}
+2 -2
View File
@@ -139,7 +139,7 @@ export class McpContext implements Context {
this.browser.off('targetdestroyed', this.#onTargetDestroyed);
this.#serviceWorkerConsoleCollector.dispose();
this.#heapSnapshotManager.disposeAll();
this.#heapSnapshotManager.dispose();
for (const mcpPage of this.#mcpPages.values()) {
mcpPage.dispose();
}
@@ -722,7 +722,7 @@ export class McpContext implements Context {
}
async closeHeapSnapshot(filePath: string): Promise<boolean> {
return this.#heapSnapshotManager.dispose(filePath);
return this.#heapSnapshotManager.disposeSnapshot(filePath);
}
hasHeapSnapshots(): boolean {