From fdb8812822d00005242fe4250f69aaa5269a7706 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 11 Oct 2022 19:31:41 -0700 Subject: [PATCH] Always mark notebook list rendering `elementDisposables` as disposed (#163382) Mark notebook list rendering elementDisposables as disposed This updates `disposeTemplate` for notebook list rendering to mark the `elementDisposables` as disposed instead of simply clearing them. This is helpful if you are using `TRACK_DISPOSABLES`, and will also log if you try adding to the disposable after it has been disposed of Also marks more template fields as readonly --- .../browser/diff/notebookDiffEditorBrowser.ts | 1 - .../browser/diff/notebookTextDiffList.ts | 2 ++ .../browser/view/notebookRenderingCommon.ts | 16 ++++++++-------- .../browser/view/renderers/cellRenderer.ts | 3 ++- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.ts b/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.ts index 13559d512e425..e881fda60b7bd 100644 --- a/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.ts +++ b/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.ts @@ -75,7 +75,6 @@ export interface CellDiffSingleSideRenderTemplate extends CellDiffCommonRenderTe readonly metadataInfoContainer: HTMLElement; readonly outputHeaderContainer: HTMLElement; readonly outputInfoContainer: HTMLElement; - } diff --git a/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffList.ts b/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffList.ts index 3504ac2a58d95..fe5b564916de1 100644 --- a/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffList.ts +++ b/src/vs/workbench/contrib/notebook/browser/diff/notebookTextDiffList.ts @@ -147,6 +147,7 @@ export class CellDiffSingleSideRenderer implements IListRenderer