| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b67c4b4 commit 5fe7741
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -862,10 +862,13 @@ void Environment::AsyncHooks::grow_async_ids_stack() { | |||
| 862 | 862 | uv_key_t Environment::thread_local_env = {}; | |
| 863 | 863 | ||
| 864 | 864 | void Environment::Exit(int exit_code) { | |
| 865 | - if (is_main_thread()) | ||
| 865 | + if (is_main_thread()) { | ||
| 866 | + stop_sub_worker_contexts(); | ||
| 867 | + DisposePlatform(); | ||
| 866 | 868 | exit(exit_code); | |
| 867 | - else | ||
| 869 | + } else { | ||
| 868 | 870 | worker_context_->Exit(exit_code); | |
| 871 | + } | ||
| 869 | 872 | } | |
| 870 | 873 | ||
| 871 | 874 | void Environment::stop_sub_worker_contexts() { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -337,6 +337,10 @@ tracing::AgentWriterHandle* GetTracingAgentWriter() { | |||
| 337 | 337 | return v8_platform.GetTracingAgentWriter(); | |
| 338 | 338 | } | |
| 339 | 339 | ||
| 340 | + void DisposePlatform() { | ||
| 341 | + v8_platform.Dispose(); | ||
| 342 | + } | ||
| 343 | + | ||
| 340 | 344 | #ifdef __POSIX__ | |
| 341 | 345 | static const unsigned kMaxSignal = 32; | |
| 342 | 346 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -358,6 +358,7 @@ int ThreadPoolWork::CancelWork() { | |||
| 358 | 358 | } | |
| 359 | 359 | ||
| 360 | 360 | tracing::AgentWriterHandle* GetTracingAgentWriter(); | |
| 361 | + void DisposePlatform(); | ||
| 361 | 362 | ||
| 362 | 363 | static inline const char* errno_string(int errorno) { | |
| 363 | 364 | #define ERRNO_CASE(e) case e: return #e; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments