Skip to content

Commit 48a4ffc

Browse files
committed
fix tests
1 parent c926114 commit 48a4ffc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/vs/platform/agentHost/node/commandAutoApprover.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,13 @@ export class CommandAutoApprover extends Disposable {
193193
}
194194

195195
const parser = new TreeSitter.Parser();
196-
this._register(toDisposable(() => parser.delete()));
196+
this._register(toDisposable(() => {
197+
try {
198+
parser.delete();
199+
} catch {
200+
// WASM memory may already be freed
201+
}
202+
}));
197203

198204
// Load bash grammar
199205
const bashWasmPath = URI.joinPath(moduleRoot, 'tree-sitter-bash.wasm').fsPath;

0 commit comments

Comments
 (0)