[runtime] Handle RuntimeWrappedException and dynamic methods.
authorRodrigo Kumpera <kumpera@gmail.com>
Wed, 13 Sep 2017 23:12:57 +0000 (16:12 -0700)
committerRodrigo Kumpera <kumpera@gmail.com>
Mon, 25 Sep 2017 20:23:16 +0000 (13:23 -0700)
commit446728b335f0492671fc21ce76b27d063dcb7653
tree12818dbc35ede65680f9d236293a41a489e25c4d
parent5b681a16bd7aaf579f6b4a32eed36ee05bd4f562
[runtime] Handle RuntimeWrappedException and dynamic methods.

Introduce MonoDynamicMethod that holds the assembly of a DM (and TB).
Use it to determine the RuntimeWrappedException policy for exceptions.

This is needed cuz the assembly of a MonoMethod is normally found using method->parent->image->assembly.

But this doesn't work with DynamicMethods that don't define an owner type as they are forced to corlib's policy.

The default policy for DM's is to not wrap those exceptions and in the case a Module is provided, the policy of that module must be respected.

This commit handles all cases but when a Module is a SRE module.
mono/metadata/class-internals.h
mono/metadata/sre.c
mono/mini/mini-exceptions.c