Crashing workbench process does not bring reopen dialog on linux (fix #135950)

上级 426f82c6
......@@ -20,6 +20,7 @@ import { ISharedProcess, ISharedProcessConfiguration } from 'vs/platform/sharedP
import { ISharedProcessWorkerConfiguration } from 'vs/platform/sharedProcess/common/sharedProcessWorkerService';
import { IThemeMainService } from 'vs/platform/theme/electron-main/themeMainService';
import { WindowError } from 'vs/platform/windows/electron-main/windows';
import { toErrorMessage } from 'vs/base/common/errorMessage';
export class SharedProcess extends Disposable implements ISharedProcess {
......@@ -157,7 +158,11 @@ export class SharedProcess extends Disposable implements ISharedProcess {
return;
}
window.webContents.send(channel, ...args);
try {
window.webContents.send(channel, ...args);
} catch (error) {
this.logService.warn(`Error sending IPC message to channel '${channel}' of shared process: ${toErrorMessage(error)}`);
}
}
private _whenReady: Promise<void> | undefined = undefined;
......
......@@ -6,6 +6,7 @@
import { app, BrowserWindow, BrowserWindowConstructorOptions, Display, Event, nativeImage, NativeImage, Rectangle, screen, SegmentedControlSegment, systemPreferences, TouchBar, TouchBarSegmentedControl, WebFrameMain } from 'electron';
import { RunOnceScheduler } from 'vs/base/common/async';
import { CancellationToken } from 'vs/base/common/cancellation';
import { toErrorMessage } from 'vs/base/common/errorMessage';
import { Emitter } from 'vs/base/common/event';
import { mnemonicButtonLabel } from 'vs/base/common/labels';
import { Disposable } from 'vs/base/common/lifecycle';
......@@ -1319,7 +1320,11 @@ export class CodeWindow extends Disposable implements ICodeWindow {
return;
}
this._win.webContents.send(channel, ...args);
try {
this._win.webContents.send(channel, ...args);
} catch (error) {
this.logService.warn(`Error sending IPC message to channel '${channel}' of window ${this._id}: ${toErrorMessage(error)}`);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册