Skip to content

Update Avalonia.Controls.WebView to 12.1.2 so WebView2 processes exit - #5766

Merged
Gabriel Dufresne (GabrielDuf) merged 1 commit into
Devolutions:mainfrom
Thenewmanator15:bg/webview-12.1.2
Nov 16, 2026
Merged

Gabriel Dufresne (GabrielDuf) merged 1 commit into
Devolutions:mainfrom
Thenewmanator15:bg/webview-12.1.2

Conversation

@Thenewmanator15

@Thenewmanator15 Mathew Newman (Thenewmanator15) commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor
  • I have read the contributing guidelines, and I agree with the Code of Conduct.
  • Have you checked that there aren't other open pull requests for the same changes?
  • Have you tested that the committed code can be executed without errors?
  • Have you confirmed that this issue is caused by UniGetUI itself, and not by the package manager or the package involved?

Leaving the Help or Release Notes page disposes the page and detaches its web view (#5131). With Avalonia.Controls.WebView 12.0.0 that has no effect on Windows: the control never destroys its WebView2 adapter (AdapterDestroyed is never raised), so the msedgewebview2 processes stay alive and each return to the page adds another renderer. The adapter is internal to the package, so it can't be disposed from our side without reflection.

Measured on Windows 11 by opening Help and then going to Discover:

12.0.0 and 12.0.1 12.1.2
msedgewebview2 processes after leaving Help 6, still there after 23 s 0 within 3 s
After opening Help again 7 6

The rest of Avalonia stays on 12.0.4.

Testing

  • dotnet build src/UniGetUI.Windows.slnx /p:Platform=x64: 0 errors. Both dotnet format gates pass.
  • With this change on top of my other background changes, the full test suite gives the same result as before and the win-x64 NativeAOT publish succeeds with the same 12 IL warnings, all from third-party packages.

Not tested: Linux and macOS web views, and Release Notes (same code path as Help).


Relates to #5131

Leaving the Help or Release Notes page disposes the page and detaches its
web view (Devolutions#5131), and hiding the window to the tray now does the same.
With Avalonia.Controls.WebView 12.0.0 that had no effect on Windows: the
control never destroyed its WebView2 adapter (AdapterDestroyed was never
raised), so the msedgewebview2 process cluster stayed alive and every
return to the page added another renderer process.

Measured on Windows by opening Help and then navigating to Discover:

  12.0.0 / 12.0.1: 6 msedgewebview2 processes still running 23 s after
                   leaving; 7 after opening Help again.
  12.1.2:          0 processes 3 s after leaving; 6 after opening Help
                   again.

The adapter is internal to the package, so it cannot be disposed from
our side without reflection. The rest of Avalonia stays on 12.0.4; the
solution builds and the test suite gives the same result as before.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@GabrielDuf
Gabriel Dufresne (GabrielDuf) merged commit 8b2d7d7 into Devolutions:main Nov 16, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants