[memory_view] Acquire VM lock while running exported_object_registry_free

exported_object_registry is freed at exit, so this change is just in case.
This commit is contained in:
Kenta Murata 2020-12-23 00:51:26 +09:00
parent 01ab29cc28
commit 9636d14f6f
No known key found for this signature in database
GPG Key ID: CEFE8AFB6081B062
1 changed files with 2 additions and 2 deletions

View File

@ -51,11 +51,11 @@ exported_object_registry_mark(void *ptr)
static void
exported_object_registry_free(void *ptr)
{
// Note that calling RB_VM_LOCK_ENTER here is unnecessary now.
// But it may be changed in the future.
RB_VM_LOCK_ENTER();
st_clear(exported_object_table);
st_free_table(exported_object_table);
exported_object_table = NULL;
RB_VM_LOCK_LEAVE();
}
const rb_data_type_t rb_memory_view_exported_object_registry_data_type = {