[runtime] Move mono_invoke_unhandled_exception_hook to metadata
authorAleksey Kliger <aleksey@xamarin.com>
Fri, 29 Jul 2016 16:55:35 +0000 (12:55 -0400)
committerAleksey Kliger <aleksey@xamarin.com>
Fri, 29 Jul 2016 16:55:35 +0000 (12:55 -0400)
commit00bf8defb4a2c6b678d34d32bec010743df4f8c3
tree5ac0012c56b9bb8a4801820aaf316fd8967f9d78
parent6af085036b89785c44bd908bee8c426f4ed25f5c
[runtime] Move mono_invoke_unhandled_exception_hook to metadata

And call it consistently in thread start functions when the managed
thread start function returns with an exception.

(If coop is not enabled, the exception handler unwinds the thread and
when there's no handler invokes the unhandled exception hook via
jit_tls->abort_func, so this is just for the coop case.)

Fixes mono/tests/unhandled-exception-1.cs for coop and bitcode.
mono/metadata/exception.c
mono/metadata/exception.h
mono/metadata/threads.c
mono/mini/driver.c
mono/mini/mini-exceptions.c
mono/mini/mini-llvm.c
mono/mini/mini.h