Skip to content

Commit 32a1961

Browse files
committed
src: call uv_library_shutdown before DisposePlatform
When the process exits, there may be tasks in the thread pool that need to access data in the platform, such as trace agent. So make sure the thread pool exits first. see #44458
1 parent 806ea92 commit 32a1961

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/environment.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,8 +773,8 @@ void DefaultProcessExitHandlerInternal(Environment* env, ExitCode exit_code) {
773773
env->set_can_call_into_js(false);
774774
env->stop_sub_worker_contexts();
775775
env->isolate()->DumpAndResetStats();
776-
DisposePlatform();
777776
uv_library_shutdown();
777+
DisposePlatform();
778778
Exit(exit_code);
779779
}
780780

0 commit comments

Comments
 (0)