src/vs/platform/windows/electron-main/window.ts/CodeWindow/destroyWindow
class CodeWindow:	private destroyWindow(reopen: boolean): void {

		// 'close' event will not be fired on destroy(), so signal crash via explicit event
		this._onDidDestroy.fire();

		// make sure to destroy the window as it has crashed
		this._win?.destroy();

		// ask the windows service to open a new fresh window if specified
		if (reopen && this.config) {

			// We have to reconstruct a openable from the current workspace
			let workspace: IWorkspaceToOpen | IFolderToOpen | undefined = undefined;
			let forceEmpty = undefined;
			if (isSingleFolderWorkspaceIdentifier(this.openedWorkspace)) {
				workspace = { folderUri: this.openedWorkspace.uri };
			} else if (isWorkspaceIdentifier(this.openedWorkspace)) {
				workspace = { workspaceUri: this.openedWorkspace.configPath };
			} else {
				forceEmpty = true;
			}

			// Delegate to windows service
			const [window] = this.windowsMainService.open({
				context: OpenContext.API,
				userEnv: this.config.userEnv,
				cli: {
					...this.environmentMainService.args,
					_: [] // we pass in the workspace to open explicitly via `urisToOpen`
				},
				urisToOpen: workspace ? [workspace] : undefined,
				forceEmpty,
				forceNewWindow: true,
				remoteAuthority: this.remoteAuthority
			});
			window.focus();
		}
	}