Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
don't call method of destroyed webContents
  • Loading branch information
steven nguyen authored Oct 21, 2021
commit c9ecdfe70f1d73717113a0dbf1d14d58a7ca4422
4 changes: 0 additions & 4 deletions lib/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ const averageTracker = new AverageTracker({limit: operationCountLimit});
const childPidsById = new Map();

const destroyRenderer = () => {
if (!managerWebContents.isDestroyed()) {
managerWebContents.removeListener('crashed', destroyRenderer);
managerWebContents.removeListener('destroyed', destroyRenderer);
}
const win = remote.BrowserWindow.fromWebContents(remote.getCurrentWebContents());
if (win && !win.isDestroyed()) {
win.destroy();
Expand Down