Antoine du Hamel
eb8f7ee634
lib: revert primordials in a hot path
...
Evidence has shown that use of primordials have sometimes an impact of
performance. This commit reverts the changes who are most likely to be
responsible for performance regression in the HTTP response path.
PR-URL: https://github.com/nodejs/node/pull/38248
Backport-PR-URL: https://github.com/nodejs/node/pull/38972
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-06-11 09:30:23 +02:00
Michaël Zasso
07c55d2844
Revert "http: make HEAD method to work with keep-alive"
...
This reverts commit 7afa5336ae .
The change breaks clients like cURL.
Fixes: https://github.com/nodejs/node/issues/38922
PR-URL: https://github.com/nodejs/node/pull/38949
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Mary Marchini <oss@mmarchini.me >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2021-06-11 09:30:23 +02:00
Anna Henningsen
d8da265c81
http2: treat non-EOF empty frames like other invalid frames
...
Use the existing mechanism that we have to keep track of invalid frames
for treating this specific kind of invalid frame.
The commit that originally introduced this check was 695e38be69 ,
which was supposed to proected against CVE-2019-9518, which in turn
was specifically about a *flood* of empty data frames. While these are
still invalid frames either way, it makes sense to be forgiving here
and just treat them like other invalid frames, i.e. to allow a small
(configurable) number of them.
Fixes: https://github.com/nodejs/node/issues/37849
PR-URL: https://github.com/nodejs/node/pull/37875
Backport-PR-URL: https://github.com/nodejs/node/pull/38673
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-06-11 09:30:22 +02:00
cjihrig
1098aec40b
tools: update ESLint to 7.25.0
...
Update ESLint to 7.25.0
PR-URL: https://github.com/nodejs/node/pull/38378
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-11 09:30:20 +02:00
Rich Trott
294b3e60a5
test,doc,lib: adjust object literal newlines for lint rule
...
Before enabling object-curly-newline for our ESLint rules, adjust files
to comply with it.
Refs: https://eslint.org/docs/rules/object-curly-newline
PR-URL: https://github.com/nodejs/node/pull/37040
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-06-11 09:30:18 +02:00
Robert Nagy
dbb0d2612c
stream: fix multiple Writable.destroy() calls
...
Calling Writable.destroy() multiple times in the same tick
could cause an assertion error.
Fixes: https://github.com/nodejs/node/issues/38189
PR-URL: https://github.com/nodejs/node/pull/38221
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/38473
2021-06-11 09:30:17 +02:00
Rongjian Zhang
8a44ee478e
test: improve coverage of lib/_http_client.js
...
PR-URL: https://github.com/nodejs/node/pull/38599
Refs: https://coverage.nodejs.org/coverage-f37c26b8a2e10d0a/lib/_http_client.js.html#L200
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2021-06-11 09:30:16 +02:00
Rongjian Zhang
8a45b85dbd
test: improve coverage of lib/os.js
...
PR-URL: https://github.com/nodejs/node/pull/38653
Refs: https://coverage.nodejs.org/coverage-52e4fb5b23157222/lib/os.js.html#L96
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-06-11 09:30:16 +02:00
Zach Bjornson
c4e7dca8f3
fs: fix error when writing buffers > INT32_MAX
...
This reverts c380ee6785 .
uv_fs_write returns an int, so it is not possible to ask
it to write more than INT32_MAX.
Instead, validate 'length' is an int32 in JS to avoid
the assertion failure.
PR-URL: https://github.com/nodejs/node/pull/38546
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-06-11 09:30:15 +02:00
Juan José Arboleda
bc2111c7e6
src: make workers messaging more resilient
...
PR-URL: https://github.com/nodejs/node/pull/38510
Fixes: https://github.com/nodejs/node/issues/38499
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-11 09:30:14 +02:00
Antoine du Hamel
cea8b4265c
lib: make IterableWeakMap safe to iterate
...
PR-URL: https://github.com/nodejs/node/pull/38523
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-11 09:30:14 +02:00
Rongjian Zhang
726cb48bd8
test: complete coverage of querystring
...
PR-URL: https://github.com/nodejs/node/pull/38520
Refs: https://coverage.nodejs.org/coverage-68e6673224365120/lib/querystring.js.html#L179
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-06-11 09:30:13 +02:00
ZiJian Liu
4f1ba79eb8
test: increase coverage for AbortController
...
Refs: https://coverage.nodejs.org/coverage-68e6673224365120/lib/internal/abort_controller.js.html#L126
PR-URL: https://github.com/nodejs/node/pull/38514
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-06-11 09:30:13 +02:00
helloyou2012
a18b1ff80b
stream: the position of _read() is wrong
...
Fixes: https://github.com/nodejs/node/issues/33940
PR-URL: https://github.com/nodejs/node/pull/38292
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-06-11 09:30:12 +02:00
Antoine du Hamel
bfe02b8808
test,readline: improve tab completion coverage
...
PR-URL: https://github.com/nodejs/node/pull/38465
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-06-11 09:30:12 +02:00
XadillaX
8702b045a4
zlib: fix brotli flush range
...
Fixes: https://github.com/nodejs/node/issues/38407
PR-URL: https://github.com/nodejs/node/pull/38408
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-06-11 09:30:11 +02:00
James M Snell
378e0e778b
src: fix validation of negative offset to avoid abort
...
Fixes: https://github.com/nodejs/node/issues/24640
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/38421
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-06-11 09:30:09 +02:00
Rich Trott
3484a23140
tools: remove fixer for non-ascii-character ESLint custom rule
...
The fixer for non-ascii-character does not typidally do the right thing.
It removes the entire node, not the offending character. I discovered
this when it removed the entire contents of a file and I wasn't sure
which auto-fix rule was doing it.
This commit adds a minimal test for the rule. The tests require that
auto-fix results be supplied, so if someone wants to re-add auto-fixing
to the rule, we'll have tests that it does the right thing.
PR-URL: https://github.com/nodejs/node/pull/38413
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-11 09:30:09 +02:00
James M Snell
d177541b0e
src: fix setting Converter sub char length
...
Signed-off-by: James M Snell <jasnell@gmail.com >
Fixes: https://github.com/nodejs/node/issues/38330
PR-URL: https://github.com/nodejs/node/pull/38331
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-06-11 09:30:05 +02:00
Antoine du Hamel
f6e4dbb779
tls: validate ticket keys buffer
...
Fixes: https://github.com/nodejs/node/issues/38305
PR-URL: https://github.com/nodejs/node/pull/38308
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-11 09:30:05 +02:00
Anna Henningsen
a4eb5571eb
repl: display prompt once after error callback
...
Do not call `.displayPrompt()` twice after the `eval` callback
resulted in an error.
(This does not affect the default eval because it doesn’t use
the callback if an error occurs.)
PR-URL: https://github.com/nodejs/node/pull/38314
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-06-11 09:30:04 +02:00
Andres
c9ce98c377
test: replace function with arrow function and remove unused argument
...
PR-URL: https://github.com/nodejs/node/pull/38235
Reviewed-By: Yash Ladha <yash@yashladha.in >
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com >
Reviewed-By: Harshitha K P <harshitha014@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-06-11 09:30:04 +02:00
Nitzan Uziely
661e9809bd
tls: fix session and keylog add listener segfault
...
Fix an issue where adding a session or keylog listener on a tlsSocket
after it was destroyed caused a segfault.
fixes: https://github.com/nodejs/node/issues/38133
fixes: https://github.com/nodejs/node/issues/38135
PR-URL: https://github.com/nodejs/node/pull/38180
Fixes: https://github.com/nodejs/node/issues/38133
Fixes: https://github.com/nodejs/node/issues/38135
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-06-11 09:30:03 +02:00
Antoine du Hamel
a4dd50f8f9
tools: refactor prefer-primordials
...
Use optional chaining to improve code readability and remove use of
`Array.prototype.reduce`.
PR-URL: https://github.com/nodejs/node/pull/36018
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
2021-06-11 09:30:00 +02:00
bcoe
9417fd0bc8
errors: align source-map stacks with spec
...
Reformat stack traces when --enable-source-maps flag is set to format
more likely to fit https://github.com/tc39/proposal-error-stacks
PR-URL: https://github.com/nodejs/node/pull/37252
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ian Sutherland <ian@iansutherland.ca >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2021-06-11 09:29:59 +02:00
ExE Boss
16691be80e
lib: fix WebIDL object and dictionary type conversion
...
PR-URL: https://github.com/nodejs/node/pull/37047
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-06-11 09:29:59 +02:00
Emil Sivervik
d9eb8b3ed0
test: increase fs promise coverage
...
1. Signal aborted while writing file
Refs: https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/internal/fs/promises.js.html#L278
2. Signal aborted on first tick
Refs: https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/internal/fs/promises.js.html#L301
3. Validate file size is withing range for reading
Refs: https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/internal/fs/promises.js.html#L312
4. Signal aborted right before buffer read
Refs: https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/internal/fs/promises.js.html#L321
5. Use fallback buffer allocation when input not buffer
Refs: https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/internal/fs/promises.js.html#L374
6. Specify symlink type
Refs: https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/internal/fs/promises.js.html#L539
7. Set modification times with lutimes
Refs: https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/internal/fs/promises.js.html#L635
8. Use fallback encoding when input is null
Refs: https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/internal/fs/promises.js.html#L665
9. Use fallback flag when input is null
Refs: https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/internal/fs/promises.js.html#L681
PR-URL: https://github.com/nodejs/node/pull/36813
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-11 09:29:59 +02:00
Juan José Arboleda
836fba52ea
test: improve coverage of SourceTextModule getters
...
PR-URL: https://github.com/nodejs/node/pull/37013
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-06-11 09:29:57 +02:00
ExE Boss and Antoine du Hamel
346fc0ac21
lib: support returning Safe collections from C++
...
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36989
Refs: https://github.com/nodejs/node/pull/36652
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-11 09:29:57 +02:00
Juan José Arboleda
f43fc6b6cc
test: improve coverage for Module getters
...
PR-URL: https://github.com/nodejs/node/pull/36950
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-06-11 09:29:57 +02:00
Juan José Arboleda
a45d280c18
test: improve coverage on worker threads
...
PR-URL: https://github.com/nodejs/node/pull/36910
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-06-11 09:29:56 +02:00
Juan José Arboleda
ec4d79e259
test: improve coverage at lib/internal/vm/module.js
...
PR-URL: https://github.com/nodejs/node/pull/36898
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-06-11 09:29:56 +02:00
Michaël Zasso
c34de75687
test: guard large string decoder allocation
...
Use common.enoughTestMem to avoid "Array buffer allocation failed"
error on low memory devices.
Fixes: https://github.com/nodejs/node/issues/36792
PR-URL: https://github.com/nodejs/node/pull/36795
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-06-11 09:29:54 +02:00
Michaël Zasso
1dc4dea215
string_decoder: throw ERR_STRING_TOO_LONG for UTF-8
...
String::NewFromUtf8 doesn't generate an exception in V8 when the string
is too long but is guaranteed to return an empty MaybeLocal only in
that case. Generate a Node.js exception when it happens.
Fixes: https://github.com/nodejs/node/issues/35676
PR-URL: https://github.com/nodejs/node/pull/36661
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-11 09:29:53 +02:00
Rich Trott
3215a58843
test: add already-aborted-controller test for spawn()
...
PR-URL: https://github.com/nodejs/node/pull/36644
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2021-06-11 09:29:53 +02:00
Rich Trott
598d2bdf09
child_process: treat already-aborted controller as aborting
...
If an AbortController passed to execfile() is already aborted, use the
same behavior as if the controller was aborted after calling execfile().
This mimics the behavior of fetch in the browser.
PR-URL: https://github.com/nodejs/node/pull/36644
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2021-06-11 09:29:53 +02:00
Rich Trott
c3b116795b
test: add test for reused AbortController with execfile()
...
Test that reusing an aborted AbortController with execfile() results in
immediate SIGTERM.
PR-URL: https://github.com/nodejs/node/pull/36644
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2021-06-11 09:29:53 +02:00
Robert Nagy
ab130e929a
stream: only use legacy close listeners if not willEmitClose
...
Some streams that willEmitClose unecessarily fallback to legacy
events.
PR-URL: https://github.com/nodejs/node/pull/36649
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-06-11 09:29:53 +02:00
Brian White
c9861a344a
lib: remove unused code
...
PR-URL: https://github.com/nodejs/node/pull/36632
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-06-11 09:29:52 +02:00
Antoine du Hamel
7ebc18f293
lib: make safe primordials safe to iterate
...
PR-URL: https://github.com/nodejs/node/pull/36391
Backport-PR-URL: https://github.com/nodejs/node/pull/38703
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-11 09:29:51 +02:00
Anna Henningsen
ea311a41cc
src: add check against non-weak BaseObjects at process exit
...
When a process exits cleanly, i.e. because the event loop ends up
without things to wait for, the Node.js objects that are left on
the heap should be:
1. weak, i.e. ready for garbage collection once no longer
referenced, or
2. detached, i.e. scheduled for destruction once no longer
referenced, or
3. an unrefed libuv handle, i.e. does not keep the event loop
alive, or
4. an inactive libuv handle (essentially the same here)
There are a few exceptions to this rule, but generally,
if there are C++-backed Node.js objects on the heap
that do not fall into the above categories, we may be looking
at a potential memory leak. Most likely, the cause is a missing
`MakeWeak()` call on the corresponding object.
In order to avoid this kind of problem, we check the list
of BaseObjects for these criteria. In this commit, we only do so
when explicitly instructed to or when in debug mode
(where --verify-base-objects is always-on).
In particular, this avoids the kinds of memory leak issues
that were fixed in the PRs referenced below.
Refs: https://github.com/nodejs/node/pull/35488
Refs: https://github.com/nodejs/node/pull/35487
Refs: https://github.com/nodejs/node/pull/35481
PR-URL: https://github.com/nodejs/node/pull/35490
Backport-PR-URL: https://github.com/nodejs/node/pull/38786
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-06-11 09:29:50 +02:00
Michaël Zasso
226a86c3b5
tools: enable no-unused-expressions lint rule
...
Fixes: https://github.com/nodejs/node/issues/36246
PR-URL: https://github.com/nodejs/node/pull/36248
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-06-11 09:29:47 +02:00
bcoe
ee444473e9
errors: display original symbol name
...
If symbol names array has been populated in source map, include
original symbol name in error message.
Fixes https://github.com/nodejs/node/issues/35325
PR-URL: https://github.com/nodejs/node/pull/36042
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-06-11 09:29:17 +02:00
Antoine du Hamel
83d28374d6
errors: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36167
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2021-06-11 09:29:15 +02:00
Antoine du Hamel
74fe1d8f0c
http2: add support for TypedArray to getUnpackedSettings
...
PR-URL: https://github.com/nodejs/node/pull/36141
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-06-11 09:29:15 +02:00
Antoine du Hamel
b3e22e1612
lib,tools: enforce access to prototype from primordials
...
PR-URL: https://github.com/nodejs/node/pull/36025
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-06-11 09:28:45 +02:00
Robert Nagy
c31e2f6b0f
stream: fix legacy pipe error handling
...
Fixes: https://github.com/nodejs/node/issues/35237
PR-URL: https://github.com/nodejs/node/pull/35257
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-06-11 09:28:45 +02:00
Anna Henningsen
9fa8d2037f
tools: add linting rule for async IIFEs
...
The result of an async IIFE should always be handled in our tests,
typically by adding `.then(common.mustCall())` to verify that the
async function actually finishes executing at some point.
PR-URL: https://github.com/nodejs/node/pull/34363
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-06-11 09:28:44 +02:00
Anna Henningsen
89ee6abae0
test: use .then(common.mustCall()) for all async IIFEs
...
This makes sure that all async functions finish as expected.
PR-URL: https://github.com/nodejs/node/pull/34363
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-06-11 09:28:44 +02:00
James M Snell and Benjamin Gruenbaum
d84b05a619
timers: cleanup abort listener on awaitable timers
...
Co-authored-by: Benjamin Gruenbaum <benjamingr@gmail.com >
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36006
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-06-11 09:28:38 +02:00