mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Adopt Adopt new extension host restart lifecycle #180514
This commit is contained in:
parent
fe9154e791
commit
c125687c4d
|
@ -3,6 +3,7 @@
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* 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 { Disposable } from 'vs/base/common/lifecycle';
|
||||||
import { localize } from 'vs/nls';
|
import { localize } from 'vs/nls';
|
||||||
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
|
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
|
||||||
|
@ -117,7 +118,9 @@ export class UserDataProfileManagementService extends Disposable implements IUse
|
||||||
const isRemoteWindow = !!this.environmentService.remoteAuthority;
|
const isRemoteWindow = !!this.environmentService.remoteAuthority;
|
||||||
|
|
||||||
if (!isRemoteWindow) {
|
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
|
// In a remote window update current profile before reloading so that data is preserved from current profile if asked to preserve
|
||||||
|
|
Loading…
Reference in a new issue