Age | Commit message (Collapse) | Author |
|
The API is required that `byte_length + byte_offset` is less than or
equal to the size in bytes of the array passed in. If not, a RangeError
exception is raised[1].
[1] https://nodejs.org/api/n-api.html#n_api_napi_create_dataview
PR-URL: https://github.com/nodejs/node/pull/17869
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
Add an aliased buffer for session and stream statistics,
add a few more metrics
PR-URL: https://github.com/nodejs/node/pull/18020
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
|
|
Scheduling a PerformanceGCCallback should not keep the
loop alive but due to the recent switch to using the
native SetImmediate method, it does. Go back to using
uv_async_t and add a regression test.
PR-URL: https://github.com/nodejs/node/pull/18051
Fixes: https://github.com/nodejs/node/issues/18047
Refs: https://github.com/nodejs/node/pull/18020
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
|
* verify protections against ping and settings flooding
* Strictly handle and verify handling of unsolicited ping and
settings frame acks.
PR-URL: https://github.com/nodejs/node/pull/17969
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
|
PR-URL: https://github.com/nodejs/node/pull/18005
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
|
|
The TLS implementation previously kept a separate buffer for
incoming pieces of data, into which buffers were copied
before they were up for writing.
This removes this buffer, and replaces it with a simple list
of `uv_buf_t`s:
- The previous implementation copied all incoming data into
that buffer, both allocating new storage and wasting time
with copy operations. Node’s streams/net implementation
already has to make sure that the allocated memory stays
fresh until the write is finished, since that is what
libuv streams rely on anyway.
- The fact that a separate kind of buffer, `crypto::NodeBIO`
was used, was confusing: These `BIO` instances are
only used to communicate with openssl’s streams system
otherwise, whereas this one was purely for internal
memory management.
- The name `clear_in_` was not very helpful.
PR-URL: https://github.com/nodejs/node/pull/17883
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
|
|
The TLS implementation previously had two separate queues for
WriteWrap instances, one for currently active and one for
finishing writes (i.e. where the encrypted output is being written
to the underlying socket).
However, the streams implementation in Node doesn’t allow for
more than one write to be active at a time; effectively,
the only possible states were that:
- No write was active.
- The first write queue had one item, the second one was empty.
- Only the second write queue had one item, the first one was empty.
To reduce overhead and implementation complexity, remove these
queues, and instead store a single `WriteWrap` pointer and
keep track of whether its write callback should be called
on the next invocation of `InvokeQueued()` or not
(which is what being in the second queue previously effected).
PR-URL: https://github.com/nodejs/node/pull/17883
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
|
|
The streams implementation generally ensures that only one write()
call is active at a time. `JSStreamWrap` instances still kept
queue of write reqeuests in spite of that; refactor it away.
Also, fold `isAlive()` into a constant function on the native side.
PR-URL: https://github.com/nodejs/node/pull/17918
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
|
The maxSessionMemory is a cap for the amount of memory an
Http2Session is permitted to consume. If exceeded, new
`Http2Stream` sessions will be rejected with an
`ENHANCE_YOUR_CALM` error and existing `Http2Stream`
instances that are still receiving headers will be
terminated with an `ENHANCE_YOUR_CALM` error.
PR-URL: https://github.com/nodejs/node/pull/17967
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
|
PR-URL: https://github.com/nodejs/node/pull/17954
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
|
With the removal of `GetHostByNameWrap` in the previous commit, there
is only one remaining call site. Inlining it there lets us simplify
the logic.
PR-URL: https://github.com/nodejs/node/pull/17860
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
|
|
It was a wrapper for `ares_gethostbyname()` that I'm unsure about if
it was ever exposed at the binding layer, let alone the public API.
PR-URL: https://github.com/nodejs/node/pull/17860
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
|
|
PR-URL: https://github.com/nodejs/node/pull/17942
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
|
Add a padding strategy option that makes a best attempt to ensure
that total frame length for DATA and HEADERS frames are aligned
on multiples of 8-bytes.
PR-URL: https://github.com/nodejs/node/pull/17938
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
|
Add support for sending and receiving ALTSVC frames.
PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
|
Strictly limit the number of concurrent streams based on the
current setting of the MAX_CONCURRENT_STREAMS setting
PR-URL: https://github.com/nodejs/node/pull/16766
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com>
|
|
Collect and report basic timing information about `Http2Session`
and `Http2Stream` instances.
PR-URL: https://github.com/nodejs/node/pull/17906
Refs: https://github.com/nodejs/node/issues/17746
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
|
If an error is encountered during the processing of Immediates, schedule
the remaining queue to finish after all error handling code runs (if the
process is still alive to do so). The new changes make the Immediates
error handling behaviour entirely deterministic and predictable, as the
full queue will be flushed on each Immediates cycle, regardless of
whether an error is encountered or not.
Currently this processing is scheduled for nextTick which can yield
unpredictable results as the nextTick might happen as early as close
callbacks phase or as late as after the next event loop turns Immediates
all fully processed. The latter can result in two full cycles of
Immediates processing during one even loop turn.
The current implementation also doesn't differentiate between Immediates
scheduled for the current queue run or the next one, so Immediates that
were scheduled for the next turn of the event loop, will process
alongside the ones that were scheduled for the current turn.
PR-URL: https://github.com/nodejs/node/pull/17879
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
PR-URL: https://github.com/nodejs/node/pull/17939
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
PR-URL: https://github.com/nodejs/node/pull/17881
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
|
|
Keep a local handle as a reference to the JS `Http2Session`
object so that it will not be garbage collected
when inside an `Http2Scope`, because the presence of the
latter usually indicates that further actions on
the session object are expected.
Strictly speaking, storing the `session_handle_` as a
property on the scope object is not necessary, but
this is not very costly and makes the code more
obviously correct.
Fixes: https://github.com/nodejs/node/issues/17840
PR-URL: https://github.com/nodejs/node/pull/17863
Fixes: https://github.com/nodejs/node/issues/17840
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
|
PR-URL: https://github.com/nodejs/node/pull/17863
Fixes: https://github.com/nodejs/node/issues/17840
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
|
* Collect the error context in both JS and C++, then throw
the error in JS
* Test that the errors thrown from fs.close and fs.closeSync
includes the correct error code, error number and syscall
properties
PR-URL: https://github.com/nodejs/node/pull/17338
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
|
- Simplify the SyncCall template function, only collect error
number and syscall in the C++ layer and collect the rest of context
in JS for flexibility.
- Remove the stringFromPath JS helper now that the unprefixed path is
directly put into the context before the binding is invoked with the
prefixed path.
- Validate more properties in fs.access tests.
PR-URL: https://github.com/nodejs/node/pull/17338
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
|
Add a errno -> [error code, uv error message] map to the uv binding
so the error message can be assembled in the JS layer.
PR-URL: https://github.com/nodejs/node/pull/17338
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
|
- Communicate the current async stack length through a
typed array field rather than a native binding method
- Add a new fixed-size `async_ids_fast_stack` typed array
that contains the async ID stack up to a fixed limit.
This increases performance noticeably, since most of the time
the async ID stack will not be more than a handful of
levels deep.
- Make the JS `pushAsyncIds()` and `popAsyncIds()` functions
do the same thing as the native ones if the fast path
is applicable.
Benchmarks:
$ ./node benchmark/compare.js --new ./node --old ./node-master --runs 10 --filter next-tick process | Rscript benchmark/compare.R
[00:03:25|% 100| 6/6 files | 20/20 runs | 1/1 configs]: Done
improvement confidence p.value
process/next-tick-breadth-args.js millions=4 19.72 % *** 3.013913e-06
process/next-tick-breadth.js millions=4 27.33 % *** 5.847983e-11
process/next-tick-depth-args.js millions=12 40.08 % *** 1.237127e-13
process/next-tick-depth.js millions=12 77.27 % *** 1.413290e-11
process/next-tick-exec-args.js millions=5 13.58 % *** 1.245180e-07
process/next-tick-exec.js millions=5 16.80 % *** 2.961386e-07
PR-URL: https://github.com/nodejs/node/pull/17780
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
Compute the floating point number in JavaScript to avoid having to call
out to the C++ runtime. The improvements are not insubstantial:
improvement confidence p.value
value="big" endian="BE" type="Double" noAssert="false" 292.86 % *** 1.688367e-08
value="big" endian="BE" type="Double" noAssert="true" 353.19 % *** 6.079414e-10
value="big" endian="BE" type="Float" noAssert="false" 406.21 % *** 1.730122e-07
value="big" endian="BE" type="Float" noAssert="true" 450.81 % *** 6.909242e-07
value="big" endian="LE" type="Double" noAssert="false" 268.39 % *** 8.625486e-09
value="big" endian="LE" type="Double" noAssert="true" 310.66 % *** 2.798332e-15
value="big" endian="LE" type="Float" noAssert="false" 382.99 % *** 3.412057e-07
value="big" endian="LE" type="Float" noAssert="true" 394.60 % *** 1.406742e-07
value="inf" endian="BE" type="Double" noAssert="false" 312.91 % *** 7.407943e-12
value="inf" endian="BE" type="Double" noAssert="true" 392.47 % *** 3.821179e-08
value="inf" endian="BE" type="Float" noAssert="false" 466.01 % *** 8.953363e-08
value="inf" endian="BE" type="Float" noAssert="true" 460.76 % *** 5.381256e-09
value="inf" endian="LE" type="Double" noAssert="false" 279.50 % *** 2.390682e-09
value="inf" endian="LE" type="Double" noAssert="true" 335.30 % *** 3.587173e-09
value="inf" endian="LE" type="Float" noAssert="false" 439.77 % *** 1.057133e-07
value="inf" endian="LE" type="Float" noAssert="true" 426.72 % *** 4.353408e-09
value="nan" endian="BE" type="Double" noAssert="false" 271.18 % *** 2.281526e-05
value="nan" endian="BE" type="Double" noAssert="true" 312.63 % *** 1.974975e-07
value="nan" endian="BE" type="Float" noAssert="false" 429.17 % *** 2.416228e-07
value="nan" endian="BE" type="Float" noAssert="true" 461.39 % *** 1.956714e-08
value="nan" endian="LE" type="Double" noAssert="false" 267.03 % *** 9.938479e-12
value="nan" endian="LE" type="Double" noAssert="true" 276.93 % *** 7.842481e-08
value="nan" endian="LE" type="Float" noAssert="false" 415.97 % *** 8.082710e-07
value="nan" endian="LE" type="Float" noAssert="true" 433.68 % *** 1.030200e-07
value="small" endian="BE" type="Double" noAssert="false" 273.20 % *** 9.071652e-11
value="small" endian="BE" type="Double" noAssert="true" 326.25 % *** 3.120167e-08
value="small" endian="BE" type="Float" noAssert="false" 845.61 % *** 8.044170e-08
value="small" endian="BE" type="Float" noAssert="true" 868.61 % *** 2.944539e-08
value="small" endian="LE" type="Double" noAssert="false" 251.29 % *** 5.613930e-09
value="small" endian="LE" type="Double" noAssert="true" 286.82 % *** 8.149603e-10
value="small" endian="LE" type="Float" noAssert="false" 824.87 % *** 1.199729e-08
value="small" endian="LE" type="Float" noAssert="true" 834.35 % *** 4.799620e-08
value="zero" endian="BE" type="Double" noAssert="false" 216.70 % *** 3.872293e-12
value="zero" endian="BE" type="Double" noAssert="true" 239.31 % *** 6.439601e-09
value="zero" endian="BE" type="Float" noAssert="false" 353.75 % *** 3.639974e-07
value="zero" endian="BE" type="Float" noAssert="true" 388.86 % *** 7.074318e-10
value="zero" endian="LE" type="Double" noAssert="false" 179.34 % *** 5.230763e-06
value="zero" endian="LE" type="Double" noAssert="true" 199.66 % *** 2.177589e-11
value="zero" endian="LE" type="Float" noAssert="false" 299.55 % *** 9.961978e-08
value="zero" endian="LE" type="Float" noAssert="true" 333.30 % *** 2.470764e-08
PR-URL: https://github.com/nodejs/node/pull/17775
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
|
I noticed that ocsp_request is not being reset in
ClientHelloParser::Reset. I've not been able to figure out the
the reason for this and wanted to bring this up just in case this
was overlooked and should be reset.
PR-URL: https://github.com/nodejs/node/pull/17753
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
Refactor and simplify the perf_hooks native internals.
PR-URL: https://github.com/nodejs/node/pull/17822
Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
|
PR-URL: https://github.com/nodejs/node/pull/17656
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
|
Make setImmediate() immune to `process` global tampering by removing
the dependency on the `process._immediateCallback` property.
PR-URL: https://github.com/nodejs/node/pull/17736
Fixes: https://github.com/nodejs/node/issues/17681
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
SetupHooks is only available via `process.binding('async_wrap')`, so
there's no reason it shouldn't be called with the appropriate arguments,
since it is an internal-only function. The only place this function is
used is `lib/internal/async_hooks.js`.
PR-URL: https://github.com/nodejs/node/pull/17832
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
|
|
Use the same approach as a previous PR to include the offending line in
the output and underline imports of inexistent exports.
PR-URL: https://github.com/nodejs/node/pull/17786
Fixes: https://github.com/nodejs/node/issues/17785
Refs: https://github.com/nodejs/node/pull/17281
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
Do not share unnecessary information about nextTick state
between JS & C++, instead only track whether a nextTick
is scheduled or not.
Turn nextTickQueue into an Object instead of a class
since multiple instances are never created.
Other assorted refinements and refactoring.
PR-URL: https://github.com/nodejs/node/pull/17738
Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
|
Is safer to use a `process.binding(config)` defined boolean, than to
regex on `process.execArgv`. Also, this better falls in line with the
conventions of checking flags passed to the executable.
PR-URL: https://github.com/nodejs/node/pull/17814
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
|
The `auxData` field is not exposed to JavaScript, as DevTools uses it
for its `isDefault` parameter, which is implemented faithfully,
contributing to the nice indentation in the context selection panel.
Without the indentation, when `Target` domain gets implemented (along
with a single Inspector for cluster) in #16627, subprocesses and VM
contexts will be mixed up, causing confusion.
PR-URL: https://github.com/nodejs/node/pull/17720
Refs: https://github.com/nodejs/node/pull/14231#issuecomment-315924067
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
PR-URL: https://github.com/nodejs/node/pull/17763
Refs: https://github.com/nodejs/node/issues/17746
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
|
PR-URL: https://github.com/nodejs/node/pull/17667
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
|
PR-URL: https://github.com/nodejs/node/pull/17566
Refs: https://github.com/nodejs/node/issues/17523
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
`Finish<WriteWrap>` already does the same thing and is
called immediately afterwards anyway.
PR-URL: https://github.com/nodejs/node/pull/17713
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
PR-URL: https://github.com/nodejs/node/pull/17735
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
|
|
PR-URL: https://github.com/nodejs/node/pull/17757
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: vdeturckheim <vlad2t@hotmail.com>
|
|
- Only finish outgoing `WriteWrap`s once data has actually been
passed to the underlying socket.
- This makes HTTP2 streams respect backpressure
- Use `DoTryWrite` as a shortcut for sending out as much of
the data synchronously without blocking as possible
- Use `NGHTTP2_DATA_FLAG_NO_COPY` to avoid copying DATA frame
contents into nghttp2’s buffers before sending them out.
PR-URL: https://github.com/nodejs/node/pull/17718
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
`nghttp2_stream_write_t` was not a necessary redirection layer
and came with the cost of one additional allocation per stream write.
Also, having both `nghttp2_stream_write` and `nghttp2_stream_write_t`
as identifiers did not help with readability.
PR-URL: https://github.com/nodejs/node/pull/17718
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
Previously the getter would mutate the kDefaultTriggerAsncId value. This
refactor changes the setter to bind the current kDefaultTriggerAsncId to
a scope, such that the getter doesn't have to mutate its own value.
PR-URL: https://github.com/nodejs/node/pull/17273
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
When context is missing the executionAsyncId will be zero. For the
default triggerAsyncId the zero value was used to default to the
executionAsyncId. While this was not technically wrong because the
functions are different themself, it poorly separated the two concepts.
PR-URL: https://github.com/nodejs/node/pull/17273
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
rename initTriggerId to defaultTriggerAsyncId such it matches the rest
of our naming.
PR-URL: https://github.com/nodejs/node/pull/17273
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
This commit removes stdlib.h header as it does not seem to be used any
more.
PR-URL: https://github.com/nodejs/node/pull/17752
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
|
PR-URL: https://github.com/nodejs/node/pull/17748
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
|
PR-URL: https://github.com/nodejs/node/pull/17714
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
|