Skip to content

Commit 2c6a4fd

Browse files
santigimenodanielleadams
authored andcommitted
src: don't run tasks on isolate termination
Fixes: #45419 PR-URL: #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>
1 parent 9c39b5e commit 2c6a4fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_platform.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ int NodePlatform::NumberOfWorkerThreads() {
406406
}
407407

408408
void PerIsolatePlatformData::RunForegroundTask(std::unique_ptr<Task> task) {
409-
if (isolate_->IsExecutionTerminating()) return task->Run();
409+
if (isolate_->IsExecutionTerminating()) return;
410410
DebugSealHandleScope scope(isolate_);
411411
Environment* env = Environment::GetCurrent(isolate_);
412412
if (env != nullptr) {

0 commit comments

Comments
 (0)