Ensure method is active in PrepareMethod (dotnet/coreclr#22351)
authorAndy Ayers <andya@microsoft.com>
Fri, 1 Feb 2019 19:34:31 +0000 (11:34 -0800)
committerGitHub <noreply@github.com>
Fri, 1 Feb 2019 19:34:31 +0000 (11:34 -0800)
Fixes an assert when first call to PrepareMethod for an assembly
is an interop method.

Commit migrated from https://github.com/dotnet/coreclr/commit/7a453d4b05d3514b5c5c3b22411e3d2d9f16c017

src/coreclr/src/vm/reflectioninvocation.cpp

index 7f3ad70..a69f543 100644 (file)
@@ -1944,6 +1944,8 @@ static void PrepareMethodHelper(MethodDesc * pMD)
 
     GCX_PREEMP();
 
+    pMD->EnsureActive();
+
     if (pMD->IsPointingToPrestub())
         pMD->DoPrestub(NULL);