0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
nodejs/lib
Anatoli Papirovski d62566e1b1
promises: refactor rejection handling
Remove the unnecessary microTasksTickObject for scheduling microtasks
and instead use TickInfo to keep track of whether promise rejections
exist that need to be emitted. Consequently allow the microtasks to
execute on average fewer times, in more predictable manner than
previously.

Simplify unhandled & handled rejection tracking to do more in C++ to
avoid needing to expose additional info in JS.

When new unhandledRejections are emitted within an unhandledRejection
handler, allow the event loop to proceed first instead. This means
that if the end-user code handles all promise rejections on nextTick,
rejections within unhandledRejection now won't spiral into an infinite
loop.

PR-URL: https://github.com/nodejs/node/pull/18207
Fixes: https://github.com/nodejs/node/issues/17913
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-01-21 12:37:43 -05:00
..
internal promises: refactor rejection handling 2018-01-21 12:37:43 -05:00
_http_agent.js lib: replace string concatenation with template 2017-11-11 10:52:23 +01:00
_http_client.js http: use strict comparison 2018-01-21 02:58:37 +01:00
_http_common.js http: fix parsing of binary upgrade response body 2018-01-21 01:50:56 +01:00
_http_incoming.js
_http_outgoing.js http: remove duplicate export 2018-01-04 18:22:59 -06:00
_http_server.js http: fix parsing of binary upgrade response body 2018-01-21 01:50:56 +01:00
_stream_duplex.js stream: rm {writeable/readable}State.length 2017-12-18 14:41:43 +01:00
_stream_passthrough.js
_stream_readable.js stream: added experimental support for for-await 2018-01-11 12:34:41 +01:00
_stream_transform.js
_stream_wrap.js
_stream_writable.js stream: rm {writeable/readable}State.length 2017-12-18 14:41:43 +01:00
_tls_common.js tls: implement clientCertEngine option 2017-11-11 13:35:23 -08:00
_tls_wrap.js tls: migrate C++ errors to internal/errors.js 2018-01-17 02:20:36 +08:00
.eslintrc.yaml lib: enable dot-notation eslint rule 2018-01-09 10:52:18 -05:00
assert.js assert: throw without args in ok 2018-01-16 19:57:36 +01:00
async_hooks.js async_hooks: rename initTriggerId 2017-12-19 18:04:43 +01:00
buffer.js lib: use american spelling as per style guide 2018-01-19 12:59:20 +01:00
child_process.js util: implement util.getSystemErrorName() 2018-01-20 08:51:47 +08:00
cluster.js
console.js console: make .assert standard compliant 2017-12-26 10:46:27 +01:00
constants.js
crypto.js crypto: migrate setFipsCrypto to internal/errors 2017-10-27 08:13:01 -07:00
dgram.js async_hooks: update defaultTriggerAsyncIdScope for perf 2018-01-09 10:43:00 -05:00
dns.js dns: fix crash while setting server during query 2017-12-06 04:22:31 +01:00
domain.js domain: fix error emit handling 2017-12-13 09:33:27 -05:00
events.js lib: combine similar error codes 2017-12-24 14:09:29 +08:00
fs.js fs: fix options.end of fs.ReadStream() 2018-01-18 08:47:07 +08:00
http2.js
http.js
https.js tls: implement clientCertEngine option 2017-11-11 13:35:23 -08:00
inspector.js lib: enable dot-notation eslint rule 2018-01-09 10:52:18 -05:00
module.js module: refactor loader 2018-01-15 12:42:29 -06:00
net.js process: use more direct sync I/O for stdio 2018-01-14 14:41:11 +01:00
os.js os: migrate node_os.cc to internal/errors 2017-11-02 11:58:38 -07:00
path.js path: fix path.normalize for relative paths 2018-01-11 11:11:22 +08:00
perf_hooks.js perf_hooks,http2: add performance.clear() 2018-01-11 10:41:49 -08:00
process.js
punycode.js
querystring.js querystring: convert to using internal/errors 2017-10-28 14:04:53 -04:00
readline.js readline: update references to archived repository 2018-01-03 18:22:52 +01:00
repl.js util: change util.inspect depth default 2018-01-16 15:34:03 +01:00
stream.js
string_decoder.js
sys.js
timers.js timers: allow Immediates to be unrefed 2018-01-18 15:55:59 -05:00
tls.js tls: make deprecated tls.createSecurePair() use public API 2018-01-14 14:49:41 +01:00
tty.js tty: fix console printing on Windows 2018-01-19 13:01:47 +01:00
url.js lib: improve the usage of TypeError[INVALID_ARG_TYPE] 2017-11-12 11:04:06 -08:00
util.js util: implement util.getSystemErrorName() 2018-01-20 08:51:47 +08:00
v8.js v8: migrate setFlagsFromString to internal/errors 2017-10-29 17:04:27 -07:00
vm.js vm: allow modifying context name in inspector 2017-12-23 14:05:18 +08:00
zlib.js zlib: add ArrayBuffer support 2017-12-13 06:23:23 +01:00