Skip to content

Commit c125687

Browse files
authored
Adopt new extension host restart lifecycle microsoft#180514 (microsoft#182967)
Adopt Adopt new extension host restart lifecycle microsoft#180514
1 parent fe9154e commit c125687

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6+
import { CancellationError } from 'vs/base/common/errors';
67
import { Disposable } from 'vs/base/common/lifecycle';
78
import { localize } from 'vs/nls';
89
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
@@ -117,7 +118,9 @@ export class UserDataProfileManagementService extends Disposable implements IUse
117118
const isRemoteWindow = !!this.environmentService.remoteAuthority;
118119

119120
if (!isRemoteWindow) {
120-
this.extensionService.stopExtensionHosts(true); // TODO@sandy081 adopt support for extension host to veto stopping
121+
if (!(await this.extensionService.stopExtensionHosts(localize('switch profile', "Switching Profile")))) {
122+
throw new CancellationError();
123+
}
121124
}
122125

123126
// In a remote window update current profile before reloading so that data is preserved from current profile if asked to preserve

0 commit comments

Comments
 (0)