Skip to content

Commit 5e5bf0c

Browse files
santigimenoruyadorno
authored andcommitted
src: don't run tasks on isolate termination
Fixes: #45419 PR-URL: #45444 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 10e7c2a commit 5e5bf0c

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)