[runtime] Fix monitor exception throwing
authorVlad Brezae <brezaevlad@gmail.com>
Tue, 15 Nov 2016 15:56:22 +0000 (17:56 +0200)
committerVlad Brezae <brezaevlad@gmail.com>
Tue, 15 Nov 2016 16:05:46 +0000 (18:05 +0200)
commitab5d9db4d1a09e1d418846e176c141116292e3b1
treeb937aaffd0006e24b2a64b523e82a3baa5aee4cf
parente8c35444473963aaadfb528644ba4c90801b2a4a
[runtime] Fix monitor exception throwing

mono_monitor_ensure_owned used to throw exception directly and not return. After switching the runtime to use pending exceptions, monitor code would continue running assuming we owned to monitor.

Fixes 46994
mono/metadata/monitor.c