Description
What happened?
Our application embed WebView2 for multiple purposes, one is to handle an HTML-based login-dialog.
This dialog is displayed during initialization, after COM-objects have been registered, but before any APIs are available to external clients.
Starting with WebView2 v120 we have now identified that COM-objects provided by the EXE itself are not available,
The root cause seems to be calls to CoReleaseServerProcess when the WebView2 instance hosted in our login-dialog is cleaned up. The call effectively suspend all registered COM-objects via an implict call to CoSuspendClassObjects, resulting in various application errors at later stages.
Expected:
External DLLs (such as WebView2-integration) loaded by host process should not affect COM-state.
Importance
Blocking. My app's basic functions are not working due to this issue.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
120.9.2210.61
SDK Version
1.0.2151.40
Framework
Win32
Operating System
Windows 10, Windows 11
OS Version
No response
Repro steps
- Register EXE-level objects via
_Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE)
- Create, display and destroy dialog the host WebView2 using Win32/COM
- Try to use previously registered COM-objects via
CoCreateInstanance
Result:
- Externally creatable object will result in a new main process, which also fail due to login-dialog
- Objects that are only available within the process will result in COM-level errors (Class not registered)
Repros in Edge Browser
No
Regression
Regression in newer Runtime
Last working version (if regression)
119.x