Skip to content

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 and lib/internal/process/next_tick.js as side-effect-free as possible
  • Removes the bootstrapper object being passed into bootstrap/node.js, let next_tick.js and promises.js load whatever they need from internalBinding('task_queue') instead.
  • Rename process._tickCallback to runNextTicks internally for clarity but still expose it as process._tickCallback.

Refs: https://github.com/nodejs/node/issues/24961

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading