Skip to content

Fix error noise on browser tab close#307674

Merged
kycutler merged 1 commit intomainfrom
kycutler/closeerror
Apr 3, 2026
Merged

Fix error noise on browser tab close#307674
kycutler merged 1 commit intomainfrom
kycutler/closeerror

Conversation

@kycutler
Copy link
Copy Markdown
Contributor

@kycutler kycutler commented Apr 3, 2026

image

@kycutler kycutler self-assigned this Apr 3, 2026
Copilot AI review requested due to automatic review settings April 3, 2026 17:10
@vs-code-engineering
Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@jruales

Matched files:

  • src/vs/workbench/contrib/browserView/common/browserEditorInput.ts
  • src/vs/workbench/contrib/browserView/electron-browser/browserEditor.ts

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reduces Integrated Browser “error noise” during tab close by tightening model lifecycle handling between the editor pane and its input/model, so workbench UI code doesn’t keep interacting with a disposed browser view.

Changes:

  • Clear BrowserEditor’s _model reference when the underlying IBrowserViewModel begins disposing.
  • Reorder BrowserEditorInput.dispose() to emit onWillDispose before tearing down the browser view model.
  • Remove the now-unneeded _resourceBeforeDisposal snapshot logic from BrowserEditorInput.resource.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/vs/workbench/contrib/browserView/electron-browser/browserEditor.ts Drops the editor’s reference to the model on model disposal to avoid late calls into a disposed browser view.
src/vs/workbench/contrib/browserView/common/browserEditorInput.ts Ensures onWillDispose is emitted before disposing the model, and simplifies resource by removing the disposal snapshot.

@kycutler kycutler merged commit 46379c3 into main Apr 3, 2026
23 checks passed
@kycutler kycutler deleted the kycutler/closeerror branch April 3, 2026 17:35
@vs-code-engineering vs-code-engineering bot added this to the 1.115.0 milestone Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants