Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 0108cb0

Browse files
committed
Delete superfluous check in funceval.cpp
Func-eval'ing BCL methods with the DynamicSecurityMethod attribute causes an ArgumentException.
1 parent 5d16dab commit 0108cb0

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

src/debug/ee/funceval.cpp

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,22 +1559,7 @@ void ResolveFuncEvalGenericArgInfo(DebuggerEval *pDE)
15591559

15601560
// We better have a MethodDesc at this point.
15611561
_ASSERTE(pDE->m_md != NULL);
1562-
1563-
IMDInternalImport *pInternalImport = pDE->m_md->GetMDImport();
1564-
DWORD dwAttr;
1565-
if (FAILED(pInternalImport->GetMethodDefProps(pDE->m_methodToken, &dwAttr)))
1566-
{
1567-
COMPlusThrow(kArgumentException, W("Argument_InvalidGenericArg"));
1568-
}
1569-
1570-
if (dwAttr & mdRequireSecObject)
1571-
{
1572-
// command window cannot evaluate a function with mdRequireSecObject is turned on because
1573-
// this is expecting to put a security object into caller's frame which we don't have.
1574-
//
1575-
COMPlusThrow(kArgumentException,W("Argument_CantCallSecObjFunc"));
1576-
}
1577-
1562+
15781563
ValidateFuncEvalReturnType(pDE->m_evalType , pDE->m_md->GetMethodTable());
15791564

15801565
// If this is a new object operation, then we should have a .ctor.

src/mscorlib/Resources/Strings.resx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -868,9 +868,6 @@
868868
<data name="Argument_CannotSetParentToInterface" xml:space="preserve">
869869
<value>Cannot set parent to an interface.</value>
870870
</data>
871-
<data name="Argument_CantCallSecObjFunc" xml:space="preserve">
872-
<value>Cannot evaluate a security function.</value>
873-
</data>
874871
<data name="Argument_CodepageNotSupported" xml:space="preserve">
875872
<value>{0} is not a supported code page.</value>
876873
</data>

0 commit comments

Comments
 (0)