node/lib/internal/process
Joyee Cheung d18b0a0132
process: make tick callback and promise rejection callback more robust
- Rename `internalTickCallback` to `processTicksAndRejections`, make
  sure it does not get called if it's not set in C++.
- Rename `emitPromiseRejectionWarnings` to `processPromiseRejections`
  since it also emit events that are not warnings.
- Sets `SetPromiseRejectCallback` in the `Environment` constructor
  to make sure it only gets called once per-isolate, and make
  sure it does not get called if it's not set in C++.
- Wrap promise rejection callback initialization into
  `listenForRejections()`.
- Add comments.

PR-URL: https://github.com/nodejs/node/pull/25200
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-06 10:28:47 +08:00
..
coverage.js src: use internalBinding('config').hasInspector in JS land 2019-01-05 01:25:31 +08:00
esm_loader.js src: cache the result of GetOptions() in JS land 2018-11-07 20:40:38 -08:00
execution.js process: move eval and exception bootstrap ito process/execution.js 2018-12-31 14:19:48 +08:00
main_thread_only.js process: split worker IO into internal/worker/io.js 2018-12-31 14:19:49 +08:00
next_tick.js process: make tick callback and promise rejection callback more robust 2019-01-06 10:28:47 +08:00
per_thread.js process: move eval and exception bootstrap ito process/execution.js 2018-12-31 14:19:48 +08:00
promises.js process: make tick callback and promise rejection callback more robust 2019-01-06 10:28:47 +08:00
stdio.js process: split worker IO into internal/worker/io.js 2018-12-31 14:19:49 +08:00
warning.js process: move setup of process warnings into node.js 2018-12-31 15:10:00 +08:00
worker_thread_only.js process: move worker bootstrap code into worker_thread_only.js 2018-12-31 14:19:51 +08:00
write-coverage.js process: fix coverage generation 2017-12-14 00:49:55 +01:00