diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2020-01-15 15:34:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-15 15:34:03 +0300 |
commit | 497c1f6b7c216fefbce50bd562bc67a368369aba (patch) | |
tree | 7a77b70339307466deba5c0003541c364f10eef6 /main/build/MacOSX/monostub.mm | |
parent | 5f722f649899330589c6c71f63dd69a9e368312e (diff) |
[Mac] Set Marshal*Exception modes (#9404)
* [Mac] Set Marshal*Exception modes
This should prevent hard crashing when working with exception handling in xammac
* Remove these
* Modify tests
Diffstat (limited to 'main/build/MacOSX/monostub.mm')
-rw-r--r-- | main/build/MacOSX/monostub.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/main/build/MacOSX/monostub.mm b/main/build/MacOSX/monostub.mm index bab07f5967..57424d4ef3 100644 --- a/main/build/MacOSX/monostub.mm +++ b/main/build/MacOSX/monostub.mm @@ -227,6 +227,12 @@ load_xammac() XAMARIN_CREATE_CLASSES (); } + void *ptr = dlsym(libxammac, "xamarin_marshal_objectivec_exception_mode"); + *(int*)ptr = 2; // MarshalObjectiveCExceptionModeThrowManagedException + + ptr = dlsym(libxammac, "xamarin_marshal_managed_exception_mode"); + *(int*)ptr = 2; // MarshalManagedExceptionModeThrowObjectiveCException + return libxammac; } |