* Add TryGetComInstance and TryGetObject APIs
The ComWrappers API is being expanded to enable
users to get the underlying managed or unmanaged
object from the created wrappers.
* Add tagged interface for certainty in identifying
a wrapper is a ComWrappers impl.
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
* Reenable class-memaccess warning
* Match x64 logic in emitarm.cpp
* Make GCProtect sections with "gc" variable consistent
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
FastInterlock* operations were #defined as aliases to regular Interlock* operations. Deleted the FastInterlock* aliases and replaced usage with Interlocked* operations.
* Don't create a COM weak reference if the object is an aggregated COMWrappers RCW.
* Add test for weak reference + aggregation with native weak reference impl.
* Apply suggestions from code review
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
* Notify Reference Tracker runtime of disconnect at the right time
Based on misunderstanding of SyncBlock clean-up modes the indication of
when an Native Object Wrapper was being collected was being done after
the wrapper's Finalizer was run. However, this information must be conveyed
prior to wrapper finalization and synchronously during the GC.