[runtime] Don't consume exception if not allowed to
authorVlad Brezae <brezaevlad@gmail.com>
Wed, 10 May 2017 23:14:11 +0000 (02:14 +0300)
committerVlad Brezae <brezaevlad@gmail.com>
Wed, 10 May 2017 23:14:11 +0000 (02:14 +0300)
commit055b15e0420a3dced029f95067865703f7fcbef9
tree539b1f041e7a32cf1627ea66295dc1b8564efa28
parentc7e4ef422e9cd349f3ea162a72fdaac5846378d6
[runtime] Don't consume exception if not allowed to

The thread_state indicates whether we have a pending exception that needs to be consumed (be it sync or async). Normally we check the state before calling mono_thread_execute_interruption, but make sure we don't consume an exception if the thread_state doesn't allow us to (we can have an abort requested but mono_thread_clear_interruption_requested can return FALSE if we are inside an abort protected block and shouldn't process it)
mono/metadata/threads.c