Revert "window - do not send IPC messages to destroyed windows (fix #114563)"

This reverts commit 5a4d90a550.
This commit is contained in:
SteVen Batten
2021-01-19 15:45:42 -08:00
parent 16ea22eea1
commit f37dd66323
3 changed files with 8 additions and 15 deletions

View File

@@ -271,6 +271,7 @@ export class CodeApplication extends Disposable {
//#region Bootstrap IPC Handlers
ipcMain.on('vscode:fetchShellEnv', async event => {
const webContents = event.sender;
const window = this.windowsMainService?.getWindowByWebContents(event.sender);
let replied = false;
@@ -282,7 +283,9 @@ export class CodeApplication extends Disposable {
if (!replied) {
replied = true;
window?.send('vscode:acceptShellEnv', env);
if (!webContents.isDestroyed()) {
webContents.send('vscode:acceptShellEnv', env);
}
}
}