Skip to content

Commit 7bee156

Browse files
authored
fix: leaking event listeners (microsoft#209036)
Fixes microsoft#207466 Fixes microsoft#207556
1 parent dc70a8b commit 7bee156

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/vs/workbench/contrib/testing/browser/testingDecorations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export class TestingDecorationService extends Disposable implements ITestingDeco
174174
super();
175175
codeEditorService.registerDecorationType('test-message-decoration', TestMessageDecoration.decorationId, {}, undefined);
176176

177-
modelService.onModelRemoved(e => this.decorationCache.delete(e.uri));
177+
this._register(modelService.onModelRemoved(e => this.decorationCache.delete(e.uri)));
178178

179179
const debounceInvalidate = this._register(new RunOnceScheduler(() => this.invalidate(), 100));
180180

src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -997,11 +997,11 @@ class TestResultsPeek extends PeekViewWidget {
997997

998998
protected override _fillBody(containerElement: HTMLElement): void {
999999
this.content.fillBody(containerElement);
1000-
this.content.onDidRequestReveal(sub => {
1000+
this._disposables.add(this.content.onDidRequestReveal(sub => {
10011001
TestingOutputPeekController.get(this.editor)?.show(sub instanceof MessageSubject
10021002
? sub.messageUri
10031003
: sub.outputUri);
1004-
});
1004+
}));
10051005
}
10061006

10071007
/**

0 commit comments

Comments
 (0)