mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	[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:
		
							parent
							
								
									01ab29cc28
								
							
						
					
					
						commit
						9636d14f6f
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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 = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue