summaryrefslogtreecommitdiff
path: root/src/mscorlib
diff options
context:
space:
mode:
authorAvi Avni <avi.avni@gmail.com>2018-04-17 17:14:34 +0300
committerJan Kotas <jkotas@microsoft.com>2018-04-17 07:14:34 -0700
commit1d406b1a0ad54348dbdda4c9117897921d95f950 (patch)
treec76cd400804ccee62a5565626b27427fd3609be8 /src/mscorlib
parentbcfb0c959bbac65110c22b695e73249b8dddbd18 (diff)
downloadcoreclr-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.cs10
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;