Граф коммитов

4 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge ac45813621 [runtime] Call mono_raise_exception if mono_set_pending_exception isn't available. Works around bug #59979 (#2845)
mono_set_pending_exception is a private mono symbol, which means we won't find
it when using the system mono (as a dynamic library). In that case, we'd
abort.

Instead try to call mono_raise_exception, and hope for the best. It will leak
somewhat, but that's still better than asserting.

This changes the generated wrapper function from:

```c
MONO_API void
mono_set_pending_exception (MonoException * exc)
{
	if (mono_set_pending_exception_func == NULL)
		xamarin_assertion_message ("Could not load mono_set_pending_exception\n");

	return mono_set_pending_exception_func (exc);
}
```

to

```c
MONO_API void
mono_set_pending_exception (MonoException * exc)
{
	if (mono_set_pending_exception_func == NULL)
		return mono_raise_exception (exc);

	return mono_set_pending_exception_func (exc);
}
```

Also this only applies to Xamarin.Mac apps that use the system mono (such as VSfM).

https://bugzilla.xamarin.com/show_bug.cgi?id=59979
2017-10-05 18:13:44 +02:00
Rolf Bjarne Kvinge fb463ed921 [registrar] Don't require private mono symbols for BindAs support.
The two functions mono_class_is_nullable and mono_class_get_nullable_param are
private mono symbols, which means we can't call them when using Xamarin.Mac
with libmono from a dynamic library.

Implement a fallback for this case, where we call a managed method when these
functions are not available (and restrict this workaround to Xamarin.Mac only,
since it's not needed for Xamarin.iOS).
2017-07-04 18:33:32 +02:00
Rolf Bjarne Kvinge cfb84f6e17 [runtime] Use printf on watchOS, NSLog doesn't shown up (by default) (#772)
* [runtime] Use printf on watchOS, NSLog doesn't shown up (by default).

* [runtime] Use a wrapper function for logging.

So that we can chose between printf and NSLog at runtime,
depending on where we're running.
2016-09-06 16:55:23 -04:00
Rolf Bjarne Kvinge ac418df815 Build our runtime. 2016-04-24 14:47:24 -04:00