[runtime] Attach the current thread in xamarin_invoke_trampoline.
It's entirely possible to call xamarin_invoke_trampoline on a thread we've never heard about before.
This commit is contained in:
Родитель
4a5ce42b48
Коммит
ac8d493581
|
@ -44,7 +44,7 @@ xamarin_invoke_trampoline (enum TrampolineType type, id self, SEL sel, iterator_
|
|||
}
|
||||
}
|
||||
|
||||
MONO_BEGIN_GC_UNSAFE;
|
||||
MONO_THREAD_ATTACH; // COOP: This will swith to GC_UNSAFE
|
||||
|
||||
// pre-prolog
|
||||
SList *dispose_list = NULL;
|
||||
|
@ -467,5 +467,5 @@ xamarin_invoke_trampoline (enum TrampolineType type, id self, SEL sel, iterator_
|
|||
|
||||
xamarin_process_managed_exception (exception);
|
||||
|
||||
MONO_END_GC_UNSAFE;
|
||||
MONO_THREAD_DETACH; // COOP: This will switch to GC_SAFE
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче