@@ -4178,11 +4178,9 @@ thread_startup (MonoProfiler *prof, uintptr_t tid)
4178
4178
tls = g_new0 (DebuggerTlsData , 1 );
4179
4179
#endif
4180
4180
MONO_GC_REGISTER_ROOT_SINGLE (tls -> thread , MONO_ROOT_SOURCE_DEBUGGER , NULL , "Debugger Thread Reference" );
4181
+ mono_gc_wbarrier_set_field (tls , (void * * )& tls -> thread , thread );
4181
4182
#ifdef RUNTIME_IL2CPP
4182
- il2cpp_gc_wbarrier_set_field (tls , (void * * )& tls -> thread , thread );
4183
4183
tls -> il2cpp_context = il2cpp_debugger_get_thread_context ();
4184
- #else
4185
- tls -> thread = thread ;
4186
4184
#endif
4187
4185
mono_native_tls_set_value (debugger_tls_id , tls );
4188
4186
@@ -4220,11 +4218,7 @@ thread_end (MonoProfiler *prof, uintptr_t tid)
4220
4218
#ifndef RUNTIME_IL2CPP
4221
4219
MONO_GC_UNREGISTER_ROOT (tls -> thread );
4222
4220
#endif
4223
- #ifdef RUNTIME_IL2CPP
4224
- il2cpp_gc_wbarrier_set_field (tls , (void * * )& tls -> thread , NULL );
4225
- #else
4226
- tls -> thread = NULL ;
4227
- #endif
4221
+ mono_gc_wbarrier_set_field (tls , (void * * )& tls -> thread , NULL );
4228
4222
}
4229
4223
}
4230
4224
mono_loader_unlock ();
@@ -7736,11 +7730,7 @@ decode_value_internal (MonoType *t, int type, MonoDomain *domain, guint8 *addr,
7736
7730
g_free (vtype_buf );
7737
7731
return err ;
7738
7732
}
7739
- #ifdef RUNTIME_IL2CPP
7740
- il2cpp_gc_wbarrier_set_field (NULL , (void * * )addr , mono_value_box_checked (d , klass , vtype_buf , & error ));
7741
- #else
7742
- * (MonoObject * * )addr = mono_value_box_checked (d , klass , vtype_buf , & error );
7743
- #endif
7733
+ mono_gc_wbarrier_set_field (NULL , (void * * )addr , mono_value_box_checked (d , klass , vtype_buf , & error ));
7744
7734
mono_error_cleanup (& error );
7745
7735
g_free (vtype_buf );
7746
7736
} else {
0 commit comments