src: set up process.nextTick and promise handlers with internalBinding('task_queue')
Please use https://github.com/nodejs/node/pull/25163/files?w=1 to skip indentation changes
src: move symbols binding into node_symbols.cc
src: move process.nextTick and promise setup into node_task_queue.cc
This patch:
- Moves the process.nextTick and promise setup C++ code into
node_task_queue.cc which is exposed as
internalBinding('task_queue')
- Makes
lib/internal/process/promises.js
andlib/internal/process/next_tick.js
as side-effect-free as possible - Removes the bootstrapper object being passed into
bootstrap/node.js
, letnext_tick.js
andpromises.js
load whatever they need frominternalBinding('task_queue')
instead. - Rename
process._tickCallback
torunNextTicks
internally for clarity but still expose it asprocess._tickCallback
.
Refs: https://github.com/nodejs/node/issues/24961
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines