Skip to content

Commit

Permalink
Delete unused bSecurityCheck argument of GetComIPFromObjectRef
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotas committed May 7, 2020
1 parent e4348f4 commit 0bf8a16
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/coreclr/src/vm/comcallablewrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3678,8 +3678,7 @@ IDispatch* ComCallWrapper::GetIDispatchIP()
CorIfaceAttr ifaceType = hndDefItfClass.GetMethodTable()->GetComInterfaceType();
if (IsDispatchBasedItf(ifaceType))
{
RETURN (IDispatch*)GetComIPFromCCW(this, GUID_NULL, hndDefItfClass.GetMethodTable(),
GetComIPFromCCW::SuppressSecurityCheck);
RETURN (IDispatch*)GetComIPFromCCW(this, GUID_NULL, hndDefItfClass.GetMethodTable());
}
else
{
Expand Down
3 changes: 1 addition & 2 deletions src/coreclr/src/vm/comcallablewrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -957,8 +957,7 @@ struct GetComIPFromCCW
{
None = 0,
CheckVisibility = 1,
SuppressSecurityCheck = 2,
SuppressCustomizedQueryInterface = 4
SuppressCustomizedQueryInterface = 2
};
};

Expand Down
3 changes: 1 addition & 2 deletions src/coreclr/src/vm/interopconverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ namespace
//--------------------------------------------------------------------------------
// IUnknown *GetComIPFromObjectRef(OBJECTREF *poref, MethodTable *pMT, ...)
// Convert ObjectRef to a COM IP, based on MethodTable* pMT.
IUnknown *GetComIPFromObjectRef(OBJECTREF *poref, MethodTable *pMT, BOOL bSecurityCheck, BOOL bEnableCustomizedQueryInterface)
IUnknown *GetComIPFromObjectRef(OBJECTREF *poref, MethodTable *pMT, BOOL bEnableCustomizedQueryInterface)
{
CONTRACT (IUnknown*)
{
Expand Down Expand Up @@ -119,7 +119,6 @@ IUnknown *GetComIPFromObjectRef(OBJECTREF *poref, MethodTable *pMT, BOOL bSecuri
CCWHolder pCCWHold = ComCallWrapper::InlineGetWrapper(poref);

GetComIPFromCCW::flags flags = GetComIPFromCCW::None;
if (!bSecurityCheck) { flags |= GetComIPFromCCW::SuppressSecurityCheck; }
if (!bEnableCustomizedQueryInterface) { flags |= GetComIPFromCCW::SuppressCustomizedQueryInterface; }

pUnk = ComCallWrapper::GetComIPFromCCW(pCCWHold, GUID_NULL, pMT, flags);
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/vm/interopconverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ enum ComIpType
//--------------------------------------------------------------------------------
// IUnknown *GetComIPFromObjectRef(OBJECTREF *poref, MethodTable *pMT, ...);
// Convert ObjectRef to a COM IP, based on MethodTable* pMT.
IUnknown *GetComIPFromObjectRef(OBJECTREF *poref, MethodTable *pMT, BOOL bSecurityCheck = TRUE, BOOL bEnableCustomizedQueryInterface = TRUE);
IUnknown *GetComIPFromObjectRef(OBJECTREF *poref, MethodTable *pMT, BOOL bEnableCustomizedQueryInterface = TRUE);


//--------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/vm/marshalnative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ FCIMPL4(IUnknown*, MarshalNative::GetComInterfaceForObjectNative, Object* orefUN
if (fOnlyInContext && !IsObjectInContext(&oref))
retVal = NULL;
else
retVal = GetComIPFromObjectRef(&oref, th.GetMethodTable(), TRUE, bEnableCustomizedQueryInterface);
retVal = GetComIPFromObjectRef(&oref, th.GetMethodTable(), bEnableCustomizedQueryInterface);

HELPER_METHOD_FRAME_END();
return retVal;
Expand Down

0 comments on commit 0bf8a16

Please sign in to comment.