Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new 'IObjectReference' tracking APIs #1849

Open
wants to merge 14 commits into
base: staging/2.2
Choose a base branch
from
5 changes: 4 additions & 1 deletion src/WinRT.Runtime/ApiCompatBaseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,7 @@ MembersMustExist : Member 'public ABI.System.Collections.Generic.KeyValuePair<K,
MembersMustExist : Member 'public ABI.WinRT.Interop.IActivationFactory ABI.WinRT.Interop.IActivationFactory.op_Implicit(WinRT.IObjectReference)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'public WinRT.IInspectable WinRT.IInspectable.op_Implicit(WinRT.IObjectReference)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'public WinRT.IInspectable WinRT.IInspectable.op_Implicit(WinRT.ObjectReference<WinRT.IInspectable.Vftbl>)' does not exist in the implementation but it does exist in the contract.
Total Issues: 44
MembersMustExist : Member 'protected void WinRT.IObjectReference.ThrowIfDisposed()' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'protected void WinRT.IObjectReference.AddRef()' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'protected void WinRT.IObjectReference.AddRef(System.Boolean)' does not exist in the implementation but it does exist in the contract.
Total Issues: 47
4 changes: 2 additions & 2 deletions src/WinRT.Runtime/ComWrappersSupport.net5.cs
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ public unsafe static void Init(IObjectReference objRef, bool addRefFromTrackerSo

if (addRefFromTrackerSource)
{
objRef.AddRefFromTrackerSource(); // ObjRef instance
objRef.NativeAddRefFromTrackerSourceUnsafe(); // ObjRef instance
}
else
{
Expand Down Expand Up @@ -662,7 +662,7 @@ protected override object CreateObject(IntPtr externalComObject, CreateObjectFla
// Handle the scenario where the CLR has already done an AddRefFromTrackerSource on the instance
// stored by the RCW type. We handle it by releasing the AddRef we did and not doing an release
// on destruction as the CLR would do it.
winrtObj.NativeObject.ReleaseFromTrackerSource();
winrtObj.NativeObject.NativeReleaseFromTrackerSourceUnsafe();
winrtObj.NativeObject.PreventReleaseFromTrackerSourceOnDispose = true;
}

Expand Down
13 changes: 12 additions & 1 deletion src/WinRT.Runtime/MatchingRefApiCompatBaseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,15 @@ TypesMustExist : Type 'Windows.UI.Xaml.LayoutCycleException' does not exist in t
TypesMustExist : Type 'Windows.UI.Xaml.Automation.ElementNotAvailableException' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'Windows.UI.Xaml.Automation.ElementNotEnabledException' does not exist in the reference but it does exist in the implementation.
TypesMustExist : Type 'Windows.UI.Xaml.Markup.XamlParseException' does not exist in the reference but it does exist in the implementation.
Total Issues: 278
MembersMustExist : Member 'public void WinRT.IObjectReference.AddRefUnsafe()' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'public System.IntPtr WinRT.IObjectReference.GetReferenceTrackerPtrUnsafe()' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'public System.IntPtr WinRT.IObjectReference.GetThisPtrUnsafe()' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'public void WinRT.IObjectReference.ReleaseUnsafe()' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'protected void WinRT.IObjectReference.ThrowIfDisposedUnsafe()' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'public System.Boolean WinRT.IObjectReference.TryAddRefUnsafe()' does not exist in the reference but it does exist in the implementation.
MembersMustExist : Member 'public System.IntPtr WinRT.IObjectReference.GetThisPtr()' does not exist in the reference but it does exist in the implementation.
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'WinRT.IObjectReference.Release()' in the implementation but not the reference.
CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'WinRT.IObjectReference.GetRef()' in the implementation but not the reference.
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'WinRT.IObjectReference.GetRef()' in the implementation but not the reference.
CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'WinRT.IObjectReference.Release()' in the implementation but not the reference.
Total Issues: 289
Loading