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

3 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 5f6134bca3 [monotouch-test] Fix tests causing trouble for the AOT compiler. (#2846)
Fix tests causing trouble for the AOT compiler by not building those tests on
device (they're testing error conditions in the simulator, which means it's
acceptable to exclude these tests for device builds).

This fixes an AOT-compiler assert:

> * Assertion at /Users/builder/data/lanes/1381/d264709b/source/xamarin-macios/external/mono/mono/metadata/marshal.c:8497, condition `sig->param_count == invoke_sig->param_count + 1' not met

due to invalid [MonoPInvokeCallback] attributes.
2017-10-06 10:16:56 +02:00
Rolf Bjarne Kvinge d264709b8d Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as the trampoline. (#2822)
* Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as the trampoline.

Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as
the trampoline, so that it's safer for normal users (crashes due to incorrect
usage are rare and random, and as such they're also hard to track down).

Additionally introduce a BlockLiteral.SetupBlockUnsafe method, that still has
the old behavior, so that we can use it in our own (reviewed) code.

* [ObjCRuntime] Add some validation to BlockLiteral.SetupBlock.

* Use BlockLiteral.SetupBlockUnsafe instead of .SetupBlock

Use SetupBlockUnsafe in our own code, because we know our own code is using it
correctly (by passing a trampoline stored in a static field, so that the GC
doesn't free it).

* [tests] Fix xammac tests build.
2017-10-03 18:59:10 +02:00
Rolf Bjarne Kvinge ecfdea9508 [tests] Import 2016-05-26 15:06:52 +02:00