Skip to content

Commit

Permalink
Fix setting of ResolutionFailed flag on boot (#1353)
Browse files Browse the repository at this point in the history
  • Loading branch information
josesimoes authored Jun 6, 2019
1 parent 4ef6b64 commit 2e794f2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/CLR/Startup/CLRStartup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ struct Settings
{
NANOCLR_HEADER();

// cler flag, in case EE wasn't restarted
// clear flag (in case EE wasn't restarted)
CLR_EE_DBG_CLR(StateResolutionFailed);

#if !defined(BUILD_RTM)
Expand Down Expand Up @@ -141,8 +141,11 @@ struct Settings
{
CLR_Debug::Printf( "Error: %08x\r\n", hr );

// exception occurred in assembly loading or type resolution
CLR_EE_DBG_SET(StateResolutionFailed);
if(hr == CLR_E_TYPE_UNAVAILABLE)
{
// exception occurred during type resolution
CLR_EE_DBG_SET(StateResolutionFailed);
}
}
#endif

Expand Down
14 changes: 13 additions & 1 deletion targets/os/win32/nanoCLR/CLRStartup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ struct Settings
{
NANOCLR_HEADER();

// clear flag (in case EE wasn't restarted)
CLR_EE_DBG_CLR(StateResolutionFailed);

#if defined(_WIN32)
CLR_RT_StringVector vec;

Expand Down Expand Up @@ -219,7 +222,16 @@ struct Settings
NANOCLR_CLEANUP();

#if !defined(BUILD_RTM)
if(FAILED(hr)) CLR_Debug::Printf( "Error: %08x\r\n", hr );
if(FAILED(hr))
{
CLR_Debug::Printf( "Error: %08x\r\n", hr );

if(hr == CLR_E_TYPE_UNAVAILABLE)
{
// exception occurred during type resolution
CLR_EE_DBG_SET(StateResolutionFailed);
}
}
#endif

NANOCLR_CLEANUP_END();
Expand Down

0 comments on commit 2e794f2

Please sign in to comment.