From 5f455600c0e0155d80bd814d4a60b44f6ac6bcbb Mon Sep 17 00:00:00 2001 From: John Chen Date: Fri, 3 Jun 2016 10:18:37 -0700 Subject: Fix desktop NGen break caused by CoreCLR change, and add a missing contract [tfs-changeset: 1610323] --- src/vm/genericdict.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/vm/genericdict.cpp') diff --git a/src/vm/genericdict.cpp b/src/vm/genericdict.cpp index 65638d1402..dfb9ea94dd 100644 --- a/src/vm/genericdict.cpp +++ b/src/vm/genericdict.cpp @@ -682,7 +682,10 @@ Dictionary::PopulateEntry( th = th.GetMethodTable()->GetMethodTableMatchingParentClass(declaringType.AsMethodTable()); } - th.GetMethodTable()->EnsureInstanceActive(); + if (!IsCompilationProcess()) + { + th.GetMethodTable()->EnsureInstanceActive(); + } result = (CORINFO_GENERIC_HANDLE)th.AsPtr(); break; @@ -917,7 +920,10 @@ Dictionary::PopulateEntry( DWORD fieldIndex; IfFailThrow(ptr.GetData(&fieldIndex)); - th.AsMethodTable()->EnsureInstanceActive(); + if (!IsCompilationProcess()) + { + th.AsMethodTable()->EnsureInstanceActive(); + } result = (CORINFO_GENERIC_HANDLE)th.AsMethodTable()->GetFieldDescByIndex(fieldIndex); break; -- cgit v1.2.3