node/lib
Anna Henningsen 0671309d28
http2: fix setting options before handle exists
Currently, when a JS Http2Session object is created, we have
to handle the situation in which the native object corresponding
to it does not yet exist. As part of that, we create a typed array
for storing options that are passed through the `AliasedStruct`
mechanism, and up until now, we copied that typed array over
the native one once the native one was available.

This was not good, because it was overwriting the defaults that
were set during construction of the native typed array with zeroes.

In order to fix this, create a wrapper for the JS-created typed array
that keeps track of which fields were changed, which enables us to
only overwrite fields that were intentionally changed on the JS side.

It is surprising that this behavior was not tested (which is,
guessing from the commit history around these features, my fault).
The subseqeuent commit introduces a test that would fail without
this change.

PR-URL: https://github.com/nodejs/node/pull/37875
Fixes: https://github.com/nodejs/node/issues/37849
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-03-26 20:51:56 +01:00
..
assert assert: add `assert/strict` alias module 2020-06-25 08:37:48 -07:00
dns dns: add dns/promises alias 2020-05-24 03:26:21 +02:00
fs fs: add fs/promises alias module 2020-02-18 22:15:50 -08:00
internal http2: fix setting options before handle exists 2021-03-26 20:51:56 +01:00
path path: add `path/posix` and `path/win32` alias modules 2020-10-20 14:27:31 +00:00
stream stream: move duplicated code to an internal module 2021-02-28 05:07:26 -08:00
timers timers: introduce setInterval async iterator 2021-02-03 19:28:09 +02:00
util util: add `util/types` alias module 2020-10-21 01:26:34 +02:00
.eslintrc.yaml tools: add ESLint rule no-array-destructuring 2021-03-03 19:53:28 +01:00
_http_agent.js http: refactor to avoid unsafe array iteration 2021-03-13 10:39:07 +01:00
_http_client.js http: fix double AbortSignal registration 2021-03-20 12:52:04 -07:00
_http_common.js lib: use <array>.push and <array>.unshift instead of <array>.concat 2021-02-26 11:11:22 +01:00
_http_incoming.js http: explain the possibilty of refactor unused argument 2021-02-10 12:30:16 +01:00
_http_outgoing.js http: use CRLF conistently in _http_outgoing.js 2021-03-22 08:42:10 -07:00
_http_server.js http: align with stream.Writable 2021-03-10 15:04:00 +01:00
_stream_duplex.js stream: do not use _stream_* anymore 2021-01-05 19:02:04 +01:00
_stream_passthrough.js stream: do not use _stream_* anymore 2021-01-05 19:02:04 +01:00
_stream_readable.js stream: do not use _stream_* anymore 2021-01-05 19:02:04 +01:00
_stream_transform.js stream: do not use _stream_* anymore 2021-01-05 19:02:04 +01:00
_stream_wrap.js lib: assign missed deprecation code 2019-03-07 15:48:55 +01:00
_stream_writable.js stream: do not use _stream_* anymore 2021-01-05 19:02:04 +01:00
_tls_common.js tls: refactor to avoid unsafe array iteration 2021-03-13 11:46:51 +01:00
_tls_wrap.js tls: add ability to get cert/peer cert as X509Certificate object 2021-02-02 09:39:27 -08:00
assert.js lib: remove use of array destructuring 2021-03-03 19:53:24 +01:00
async_hooks.js async_hooks: refactor to avoid unsafe array iteration 2021-02-01 16:16:38 +01:00
buffer.js buffer: implement btoa and atob 2021-03-18 12:04:00 -07:00
child_process.js child_process: cleanup AbortSignal duplication 2021-03-22 08:15:13 -07:00
cluster.js lib,src: update cluster to use Parent 2021-01-05 15:41:45 -05:00
console.js console: split console into global.js and constructor.js 2018-12-02 04:51:18 +08:00
constants.js lib: flatten access to primordials 2019-11-25 10:28:15 +01:00
crypto.js crypto: make FIPS related options always awailable 2021-02-25 18:12:58 -05:00
dgram.js dgram: support AbortSignal in createSocket 2021-01-25 20:36:00 +02:00
diagnostics_channel.js lib: refactor to use validateFunction 2021-01-27 20:46:54 +02:00
dns.js lib: refactor to use validateString 2021-01-22 19:56:34 -08:00
domain.js domain: add name to monkey-patched emit function 2021-03-03 12:51:15 -05:00
events.js lib: use AbortError consistently 2021-03-13 11:17:48 -08:00
fs.js fs: remove permissive rmdir recursive 2021-03-20 19:17:28 +01:00
http.js http: refactor to use more primordials 2020-12-29 16:06:05 +01:00
http2.js http2: add support for sensitive headers 2020-07-16 00:25:47 +02:00
https.js lib: remove usage of url.parse 2021-02-11 19:30:28 +05:30
inspector.js lib: refactor to use validateObject 2021-01-28 12:53:50 +01:00
module.js module: add API for interacting with source maps 2020-01-14 12:39:06 -08:00
net.js quic: remove quic 2021-01-30 07:49:28 -08:00
os.js lib: remove use of array destructuring 2021-03-03 19:53:24 +01:00
path.js lib: refactor to use validateObject 2021-01-28 12:53:50 +01:00
perf_hooks.js perf_hooks: make Performance extend EventTarget 2021-03-08 20:34:40 +01:00
process.js
punycode.js lib: use strict equality comparison 2019-12-14 08:57:36 -05:00
querystring.js doc,lib: prepare for stricter multi-line array linting 2021-02-19 09:55:35 -08:00
readline.js doc,lib: prepare for stricter multi-line array linting 2021-02-19 09:55:35 -08:00
repl.js repl: add auto‑completion for `node:`‑prefixed `require(…)` calls 2021-03-19 12:35:03 +01:00
stream.js stream: support abortsignal in constructor 2020-12-10 23:39:18 +02:00
string_decoder.js string_decoder: refactor to use more primordials 2020-12-07 09:59:42 -08:00
sys.js benchmark,doc,lib,test: capitalize comments 2019-03-10 00:44:40 +01:00
timers.js timers: refactor to use optional chaining 2021-01-09 15:18:34 -08:00
tls.js lib: remove usage of url.parse 2021-02-11 19:30:28 +05:30
trace_events.js lib: refactor to use validateObject 2021-01-28 12:53:50 +01:00
tty.js tty: validate file descriptor to avoid int32 overflow 2021-03-23 11:02:03 +01:00
url.js doc,lib: prepare for stricter multi-line array linting 2021-02-19 09:55:35 -08:00
util.js util: refactor to use more primordials 2020-12-28 19:47:41 +00:00
v8.js bootstrap: include v8 module into the builtin snapshot 2021-02-19 19:08:07 +08:00
vm.js vm: add importModuleDynamically option to compileFunction 2021-02-05 09:16:33 -06:00
wasi.js wasi: refactor to avoid unsafe array iteration 2021-01-06 11:34:02 +01:00
worker_threads.js worker: add setEnvironmentData/getEnvironmentData 2021-03-15 07:40:26 -07:00
zlib.js test: add tests for `bound apply` variants of varargs `primordials` 2021-01-28 18:45:46 +01:00