SindreXie
efad04910b
stream: refactor use es2020 statement
...
PR-URL: https://github.com/nodejs/node/pull/44533
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Erick Wendel <erick.workspace@gmail.com >
2022-09-13 14:14:48 +00:00
Joyee Cheung
12fb94c78c
dns: refactor default resolver
...
This patch refactors the DNS default resolver code to make it
easier to be included in a snapshot:
- The code specific for the callback-based DNS resolver are not
in a separate module to make the dependency clearer (it's not
actually needed if the user only ever loads `dns/promises`)
- The common part of the callback-based resolver and the promise-
based resolver is now ResolverBase. The other two user-facing
resolvers are now subclasses of ResolverBase. The default
Resolver is constructed with just ResolverBase. This would
be fine as the default resolver is never actually exposed
to the user-land and it has been working using duck-typing anyway.
- Move the construction of Resolver subclasses into a common
method `createResolverClass()` to reduce code duplication.
The two subclasses now also share the same base constructor.
This would make it possible for them to also share code
for snapshot support later.
- `--dns-result-order` is now queried and refreshed during
pre-execution. To avoid loading the cares_wrap binding unnecessarily
the loading of the binding is also made lazy.
PR-URL: https://github.com/nodejs/node/pull/44541
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-09-13 13:36:08 +00:00
StefanStojanovic
8b50160612
win: fix fs.realpath.native for long paths
...
Unlike other fs.js functions that work with paths, realpath.native isn't
using pathModule.toNamespacedPath prior to calling libuv function. This
is causing issues on windows.
Windows long path test is also improved to cover the mentioned issue.
Fixes: https://github.com/nodejs/node/issues/39721
PR-URL: https://github.com/nodejs/node/pull/44536
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2022-09-13 11:48:53 +00:00
Chengzhong Wu
050a1451e9
inspector: expose inspector.close on workers
...
Workers can open their own inspector agent with `inspector.open`.
They should be able to close their own inspector agent too with
`inspector.close`.
PR-URL: https://github.com/nodejs/node/pull/44489
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2022-09-13 09:04:24 +00:00
Moshe Atlow
5c546e1f3c
cluster: use inspector utils
...
PR-URL: https://github.com/nodejs/node/pull/44592
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-09-13 06:41:19 +00:00
Livia Medeiros
950a4411fa
fs: remove coercion to string in writing methods
...
Moves DEP0162 to End-of-Life.
PR-URL: https://github.com/nodejs/node/pull/42796
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2022-09-12 09:29:43 +00:00
Guy Bedford
7dd2f41c73
module: runtime deprecate exports double slash maps
...
PR-URL: https://github.com/nodejs/node/pull/44495
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-09-11 23:48:22 +00:00
LiviaMedeiros and Antoine du Hamel
41a6d82968
fs: harden fs.readSync(buffer, options) typecheck
...
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/42772
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-09-11 10:36:05 +00:00
LiviaMedeiros
2275faac2b
fs: harden fs.read(params, callback) typecheck
...
PR-URL: https://github.com/nodejs/node/pull/42772
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-09-11 10:36:04 +00:00
LiviaMedeiros and Antoine du Hamel
29953a0b88
fs: harden filehandle.read(params) typecheck
...
Make sure that first argument is a nullable object
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/42772
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-09-11 10:36:03 +00:00
Guy Bedford
53633c033d
module: exports & imports map invalid slash deprecation
...
PR-URL: https://github.com/nodejs/node/pull/44477
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2022-09-11 12:01:37 +02:00
Tobias Nießen
8bf7754538
crypto: restrict PBKDF2 args to signed int
...
OpenSSL internally represents the output length and the iteration count
as signed integers, which is why node's C++ implementation expects these
arguments to fit into signed integers as well. The JavaScript validation
logic, however, only requires the arguments to be unsigned 32-bit
integers, which is a superset of non-negative (signed) 32-bit integers.
Change the JavaScript validation to match the expectation within C++.
Fixes: https://github.com/nodejs/node/issues/44570
PR-URL: https://github.com/nodejs/node/pull/44575
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2022-09-10 22:21:14 +00:00
Sergey Petushkov
e0ab8dd637
process: make process.config read only
...
Fixes: https://github.com/nodejs/node/issues/43581
PR-URL: https://github.com/nodejs/node/pull/43627
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-09-10 22:00:23 +00:00
Moshe Atlow
a165193c5c
test_runner: support using --inspect with --test
...
PR-URL: https://github.com/nodejs/node/pull/44520
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-09-10 17:01:42 +00:00
Daeyeon Jeong
a4b2641c56
stream: remove abortReason from WritableStreamDefaultController
...
The `abortReason` has been removed from the spec since we can get
the abort reason via `controller.signal.reason`.
This reflects the change.
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/44540
Refs: https://streams.spec.whatwg.org/#ws-default-controller-class-definition
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-09-09 07:10:12 +00:00
Daeyeon Jeong
e06384cb48
stream: add ReadableByteStream.tee()
...
This supports teeing readable byte streams to meet
the latest web streams standards.
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/44505
Refs: https://streams.spec.whatwg.org/#readable-stream-tee
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-09-08 22:06:06 +00:00
theanarkh
e62f6ce630
v8: add setHeapSnapshotNearHeapLimit
...
PR-URL: https://github.com/nodejs/node/pull/44420
Refs: https://github.com/nodejs/node/pull/33010
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2022-09-08 09:33:20 +00:00
Joyee Cheung
f0cf1005a3
bootstrap: clean up inspector console methods during serialization
...
Some console methods are created by the V8 inspector after
an inspector client is created, reset them to undefined during
sereialization to avoid holding on to invalid references in
the snapshot. V8 will take care of the re-initialization when
another inspector client is created during deserialization.
PR-URL: https://github.com/nodejs/node/pull/44279
Fixes: https://github.com/nodejs/node-v8/issues/237
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-09-07 11:20:40 +00:00
falsandtru
bae03c4e30
lib: fix reference leak
...
PR-URL: https://github.com/nodejs/node/pull/44499
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-09-07 09:33:10 +00:00
Daeyeon Jeong
4af0a264da
stream: fix writableStream.abort()
...
This includes:
- Fixing `writableStream.abort(reason)`. Passing the reason was missing.
- Leaving a TODO to remove the internal abortReason property of
WritableStreamDefaultController.
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/44327
Refs: https://streams.spec.whatwg.org/#writable-stream-abort
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-09-05 15:07:11 +00:00
Moshe Atlow
beb0520af7
cli: add --watch
...
PR-URL: https://github.com/nodejs/node/pull/44366
Fixes: https://github.com/nodejs/node/issues/40429
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-09-05 12:25:09 +03:00
Moshe Atlow
6ee1f3444f
test_runner: fix duration_ms to be milliseconds
...
PR-URL: https://github.com/nodejs/node/pull/44450
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-09-04 07:06:24 +00:00
Daeyeon Jeong
aa90e7a9f4
stream: fix setting abort reason in ReadableStream.pipeTo()
...
In 14.2 in the specification, `error` should be signal’s abort reason.
The current behavior seems to assume that only an `AbortError` instance
is given as signal’s abort reason.
Refs: https://streams.spec.whatwg.org/#readable-stream-pipe-to
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/44418
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-09-03 14:24:29 +00:00
Filip Skokan
d94833cf91
crypto: handle invalid prepareAsymmetricKey JWK inputs
...
Fixes #44471
PR-URL: https://github.com/nodejs/node/pull/44475
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2022-09-03 12:36:20 +00:00
Juan José Arboleda
7ee8bfe1cd
src: add error handling to uv_uptime call
...
PR-URL: https://github.com/nodejs/node/pull/44386
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-08-31 14:28:28 -05:00
theanarkh
0633e9a0b5
lib: add diagnostics channel for process and worker
...
PR-URL: https://github.com/nodejs/node/pull/44045
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-08-30 17:08:33 +00:00
theanarkh
d40a622016
os: add machine method
...
PR-URL: https://github.com/nodejs/node/pull/44416
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-08-29 07:49:32 +00:00
theanarkh
547f453491
cluster: fix cluster rr distribute error
...
PR-URL: https://github.com/nodejs/node/pull/44202
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-08-28 15:03:12 +00:00
Chengzhong Wu
72df448d2a
lib: codify findSourceMap return value when not found
...
Return `undefined` when no source map is found for the given filename on
`findSourceMap`.
PR-URL: https://github.com/nodejs/node/pull/44397
Fixes: https://github.com/nodejs/node/issues/44391
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-08-27 23:13:53 +00:00
Daeyeon Jeong
cc75a3c11e
stream: fix ReadableStreamReader.releaseLock()
...
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/44292
Refs: https://streams.spec.whatwg.org/#default-reader-release-lock
Refs: https://streams.spec.whatwg.org/#byob-reader-release-lock
Refs: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader/releaseLock
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-08-27 11:27:10 +00:00
Antoine du Hamel
14000517b4
tools: refactor avoid-prototype-pollution lint rule
...
The lint rule was not catching all occurences of unsafe primordials use,
and was too strict on some methods.
PR-URL: https://github.com/nodejs/node/pull/43476
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2022-08-27 11:37:04 +02:00
Antoine du Hamel
ce639629dd
lib: use safe Promise alternatives when available
...
PR-URL: https://github.com/nodejs/node/pull/43476
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2022-08-27 11:37:01 +02:00
Tobias Nießen
15aa34b20a
inspector: prevent integer overflow in open()
...
PR-URL: https://github.com/nodejs/node/pull/44367
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com >
2022-08-25 20:32:14 +00:00
Antoine du Hamel
ab89024ddc
tty: fix TypeError when stream is closed
...
Fixes: https://github.com/nodejs/node/issues/41330
PR-URL: https://github.com/nodejs/node/pull/43803
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2022-08-24 17:12:30 +00:00
Joyee Cheung
83cd484d77
debugger: decrease timeout used to wait for the port to be free
...
By default, the debugger would query the specified inspector
sever port to see if it's available before starting the server,
and it would keep retrying until a timeout (previously 9999 ms)
is reached. This timeout seems to be longer than necessary. This
patch decreases the timeout to 3 seconds.
PR-URL: https://github.com/nodejs/node/pull/44359
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Richard Lau <rlau@redhat.com >
2022-08-24 13:52:54 +00:00
Moshe Atlow
59527de13d
test_runner: support programmatically running --test
...
PR-URL: https://github.com/nodejs/node/pull/44241
Fixes: https://github.com/nodejs/node/issues/44023
Fixes: https://github.com/nodejs/node/issues/43675
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-08-24 15:54:44 +03:00
Luigi Pinca
2b32985c62
stream: use null for the error argument
...
When no error occurs, use `null` instead of `undefined` for the `error`
argument of the `writable.write()` and `writable.end()` callbacks.
Fixes: https://github.com/nodejs/node/issues/44290
PR-URL: https://github.com/nodejs/node/pull/44312
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-08-23 07:51:53 +00:00
Chengzhong Wu
798a6edddf
perf_hooks: add resourcetiming buffer limit
...
Add WebPerf API `performance.setResourceTimingBufferSize` and event
`'resourcetimingbufferfull'` support.
The resource timing entries are added to the global performance
timeline buffer automatically when using fetch. If users are not
proactively cleaning these events, it can grow without limit. Apply
the https://www.w3.org/TR/timing-entrytypes-registry/ default
resource timing buffer max size so that the buffer can be limited
to not grow indefinitely.
PR-URL: https://github.com/nodejs/node/pull/44220
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2022-08-21 10:43:39 +08:00
Moshe Atlow
0d46cf6af8
test_runner: fix test runner hooks failure stack
...
PR-URL: https://github.com/nodejs/node/pull/44284
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-08-20 23:31:23 +00:00
Joyee Cheung
fddc701d3c
src: support diagnostics channel in the snapshot
...
PR-URL: https://github.com/nodejs/node/pull/44193
Refs: https://github.com/nodejs/node/issues/44014
Refs: https://github.com/nodejs/node/issues/37476
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2022-08-19 12:53:31 +08:00
Joyee Cheung
4f1a9fc7ea
bootstrap: fixup Error.stackTraceLimit for user-land snapshot
...
It's difficult for V8 to handle Error.stackTraceLimit in the snapshot,
so delete it from the Error constructor if it's present before
snapshot serialization, and re-install it after deserialization.
In addition try not to touch it from our internals during snapshot
building in the first place by updating
isErrorStackTraceLimitWritable().
PR-URL: https://github.com/nodejs/node/pull/44203
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-08-18 13:05:31 +00:00
Daeyeon Jeong
937520a764
stream: fix isDetachedBuffer validations
...
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/44114
Refs: https://github.com/nodejs/node/pull/43866
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-08-18 08:24:34 +00:00
Antoine du Hamel
a957f7bd37
lib: refactor to avoid prototype pollution
...
PR-URL: https://github.com/nodejs/node/pull/43474
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2022-08-17 18:36:33 +00:00
Yagiz Nizipli
ab9b5900dd
typings: add JSDoc for internal/validators
...
PR-URL: https://github.com/nodejs/node/pull/44181
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2022-08-17 20:25:01 +02:00
58ab0e2821
http: add writeEarlyHints function to ServerResponse
...
Co-Authored-By: Matteo Collina <matteo.collina@gmail.com >
Co-Authored-By: Livia Medeiros <livia@cirno.name >
PR-URL: https://github.com/nodejs/node/pull/44180
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
2022-08-17 18:22:53 +00:00
theanarkh
97e8bda5b2
dgram: add dgram send queue info
...
PR-URL: https://github.com/nodejs/node/pull/44149
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2022-08-17 16:08:58 +00:00
Mohammed Keyvanzadeh
7f5679b901
tls: use logical OR operator
...
Use the logical OR operator instead of the ternary operator where
applicable.
PR-URL: https://github.com/nodejs/node/pull/44236
Reviewed-By: theanarkh <theratliter@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Feng Yu <F3n67u@outlook.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2022-08-16 21:34:56 +00:00
theanarkh
12894924af
http: add max for http keepalive
...
PR-URL: https://github.com/nodejs/node/pull/44217
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-08-16 13:09:10 +00:00
Chengzhong Wu
678551c294
report: skip report if uncaught exception is handled
...
If the exception is handled by the userland
process#uncaughtException handler, reports should not be generated
repetitively as the process may continue to run.
PR-URL: https://github.com/nodejs/node/pull/44208
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2022-08-16 21:04:48 +08:00
Daeyeon Jeong
46f6d225af
stream: improve views validation on BYOBRequest
...
- This throws if the view is zero-length when there is an active reader
when using `ReadableStreamBYOBRequest.respondWithNewView()`.
- By doing that, we can get all tests passed in
`readable-byte-streams/bad-buffers-and-views.any.js`.
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/44155
Refs: https://streams.spec.whatwg.org/#readable-byte-stream-controller-respond-with-new-view
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-08-15 18:46:13 +00:00