diff options
author | Avi Avni <avi.avni@gmail.com> | 2018-04-17 17:14:34 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2018-04-17 07:14:34 -0700 |
commit | 1d406b1a0ad54348dbdda4c9117897921d95f950 (patch) | |
tree | c76cd400804ccee62a5565626b27427fd3609be8 /src/mscorlib | |
parent | bcfb0c959bbac65110c22b695e73249b8dddbd18 (diff) | |
download | coreclr-1d406b1a0ad54348dbdda4c9117897921d95f950.tar.gz coreclr-1d406b1a0ad54348dbdda4c9117897921d95f950.tar.bz2 coreclr-1d406b1a0ad54348dbdda4c9117897921d95f950.zip |
Enable generic attributes (#9189)
Diffstat (limited to 'src/mscorlib')
-rw-r--r-- | src/mscorlib/src/System/Reflection/CustomAttribute.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mscorlib/src/System/Reflection/CustomAttribute.cs b/src/mscorlib/src/System/Reflection/CustomAttribute.cs index 745522b0b1..fb102c128d 100644 --- a/src/mscorlib/src/System/Reflection/CustomAttribute.cs +++ b/src/mscorlib/src/System/Reflection/CustomAttribute.cs @@ -1535,7 +1535,7 @@ namespace System.Reflection // Create custom attribute object if (ctorHasParameters) { - attribute = CreateCaObject(decoratedModule, ctor, ref blobStart, blobEnd, out cNamedArgs); + attribute = CreateCaObject(decoratedModule, attributeType, ctor, ref blobStart, blobEnd, out cNamedArgs); } else { @@ -1695,7 +1695,7 @@ namespace System.Reflection if (ctorHasParameters) { // Resolve method ctor token found in decorated decoratedModule scope - ctor = ModuleHandle.ResolveMethodHandleInternal(decoratedModule.GetNativeHandle(), caRecord.tkCtor); + ctor = decoratedModule.ResolveMethod(caRecord.tkCtor, attributeType.GenericTypeArguments, null).MethodHandle.GetMethodInfo(); } else { @@ -1826,13 +1826,13 @@ namespace System.Reflection } [MethodImplAttribute(MethodImplOptions.InternalCall)] - private static extern unsafe Object _CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, byte** ppBlob, byte* pEndBlob, int* pcNamedArgs); - private static unsafe Object CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, ref IntPtr blob, IntPtr blobEnd, out int namedArgs) + private static extern unsafe Object _CreateCaObject(RuntimeModule pModule, RuntimeType type, IRuntimeMethodInfo pCtor, byte** ppBlob, byte* pEndBlob, int* pcNamedArgs); + private static unsafe Object CreateCaObject(RuntimeModule module, RuntimeType type, IRuntimeMethodInfo ctor, ref IntPtr blob, IntPtr blobEnd, out int namedArgs) { byte* pBlob = (byte*)blob; byte* pBlobEnd = (byte*)blobEnd; int cNamedArgs; - object ca = _CreateCaObject(module, ctor, &pBlob, pBlobEnd, &cNamedArgs); + object ca = _CreateCaObject(module, type, ctor, &pBlob, pBlobEnd, &cNamedArgs); blob = (IntPtr)pBlob; namedArgs = cNamedArgs; return ca; |