[runtime] Don't consume exception if not allowed to
commit7b506511a9ccfb41e18858e4f27e54a034509b74
authorVlad Brezae <brezaevlad@gmail.com>
Wed, 10 May 2017 23:14:11 +0000 (11 02:14 +0300)
committerVlad Brezae <brezaevlad@gmail.com>
Mon, 22 May 2017 18:25:36 +0000 (22 21:25 +0300)
treef96be764d0c6c6d48c9ba3fa3d990262ff0479f5
parent384f7bdc62b410cc7c75a63041fb899e8004f1ba
[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