[release/9.0-staging] Exit the lock before we call into user code and handle losing the race for the RCW table by github-actions[bot] · Pull Request #111162 · dotnet/runtime

and others added 16 commits

January 7, 2025 15:47
1. Register that we've created a managed object as a wrapper for a COM object first (equivalent to ExtObjCxtCache in CoreCLR)
2. Register the NativeObjectWrapper for lifetime management (equivalent to the sync-block interop info in CoreCLR).

This ensures that we have the same behavior as CoreCLR.
… the "RCW address -> wrapper" cache. Use a WeakReference as we don't want to keep the wrapper alive any longer with it being in the cache.
…here's only ever one NativeObjectWrapper we try to register, the one that's in the RCW cache
Co-authored-by: Sergio Pedri <sergio0694@live.com>

jeffschwMSFT

AaronRobinsonMSFT

@jkoritzinsky jkoritzinsky deleted the backport/pr-110828-to-release/9.0-staging branch

January 8, 2025 00:44