src/vs/workbench/browser/web.main.ts/BrowserMain/registerListeners
class BrowserMain:	private registerListeners(workbench: Workbench, storageService: BrowserStorageService, logService: ILogService): void {

		// Workbench Lifecycle
		this._register(workbench.onBeforeShutdown(event => {
			if (storageService.hasPendingUpdate) {
				event.veto(true, 'veto.pendingStorageUpdate'); // prevent data loss from pending storage update
			}
		}));
		this._register(workbench.onWillShutdown(() => storageService.close()));
		this._register(workbench.onDidShutdown(() => this.dispose()));
	}