node/lib
Anna Henningsen d56a7e640f
src: do proper StringBytes error handling
- Return `MaybeLocal`s from `StringBytes::Encode`
- Add an `error` out parameter to pass JS exceptions to the callers
  (instead of directly throwing)
- Simplify some of the string generation methods in `string_bytes.cc`
  by unifying the `EXTERN_APEX` logic
- Reduce usage of deprecated V8 APIs.
- Remove error handling logic from JS, the `buffer.*Slice()` methods
  now throw errors themselves.
- Left TODO comments for future semver-major error message
  improvements.

This paves the way for better error messages coming out of the
StringBytes methods.

Ref: https://github.com/nodejs/node/issues/3175
PR-URL: https://github.com/nodejs/node/pull/12765
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-05-03 19:21:32 +02:00
..
internal repl: fix /dev/null history file regression 2017-05-02 18:47:16 -04:00
.eslintrc.yaml tools: rename eslintrc to an undeprecated format 2017-01-18 09:48:52 +05:30
_http_agent.js http: fix permanent deoptimizations 2017-04-30 03:17:29 -04:00
_http_client.js http: fix permanent deoptimizations 2017-04-30 03:17:29 -04:00
_http_common.js freelist: simplify export 2017-05-01 11:18:51 -07:00
_http_incoming.js tools: ignore URLs in line length linting 2017-03-20 18:28:40 -07:00
_http_outgoing.js http: fix first body chunk fast case for UTF-16 2017-05-03 15:31:49 +02:00
_http_server.js http: avoid retaining unneeded memory 2017-03-22 10:26:02 -07:00
_stream_duplex.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_stream_passthrough.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_stream_readable.js stream: fix y.pipe(x)+y.pipe(x)+y.unpipe(x) 2017-05-03 15:33:37 +02:00
_stream_transform.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_stream_wrap.js stream: avoid using forEach 2017-03-17 11:09:10 -07:00
_stream_writable.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_tls_common.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_tls_legacy.js test,lib,doc: use function declarations 2017-05-01 15:56:58 -07:00
_tls_wrap.js Partial revert "tls: keep track of stream that is closed" 2017-03-27 02:21:39 +02:00
assert.js tools,lib: enable strict equality lint rule 2017-04-18 08:20:24 -07:00
buffer.js src: do proper StringBytes error handling 2017-05-03 19:21:32 +02:00
child_process.js child_process: improve killSignal validations 2017-04-04 13:02:51 +05:30
cluster.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
console.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
constants.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
crypto.js test,lib,doc: use function declarations 2017-05-01 15:56:58 -07:00
dgram.js tools: enable no-useless-return eslint rule 2017-04-25 12:01:55 -04:00
dns.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
domain.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
events.js events: remove unreachable code 2017-04-21 13:09:49 -04:00
fs.js fs: fix permanent deoptimizations 2017-04-30 03:17:36 -04:00
http.js http: use more efficient module.exports pattern 2017-03-20 16:01:31 -07:00
https.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
module.js lib: fix typo in comments in module.js 2017-04-24 14:01:07 -07:00
net.js net: fix permanent deoptimizations 2017-04-30 03:17:53 -04:00
os.js os: refactor os structure, add Symbol.toPrimitive 2017-05-01 11:44:56 -07:00
path.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
process.js src: remove excessive license boilerplate 2015-01-27 16:35:05 +11:00
punycode.js lib: remove let from for loops 2016-10-04 12:17:32 -04:00
querystring.js lib: use Object.create(null) directly 2017-03-24 15:25:49 -07:00
readline.js readline: fix permanent deoptimizations 2017-04-30 03:17:56 -04:00
repl.js repl: fix permanent deoptimizations 2017-04-30 03:18:01 -04:00
stream.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
string_decoder.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
sys.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
timers.js timers: fix not to close reused timer handle 2017-03-22 10:47:52 -07:00
tls.js tls: support Uint8Arrays for protocol list buffers 2017-03-27 02:08:49 +02:00
tty.js tty: remove NODE_TTY_UNSAFE_ASYNC 2017-03-31 22:02:25 +02:00
url.js url: move to module.exports = {} pattern 2017-04-29 10:24:18 -07:00
util.js util: fix permanent deoptimizations 2017-04-30 03:17:50 -04:00
v8.js v8: refactor struture of v8 module 2017-04-28 14:29:45 -07:00
vm.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
zlib.js zlib: support all ArrayBufferView types 2017-04-12 10:03:26 -07:00