Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

[WIP] don't call method of destroyed webContents #2722

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
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