0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib
cPhost bb59d2bd19
repl: avoid crashing from null and undefined errors
When `throw undefined` or `throw null` is executed, the REPL crashes.
This change does a check for `null|undefined` before accessing an
error's properties to prevent crashing.

Fixes: https://github.com/nodejs/node/issues/16545
Fixes: https://github.com/nodejs/node/issues/16607

PR-URL: https://github.com/nodejs/node/pull/16574
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Lance Ball <lball@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-31 14:37:37 -04:00
..
internal crypto: migrate CipherBase to internal/errors 2017-10-30 07:56:27 -07:00
_http_agent.js lib: use destructuring for some constants 2017-10-16 23:34:32 +02:00
_http_client.js http: do not blindly destroy UNIX domain sockets 2017-10-23 12:13:03 -04:00
_http_common.js lib: use destructuring for some constants 2017-10-16 23:34:32 +02:00
_http_incoming.js tools: enable additional eslint rules 2017-10-19 13:54:14 -04:00
_http_outgoing.js tools: enable additional eslint rules 2017-10-19 13:54:14 -04:00
_http_server.js http: support generic Duplex streams 2017-10-23 17:11:57 +02:00
_stream_duplex.js stream: add destroy and _destroy methods. 2017-05-22 08:34:14 +02:00
_stream_passthrough.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_stream_readable.js stream: complete migration to internal/errors 2017-10-29 18:57:28 +01:00
_stream_transform.js stream: migrate to internal/errors 2017-10-01 20:37:00 -03:00
_stream_wrap.js lib: move _stream_wrap into internals 2017-10-19 18:06:27 +02:00
_stream_writable.js stream: complete migration to internal/errors 2017-10-29 18:57:28 +01:00
_tls_common.js lib: use destructuring for some constants 2017-10-16 23:34:32 +02:00
_tls_legacy.js tools: enable additional eslint rules 2017-10-19 13:54:14 -04:00
_tls_wrap.js tls: properly track writeQueueSize during writes 2017-10-21 09:48:36 -04:00
.eslintrc.yaml tools: remove legacy indentation linting 2017-07-30 09:21:52 -07:00
assert.js util,assert: expose util.isDeepStrictEqual() 2017-10-25 22:30:37 -07:00
async_hooks.js async_hooks: skip runtime checks when disabled 2017-10-19 12:45:21 +02:00
buffer.js buffer: move setupBufferJS to internal 2017-10-25 10:36:17 -07:00
child_process.js child_process: restore exec{File}Sync error props 2017-10-23 14:09:11 +02:00
cluster.js lib: use consistent indentation for ternaries 2017-07-07 06:57:16 -07:00
console.js console: improve console.group() 2017-08-25 11:29:33 -07:00
constants.js src: add support to pass flags to dlopen 2017-09-08 17:14:03 -04:00
crypto.js crypto: migrate setFipsCrypto to internal/errors 2017-10-27 08:13:01 -07:00
dgram.js lib: use destructuring for some constants 2017-10-16 23:34:32 +02:00
dns.js lib: use destructuring for some constants 2017-10-16 23:34:32 +02:00
domain.js lib: use destructuring for some constants 2017-10-16 23:34:32 +02:00
events.js events: onceWrapper apply directly with arguments 2017-10-21 09:29:09 -04:00
fs.js tools: enable additional eslint rules 2017-10-19 13:54:14 -04:00
http2.js http2: refactor error handling 2017-08-28 00:39:42 +04:00
http.js lib: use destructuring for some constants 2017-10-16 23:34:32 +02:00
https.js https: refactor to use http internals 2017-10-26 15:47:29 -07:00
inspector.js inspector: migrate to internal/errors 2017-10-16 09:31:18 -07:00
module.js module: revert #3384 DEP0019 EOL 2017-10-31 09:14:19 -07:00
net.js net: fix timeout with null handle 2017-10-25 14:48:30 -04:00
os.js lib: use destructuring for some constants 2017-10-16 23:34:32 +02:00
path.js tools: enable additional eslint rules 2017-10-19 13:54:14 -04:00
perf_hooks.js perf_hooks: implementation of the perf timing API 2017-08-23 16:00:09 -07:00
process.js
punycode.js
querystring.js querystring: convert to using internal/errors 2017-10-28 14:04:53 -04:00
readline.js lib: use destructuring for some constants 2017-10-16 23:34:32 +02:00
repl.js repl: avoid crashing from null and undefined errors 2017-10-31 14:37:37 -04:00
stream.js lib: use destructuring for some constants 2017-10-16 23:34:32 +02:00
string_decoder.js lib: use destructuring for some constants 2017-10-16 23:34:32 +02:00
sys.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
timers.js timers: cleanup extraneous property on Immediates 2017-10-23 11:02:53 +02:00
tls.js lib: faster type checks for some types 2017-10-01 23:58:59 -03:00
tty.js tty,doc: add type-check to isatty 2017-10-22 16:51:10 -07:00
url.js lib: move duplicate spliceOne into internal/util 2017-10-20 15:51:20 -04:00
util.js util,assert: expose util.isDeepStrictEqual() 2017-10-25 22:30:37 -07:00
v8.js v8: migrate setFlagsFromString to internal/errors 2017-10-29 17:04:27 -07:00
vm.js vm: deprecate vm.runInDebugContext 2017-10-23 17:17:16 +02:00
zlib.js zlib: gracefully set windowBits from 8 to 9 2017-10-29 20:14:01 +01:00