actually destroy webcontents

This commit is contained in:
John Kleinschmidt
2024-11-25 13:09:26 -05:00
parent b8913b1562
commit aacf11b900

View File

@@ -60,14 +60,11 @@ export async function closeAllWindows (assertNotWindows = false) {
export async function cleanupWebContents () {
let webContentsDestroyed = 0;
const existingWCS = webContents.getAllWebContents();
webContentsDestroyed = existingWCS.length;
/*
for (const contents of existingWCS) {
const isDestroyed = once(contents, 'destroyed');
contents.destroy();
await isDestroyed;
webContentsDestroyed++;
}
*/
return webContentsDestroyed;
}