Adopt new extension host restart lifecycle #180514 (#182967)

Adopt Adopt new extension host restart lifecycle #180514
This commit is contained in:
Sandeep Somavarapu 2023-05-19 16:43:39 +02:00 committed by GitHub
parent fe9154e791
commit c125687c4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { CancellationError } from 'vs/base/common/errors';
import { Disposable } from 'vs/base/common/lifecycle';
import { localize } from 'vs/nls';
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
@ -117,7 +118,9 @@ export class UserDataProfileManagementService extends Disposable implements IUse
const isRemoteWindow = !!this.environmentService.remoteAuthority;
if (!isRemoteWindow) {
this.extensionService.stopExtensionHosts(true); // TODO@sandy081 adopt support for extension host to veto stopping
if (!(await this.extensionService.stopExtensionHosts(localize('switch profile', "Switching Profile")))) {
throw new CancellationError();
}
}
// In a remote window update current profile before reloading so that data is preserved from current profile if asked to preserve