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
_http_client.js http: do not blindly destroy UNIX domain sockets 2017-10-23 12:13:03 -04:00
_http_common.js
_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_passthrough.js
_stream_readable.js stream: complete migration to internal/errors 2017-10-29 18:57:28 +01:00
_stream_transform.js
_stream_wrap.js
_stream_writable.js stream: complete migration to internal/errors 2017-10-29 18:57:28 +01:00
_tls_common.js
_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
assert.js util,assert: expose util.isDeepStrictEqual() 2017-10-25 22:30:37 -07:00
async_hooks.js
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
console.js
constants.js
crypto.js crypto: migrate setFipsCrypto to internal/errors 2017-10-27 08:13:01 -07:00
dgram.js
dns.js
domain.js
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
http.js
https.js https: refactor to use http internals 2017-10-26 15:47:29 -07:00
inspector.js
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
path.js tools: enable additional eslint rules 2017-10-19 13:54:14 -04:00
perf_hooks.js
process.js
punycode.js
querystring.js querystring: convert to using internal/errors 2017-10-28 14:04:53 -04:00
readline.js
repl.js repl: avoid crashing from null and undefined errors 2017-10-31 14:37:37 -04:00
stream.js
string_decoder.js
sys.js
timers.js timers: cleanup extraneous property on Immediates 2017-10-23 11:02:53 +02:00
tls.js
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