Skip to content

Commit

Permalink
Adopt Adopt new extension host restart lifecycle #180514
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed May 19, 2023
1 parent fe9154e commit 5fdf611
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5fdf611

Please sign in to comment.