Use .close() instead of the private .destroy() to stop leaking WebContents (#2990)

* Use `.close()` instead of the private `.destroy()` to stop leaking WebContents

* Fix tests
This commit is contained in:
Devin Binnie
2024-03-22 12:26:51 -04:00
committed by GitHub
parent 6c3eced3e9
commit da59e13477
5 changed files with 8 additions and 22 deletions

View File

@@ -354,11 +354,7 @@ export class ViewManager {
log.error('Failed to remove URL view', e);
}
// workaround to eliminate zombie processes
// https://github.com/mattermost/desktop/pull/1519
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
urlView.webContents.destroy();
urlView.webContents.close();
};
const adjustWidth = (event: IpcMainEvent, width: number) => {