From 46163acf62a94ec603be444294e119933c953a84 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Sun, 5 Jul 2020 21:10:31 +0300 Subject: Revert "Dispose logger on extension deactivation" This reverts commit 13872543e074adc153b440660beda441fd562f53. That commit was wrong because we use-after-free the logger --- editors/code/src/main.ts | 2 -- editors/code/src/util.ts | 4 ---- 2 files changed, 6 deletions(-) (limited to 'editors') diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index f22981930..5877be8b2 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -49,8 +49,6 @@ async function tryActivate(context: vscode.ExtensionContext) { ); context.subscriptions.push(defaultOnEnter); - context.subscriptions.push(log); - const config = new Config(context); const state = new PersistentState(context.globalState); const serverPath = await bootstrap(config, state).catch(err => { diff --git a/editors/code/src/util.ts b/editors/code/src/util.ts index 6b07d448b..78fe6f5da 100644 --- a/editors/code/src/util.ts +++ b/editors/code/src/util.ts @@ -18,10 +18,6 @@ export const log = new class { private enabled = true; private readonly output = vscode.window.createOutputChannel("Rust Analyzer Client"); - dispose() { - log.output.dispose(); - } - setEnabled(yes: boolean): void { log.enabled = yes; } -- cgit v1.2.3