{
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;
sgen_client_gchandle_created (int handle_type, GCObject *obj, guint32 handle)
{
#ifndef DISABLE_PERFCOUNTERS
- mono_perfcounters->gc_num_handles++;
+ InterlockedIncrement (&mono_perfcounters->gc_num_handles);
#endif
MONO_PROFILER_RAISE (gc_handle_created, (handle, handle_type, obj));
sgen_client_gchandle_destroyed (int handle_type, guint32 handle)
{
#ifndef DISABLE_PERFCOUNTERS
- mono_perfcounters->gc_num_handles--;
+ InterlockedDecrement (&mono_perfcounters->gc_num_handles);
#endif
MONO_PROFILER_RAISE (gc_handle_deleted, (handle, handle_type));