static EphemeronLinkNode *ephemeron_list;
/* LOCKING: requires that the GC lock is held */
-static void
+static MONO_PERMIT (need (sgen_gc_locked)) void
null_ephemerons_for_domain (MonoDomain *domain)
{
EphemeronLinkNode *current = ephemeron_list, *prev = NULL;
tid = mono_thread_info_get_tid (p);
- if (p->client_info.info.runtime_thread)
- mono_threads_add_joinable_thread ((gpointer)tid);
+ mono_threads_add_joinable_runtime_thread (&p->client_info.info);
if (mono_gc_get_gc_callbacks ()->thread_detach_func) {
mono_gc_get_gc_callbacks ()->thread_detach_func (p->client_info.runtime_data);
{
scan_area_arg_start = start_nursery;
scan_area_arg_end = end_nursery;
+#ifdef HOST_WASM
+ //Under WASM we don't scan thread stacks and we can't trust the values we find there either.
+ return;
+#endif
FOREACH_THREAD (info) {
int skip_reason = 0;