Skip to content

Commit 85e0af0

Browse files
committed
Better check for Boehm then using mono_gc_is_moving
1 parent 41258eb commit 85e0af0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mono/metadata/object.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1993,9 +1993,11 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *klass, MonoErro
19931993
* vtable field in MonoObject, since we can no longer assume the
19941994
* vtable is reachable by other roots after the appdomain is unloaded.
19951995
*/
1996-
if (!mono_gc_is_moving () && domain != mono_get_root_domain () && !mono_dont_free_domains)
1996+
#if HAVE_BOEHM_GC
1997+
if (domain != mono_get_root_domain () && !mono_dont_free_domains)
19971998
vt->gc_descr = MONO_GC_DESCRIPTOR_NULL;
19981999
else
2000+
#endif
19992001
vt->gc_descr = klass->gc_descr;
20002002

20012003
gc_bits = mono_gc_get_vtable_bits (klass);

0 commit comments

Comments
 (0)