From: Yi Zhang (CLR) Date: Sat, 10 Jun 2017 16:08:41 +0000 (-0700) Subject: Disable IEnumerable.GetEnumerator on RCW through IDispatch (#11865) X-Git-Tag: accepted/tizen/base/20180629.140029~1083^2~482 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4a4144b622e4304ca04d450807a18807027ab38;p=platform%2Fupstream%2Fcoreclr.git Disable IEnumerable.GetEnumerator on RCW through IDispatch (#11865) --- diff --git a/src/vm/mngstdinterfaces.cpp b/src/vm/mngstdinterfaces.cpp index ec1475d..5aafe8a 100644 --- a/src/vm/mngstdinterfaces.cpp +++ b/src/vm/mngstdinterfaces.cpp @@ -994,8 +994,9 @@ FCIMPL1(Object*, StdMngIEnumerable::GetEnumerator, Object* refThisUNSAFE) if (retVal == NULL) { - // classic COM interop scenario - retVal = ObjectToOBJECTREF((Object*)GetEnumeratorWorker(args)); + // In desktop CLR we'll attempt to call through IDispatch(DISPID_NEWENUM) + // This is not supported in CoreCLR + COMPlusThrow(kPlatformNotSupportedException, IDS_EE_ERROR_IDISPATCH); } GCPROTECT_END();