Skip to content

Commit 4aed176

Browse files
juanarboldanielleadams
authored andcommitted
src: document required else block at src/node_platform.cc
PR-URL: #34688 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 79e3e50 commit 4aed176

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/node_platform.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,9 @@ void PerIsolatePlatformData::RunForegroundTask(std::unique_ptr<Task> task) {
409409
InternalCallbackScope::kNoFlags);
410410
task->Run();
411411
} else {
412+
// The task is moved out of InternalCallbackScope if env is not available.
413+
// This is a required else block, and should not be removed.
414+
// See comment: https://github.com/nodejs/node/pull/34688#pullrequestreview-463867489
412415
task->Run();
413416
}
414417
}

0 commit comments

Comments
 (0)