mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
actually destroy webcontents
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user