Run microtask before handling pending process.nextTick tasks
This follows the behavior of Node.js.
This commit is contained in:
		
					parent
					
						
							
								1bb0dde360
							
						
					
				
			
			
				commit
				
					
						c51f349dfa
					
				
			
		
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -98,6 +98,10 @@ void AtomBindings::OnCallNextTick(uv_async_t* handle) {
 | 
				
			||||||
    if (tick_info->in_tick())
 | 
					    if (tick_info->in_tick())
 | 
				
			||||||
      continue;
 | 
					      continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (tick_info->length() == 0) {
 | 
				
			||||||
 | 
					      env->isolate()->RunMicrotasks();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (tick_info->length() == 0) {
 | 
					    if (tick_info->length() == 0) {
 | 
				
			||||||
      tick_info->set_index(0);
 | 
					      tick_info->set_index(0);
 | 
				
			||||||
      continue;
 | 
					      continue;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue