14 Commits
Author SHA1 Message Date
Aaron Robinson b09764fa7a Use reader/writer lock instead of mutex for RCW cache (#91120) 2023-08-25 16:23:18 -07:00
Jeremy Koritzinsky a2127cd09a Change CreateObjectFlags.Unwrap to be ComWrappers-instance-specific (#86195) 2023-05-15 11:43:05 -07:00
Aaron RobinsonandJeremy Koritzinsky 665570877c Implement new ComWrappers APIs (#80402)
* 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>
2023-01-20 10:52:37 -08:00
Aaron RobinsonandJan Kotas 53841055e7 Reenable class-memaccess warning (#74363)
* 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>
2022-08-25 13:23:56 -07:00
Jan Kotas 2ce8130f4b Find&replace FastInterlock* with Interlocked* (#70784)
FastInterlock* operations were #defined as aliases to regular Interlock* operations. Deleted the FastInterlock* aliases and replaced usage with Interlocked* operations.
2022-06-15 16:22:25 -07:00
Aaron Robinson 6a2727f68e Predicate for valid Tracker Reference is inverted (#70709)
* Predicate for valid Tracker Reference is inverted

* Fix test to not inline wrapper creation function.
2022-06-15 11:16:22 -07:00
55e2378d86 Fix typos (#69537)
* Fix typos

* Fix typo: seperate -> separate

* Rename ApplicationNameSetFromArgument

* Update src/coreclr/vm/methodtablebuilder.cpp

* Update docs/coding-guidelines/clr-code-guide.md

Co-authored-by: Dan Moseley <danmose@microsoft.com>

* Update src/mono/mono/tests/verifier/make_tests.sh

Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2022-05-23 10:14:58 -07:00
Aaron RobinsonandJan Kotas a5ec8aa173 Reenable CA 4701 (#66676)
* Reenable 4701

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2022-03-16 19:30:39 -07:00
Adeel MujahidandJan Kotas 15649df127 Avoid switching GC mode in COM's HasValidTarget (#62066)
* Avoid switching GC mode in COM's HasValidTarget

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2021-11-26 09:58:25 -08:00
Jeremy KoritzinskyandAaron Robinson aefb0fc63b Don't create a COM weak reference if the object is an aggregated COMWrappers RCW. (#61267)
* 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>
2021-11-06 12:02:48 -07:00
Jeremy KoritzinskyandElinor Fung 24e7a4a1a1 Make QCalls respect the EntryPoint property (#60992)
Co-authored-by: Elinor Fung <elfung@microsoft.com>
2021-11-02 16:37:18 -07:00
Aaron RobinsonandElinor Fung 2f68bf6a57 Check if External Object Context is still active after a possible GC (#59285)
* Handle a possible GC after allocating an array by iterating over the hash again.

Co-authored-by: Elinor Fung <elfung@microsoft.com>
2021-09-21 08:01:38 -07:00
Aaron Robinson c02d6dac78 Notify Reference Tracker runtime of disconnect at the right time (#58472)
* 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.
2021-09-02 11:02:47 -07:00
Elinor Fung 017e701748 Rename interoplibinterface.cpp -> interoplibinterface_comwrappers.cpp (#56921) 2021-08-05 12:44:13 -07:00