This reverts
authortijoytk <tijoytk@MUONNEUTRINO>
Wed, 23 Aug 2017 22:40:13 +0000 (15:40 -0700)
committertijoytk <tijoytk@MUONNEUTRINO>
Wed, 23 Aug 2017 22:40:13 +0000 (15:40 -0700)
https://github.com/dotnet/coreclr/commit/16fc3005c085212f6e700a0df8ff7f36c1ea535b
The PR was trying to fix an incorrect test , we should be passing
in !fForWinRT.See https://github.com/dotnet/coreclr/issues/13460#issuecomment-324456870
for more info.

src/vm/clrex.cpp
src/vm/clrex.h
src/vm/stubhelpers.cpp

index ba040b7..3b21d64 100644 (file)
@@ -1224,7 +1224,7 @@ OBJECTREF EEException::CreateThrowable()
 #endif
 }
 
-RuntimeExceptionKind EEException::GetKindFromHR(HRESULT hr, bool fIsWinRtMode)
+RuntimeExceptionKind EEException::GetKindFromHR(HRESULT hr, bool fIsWinRtMode /*= false*/)
 {
     LIMITED_METHOD_CONTRACT;
 
index ce55ebc..12eb702 100644 (file)
@@ -1095,7 +1095,7 @@ inline EEMessageException::EEMessageException(HRESULT hr)
 }
 
 inline EEMessageException::EEMessageException(HRESULT hr, bool fUseCOMException)
-  : EEException(GetKindFromHR(hr, fUseCOMException)),
+  : EEException(GetKindFromHR(hr, !fUseCOMException)),
     m_hr(hr),
     m_resID(0)
 {
index 43250e5..ead312d 100644 (file)
@@ -1690,7 +1690,7 @@ FCIMPL4(Object*, StubHelpers::GetCOMHRExceptionObject, HRESULT hr, MethodDesc *p
             }
         }
 
-        GetExceptionForHR(hr, pErrInfo, fForWinRT, &oThrowable, pResErrorInfo, bHasNonCLRLanguageErrorObject);
+        GetExceptionForHR(hr, pErrInfo, !fForWinRT, &oThrowable, pResErrorInfo, bHasNonCLRLanguageErrorObject);
     }
     HELPER_METHOD_FRAME_END();