From ff0c11fbb2fbc29d776a6511c273ee82eabd3642 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 4 Feb 2022 12:09:53 +0100 Subject: [PATCH] fix issue which causes extension host to be profiled forever --- .../extensions/electron-sandbox/extensionsAutoProfiler.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsAutoProfiler.ts b/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsAutoProfiler.ts index 72b8414d32abd..0dd272a25ce28 100644 --- a/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsAutoProfiler.ts +++ b/src/vs/workbench/contrib/extensions/electron-sandbox/extensionsAutoProfiler.ts @@ -76,7 +76,13 @@ export class ExtensionsAutoProfiler extends Disposable implements IWorkbenchCont } // wait 5 seconds or until responsive again - await timeout(5e3, cts.token); + try { + await timeout(5e3, cts.token); + } catch { + // can throw cancellation error. that is + // OK, we stop profiling and analyse the + // profile anyways + } try { // stop profiling and analyse results