mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-03 17:23:42 -05:00
Merge VS Code 1.31.1 (#4283)
This commit is contained in:
@@ -42,10 +42,10 @@ export class LifecycleService extends Disposable implements ILifecycleService {
|
||||
private shutdownReason: ShutdownReason;
|
||||
|
||||
constructor(
|
||||
@INotificationService private notificationService: INotificationService,
|
||||
@IWindowService private windowService: IWindowService,
|
||||
@IStorageService private storageService: IStorageService,
|
||||
@ILogService private logService: ILogService
|
||||
@INotificationService private readonly notificationService: INotificationService,
|
||||
@IWindowService private readonly windowService: IWindowService,
|
||||
@IStorageService private readonly storageService: IStorageService,
|
||||
@ILogService private readonly logService: ILogService
|
||||
) {
|
||||
super();
|
||||
|
||||
@@ -116,7 +116,7 @@ export class LifecycleService extends Disposable implements ILifecycleService {
|
||||
}
|
||||
|
||||
private handleBeforeShutdown(reason: ShutdownReason): Promise<boolean> {
|
||||
const vetos: (boolean | Thenable<boolean>)[] = [];
|
||||
const vetos: (boolean | Promise<boolean>)[] = [];
|
||||
|
||||
this._onBeforeShutdown.fire({
|
||||
veto(value) {
|
||||
@@ -131,8 +131,8 @@ export class LifecycleService extends Disposable implements ILifecycleService {
|
||||
});
|
||||
}
|
||||
|
||||
private handleWillShutdown(reason: ShutdownReason): Thenable<void> {
|
||||
const joiners: Thenable<void>[] = [];
|
||||
private handleWillShutdown(reason: ShutdownReason): Promise<void> {
|
||||
const joiners: Promise<void>[] = [];
|
||||
|
||||
this._onWillShutdown.fire({
|
||||
join(promise) {
|
||||
@@ -143,7 +143,7 @@ export class LifecycleService extends Disposable implements ILifecycleService {
|
||||
reason
|
||||
});
|
||||
|
||||
return Promise.all(joiners).then(() => void 0, err => {
|
||||
return Promise.all(joiners).then(() => undefined, err => {
|
||||
this.notificationService.error(toErrorMessage(err));
|
||||
onUnexpectedError(err);
|
||||
});
|
||||
@@ -163,13 +163,14 @@ export class LifecycleService extends Disposable implements ILifecycleService {
|
||||
this._phase = value;
|
||||
mark(`LifecyclePhase/${LifecyclePhaseToString(value)}`);
|
||||
|
||||
if (this.phaseWhen.has(this._phase)) {
|
||||
this.phaseWhen.get(this._phase).open();
|
||||
const barrier = this.phaseWhen.get(this._phase);
|
||||
if (barrier) {
|
||||
barrier.open();
|
||||
this.phaseWhen.delete(this._phase);
|
||||
}
|
||||
}
|
||||
|
||||
when(phase: LifecyclePhase): Thenable<any> {
|
||||
when(phase: LifecyclePhase): Promise<any> {
|
||||
if (phase <= this._phase) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user