0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
nodejs/lib
Daniel Bevenius f2defcac4d src: fix error message in async_hooks constructor
There are two minor issues in the AsyncHook constructor, if the object
passed in has an after and/or destroy property that are not functions
the errors thrown will still be:
TypeError [ERR_ASYNC_CALLBACK]: before must be a function

This commit updates the code and adds a unit test.

PR-URL: https://github.com/nodejs/node/pull/19000
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-02-28 07:31:02 +01:00
..
fs fs: move fs.promises API to fs/promises 2018-02-17 10:15:20 +01:00
internal http2: fix condition where data is lost 2018-02-26 18:25:58 +01:00
_http_agent.js http: allow _httpMessage to be GC'ed 2018-02-22 14:27:19 +00:00
_http_client.js http: remove default 'drain' listener on upgrade 2018-02-22 15:51:25 +00:00
_http_common.js http: simplify checkInvalidHeaderChar 2018-02-16 19:27:28 +01:00
_http_incoming.js http: do not replace .read() in IncomingMessage 2018-02-27 12:26:40 +01:00
_http_outgoing.js http: OutgoingMessage.end() should return this 2018-02-19 08:59:32 +01:00
_http_server.js http: remove default 'error' listener on upgrade 2018-02-22 14:58:47 +00:00
_stream_duplex.js
_stream_passthrough.js
_stream_readable.js lib: switch to Number.isNaN 2018-02-16 18:09:56 +01:00
_stream_transform.js stream: delete unused code 2018-02-02 23:00:50 +01:00
_stream_wrap.js
_stream_writable.js stream: writable.end should return this. 2018-02-19 08:59:12 +01:00
_tls_common.js
_tls_wrap.js crypto: provide full cert details to checkServerIdentity 2018-02-22 11:22:04 +01:00
.eslintrc.yaml lint: move eslint to new plugin system 2018-02-20 13:13:22 -06:00
assert.js assert: fix throws trace 2018-02-09 08:45:51 -05:00
async_hooks.js src: fix error message in async_hooks constructor 2018-02-28 07:31:02 +01:00
buffer.js lib: switch to Number.isNaN 2018-02-16 18:09:56 +01:00
child_process.js
cluster.js
console.js console: port errors to new system 2018-02-22 13:36:22 +00:00
constants.js
crypto.js
dgram.js async_hooks: clean up usage in internal code 2018-02-16 14:23:14 -05:00
dns.js errors: move error creation helpers to errors.js 2018-02-07 18:42:40 +08:00
domain.js domain: runtime deprecate MakeCallback 2018-02-09 10:38:50 +01:00
events.js events: preset usingDomains to false 2018-02-22 20:33:10 -05:00
fs.js fs: throw copyFileSync errors in JS 2018-02-27 20:34:18 +08:00
http2.js
http.js
https.js https: add extra options to Agent#getName() 2018-02-10 14:15:57 +01:00
inspector.js
module.js module: replace magic numbers by constants 2018-02-16 19:32:03 +01:00
net.js net: inline and simplify onSocketEnd 2018-02-22 11:10:14 +01:00
os.js lib,src: audit process.env in lib/ for setuid binary 2018-02-16 17:42:21 +01:00
path.js path: replace duplicate conditions by functions 2018-02-17 14:53:58 +01:00
perf_hooks.js perf_hooks: make PerformanceObserver an AsyncResource 2018-02-26 13:55:51 -08:00
process.js
punycode.js
querystring.js
readline.js lib: switch to Number.isNaN 2018-02-16 18:09:56 +01:00
repl.js repl: fix tab-complete warning 2018-02-22 15:07:05 +00:00
stream.js tools: non-Ascii linter for /lib only 2018-02-04 16:55:13 +01:00
string_decoder.js string_decoder: fix regressions 2018-02-13 08:03:23 -05:00
sys.js
timers.js lint: move eslint to new plugin system 2018-02-20 13:13:22 -06:00
tls.js
tty.js errors: move error creation helpers to errors.js 2018-02-07 18:42:40 +08:00
url.js url: reduce deplicated codes in autoEscapeStr 2018-02-23 15:46:05 +08:00
util.js util: use blue on non-windows systems for number/bigint 2018-02-25 17:03:34 -06:00
v8.js
vm.js vm: consolidate validation 2018-02-22 12:08:01 +01:00
zlib.js zlib: improve zlib errors 2018-02-25 02:31:14 +08:00