mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
src: don't run tasks on isolate termination
Fixes: https://github.com/nodejs/node/issues/45419 PR-URL: https://github.com/nodejs/node/pull/45444 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
9c39b5ec48
commit
2c6a4fd6fa
1 file changed
+1
-1
@@ -406,7 +406,7 @@ int NodePlatform::NumberOfWorkerThreads() {
|
||||
}
|
||||
|
||||
void PerIsolatePlatformData::RunForegroundTask(std::unique_ptr<Task> task) {
|
||||
if (isolate_->IsExecutionTerminating()) return task->Run();
|
||||
if (isolate_->IsExecutionTerminating()) return;
|
||||
DebugSealHandleScope scope(isolate_);
|
||||
Environment* env = Environment::GetCurrent(isolate_);
|
||||
if (env != nullptr) {
|
||||
|
||||
Reference in new issue
Block a user