Skip to content

src: return early if nextTickQueue is empty

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Description of change

This brings the node::MakeCallback and node::AsyncWrap::MakeCallback implementations into alignment in that they return early if the nextTickQueue is empty after processing the MicrotaskQueue.

Include test to make sure early return happens. Test has text explaining the conditions for the test to pass, since it relies on internal mechanisms that aren't guaranteed in the future.

R=@bnoordhuis R=@addaleax

CI: https://ci.nodejs.org/job/node-test-commit/6652/

Merge request reports

Loading