Daniel Bevenius
2fa86b818b
lib: fix typo in timers insert function comment
...
PR-URL: https://github.com/nodejs/node/pull/33301
Reviewed-By: Zeyu Yang <himself65@outlook.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: Ruben Bridgewater <ruben@bridgewater.de >
2020-05-10 14:09:39 +02:00
Anna Henningsen
34d92b78ab
src: remove unnecessary Isolate::GetCurrent() calls
...
These calls are unnecessary in Release mode but would still have
been included, so move them to the `DebugSealHandleScope` constructor.
PR-URL: https://github.com/nodejs/node/pull/33298
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2020-05-10 14:08:40 +02:00
Ruben Bridgewater
18584727de
tools: remove obsolete no-restricted-syntax eslint rules
...
These rules only apply for the test folder and will already be
checked for.
PR-URL: https://github.com/nodejs/node/pull/32161
Refs: https://github.com/nodejs/node/pull/32078
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2020-05-10 14:00:44 +02:00
Ruben Bridgewater
36b2e25b4a
tools: add eslint rule to only pass through 'test' to debuglog
...
This makes sure all usages of `util.debuglog()` must contain the
string 'test' as argument.
PR-URL: https://github.com/nodejs/node/pull/32161
Refs: https://github.com/nodejs/node/pull/32078
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2020-05-10 14:00:37 +02:00
Michaël Zasso
c252f6c93f
test: add hr-time Web platform tests
...
Refs: https://github.com/nodejs/node/pull/32790
PR-URL: https://github.com/nodejs/node/pull/33287
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2020-05-10 13:54:34 +02:00
Michaël Zasso
1182539307
perf_hooks: fix error message for invalid entryTypes
...
Will now print a more meaningful value instead of always [object Object]
PR-URL: https://github.com/nodejs/node/pull/33285
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-05-10 13:53:15 +02:00
cjihrig
94e5b5c77d
http: return this from OutgoingMessage#destroy()
...
This commit updates OutgoingMessage#destroy() to return `this`
for consistency with other writable streams.
PR-URL: https://github.com/nodejs/node/pull/32789
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-05-09 13:57:29 -04:00
cjihrig
cad76da198
http: return this from ClientRequest#destroy()
...
This commit updates ClientRequest#destroy() to return `this`
for consistency with other writable streams.
PR-URL: https://github.com/nodejs/node/pull/32789
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-05-09 13:57:28 -04:00
cjihrig
ff6535a433
http: return this from IncomingMessage#destroy()
...
This commit updates IncomingMessage#destroy() to return `this`
for consistency with other readable streams.
PR-URL: https://github.com/nodejs/node/pull/32789
Fixes: https://github.com/nodejs/node/issues/32772
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-05-09 13:57:28 -04:00
Anna Henningsen
ae34e4737a
src: fix compiler warning in async_wrap.cc
...
../src/async_wrap.cc: In function ‘uint16_t node::ToAsyncHooksType(v8::PromiseHookType)’:
../src/async_wrap.cc:313:1: error: control reaches end of non-void function [-Werror=return-type]
}
Refs: https://github.com/nodejs/node/pull/32891
PR-URL: https://github.com/nodejs/node/pull/33322
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2020-05-09 19:09:30 +02:00
Ruy Adorno
38853eb84a
deps: upgrade npm to 6.14.5
...
PR-URL: https://github.com/nodejs/node/pull/33239
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2020-05-09 16:03:50 +02:00
Nikolai Vavilov
339690ce9b
buffer: improve copy() performance
...
There is no need to create a slice when sourceEnd is out of bounds.
PR-URL: https://github.com/nodejs/node/pull/33214
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-05-09 08:04:10 +02:00
David Halls
ea465faf4a
tls: reset secureConnecting on client socket
...
secureConnecting is never set to false on client TLS sockets.
So if Http2Session constructor (in lib/internal/http2/core.js) is
called after secureConnect is emitted, then it will wrongly wait
for a secureConnect event.
This fix sets secureConnecting to false when a client TLS socket
has connected.
PR-URL: https://github.com/nodejs/node/pull/33209
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2020-05-09 08:03:13 +02:00
Pranshu Srivastava
1aa491a88f
http2: add bytesWritten test for Http2Stream
...
note that this is for the `Http2Server` class. I'll soon be
adding one for `Http2SecureServer` as well.
Refs: https://github.com/nodejs/node/issues/29829
PR-URL: https://github.com/nodejs/node/pull/33162
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-05-09 08:00:25 +02:00
rickyes
be7fd2d517
fs: add .ref() and .unref() methods to watcher classes
...
PR-URL: https://github.com/nodejs/node/pull/33134
Fixes: https://github.com/nodejs/node/issues/33096
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-05-09 07:59:08 +02:00
Robert Nagy
28e6626ce7
http: set IncomingMessage.destroyed
...
IncomingMessage is a Readable stream and should properly
set the destroyed property.
PR-URL: https://github.com/nodejs/node/pull/33131
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2020-05-09 07:57:45 +02:00
osher
96faea137e
http: expose http.validate-header-name/value
...
The use-case is for any framework that provides user mw a response
replacement, that collects the desired response state, and applies them
only on conclusion. As such a framework, I'd want to validate the
header names and values as soon as the user-code provides them.
This - to eliminate errors on response-send time, and provide developer
stack trace that contains the line that submits the offending values.
PR-URL: https://github.com/nodejs/node/pull/33119
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-05-09 07:55:55 +02:00
Ben Noordhuis
d8a380e136
zlib: reject windowBits=8 when mode=GZIP
...
It's also handled in C++ land now, per the previous commit, but
intercepting it in JS land makes for prettier error messages.
PR-URL: https://github.com/nodejs/node/pull/33045
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: David Carlier <devnexen@gmail.com >
2020-05-09 07:54:40 +02:00
Ben Noordhuis
b8ed2a07d3
src: fix invalid windowBits=8 gzip segfault
...
`{ windowBits: 8 }` is legal for deflate streams but not gzip streams.
Fix a nullptr dereference when formatting the error message.
Bug introduced in commit c34eae5f88 ("zlib: refactor zlib internals")
from September 2018.
PR-URL: https://github.com/nodejs/node/pull/33045
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: David Carlier <devnexen@gmail.com >
2020-05-09 07:54:38 +02:00
Derek Lewis
3226731dec
meta: add issue template for API reference docs
...
Prior to this commit, there was no GitHub issue template guiding
users to open issues about gaps in the API reference docs.
Refs: https://github.com/nodejs/node/pull/31123
PR-URL: https://github.com/nodejs/node/pull/32944
Fixes: https://github.com/nodejs/nodejs.org/issues/2866
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Shelley Vohr <codebytere@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-05-09 07:53:31 +02:00
Stephen Belanger and Andrey Pechkurov
13c5a1629c
async_hooks: move PromiseHook handler to JS
...
This avoids the need to wrap every promise in an AsyncWrap and also
makes it easier to skip the machinery to track destroy events when
there's no destroy listener.
Co-authored-by: Andrey Pechkurov <apechkurov@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/32891
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2020-05-09 07:52:22 +02:00
Yash Ladha
023bcdeb28
lib: refactored scheduling policy assignment
...
In previous implementation it was clubbed into declaration of scheduling
policies and fetching the schedulingPolicy. Now they are separate
variables, so that in future if one want to add new scheduling policy.
It is much simpler and not obsfucated.
PR-URL: https://github.com/nodejs/node/pull/32663
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-05-09 07:50:11 +02:00
Anna Henningsen
fea01c1179
src: split out callback queue implementation from Environment
...
This isn’t conceptually tied to anything Node.js-specific at all.
PR-URL: https://github.com/nodejs/node/pull/33272
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2020-05-09 05:43:46 +02:00
Myles Borins
2c3c9f5a3f
module: better error for named exports from cjs
...
We do not support importing named exports from a CJS module.
This change decorates the error message for missing named exports in
the case where the module being imported is expected to be CJS by the
ESM loader.
Signed-off-by: Myles Borins <myles.borins@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/33256
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2020-05-08 15:35:16 -04:00
Robert Nagy
d005f490a8
http: cleanup end argument handling
...
PR-URL: https://github.com/nodejs/node/pull/31818
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-05-08 19:57:58 +02:00
Robert Nagy
e50ae7a259
doc: add warning for socket.connect reuse
...
PR-URL: https://github.com/nodejs/node/pull/33204
Refs: https://github.com/nodejs/node/issues/25969
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-05-08 18:03:26 +02:00
cjihrig
bcdbd57134
wasi: fix poll_oneoff memory interface
...
The WASM memory interfacing logic was wrong (particularly around
the size of __wasi_subscription_t). This commit fixes the logic.
PR-URL: https://github.com/nodejs/node/pull/33250
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2020-05-08 03:58:05 +02:00
Gabriel Schulhof
fdfb98b619
src: clean up large pages code
...
* Initialize structure members.
* Factor out common `Debug()` prefix.
* Remove unused `text_region` field.
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com >
PR-URL: https://github.com/nodejs/node/pull/33255
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: David Carlier <devnexen@gmail.com >
2020-05-07 17:36:39 -07:00
Jonathan Buhacoff
d135b508e9
doc: correct description of decipher.setAuthTag in crypto.md
...
Calling `decipher.setAuthTag` after `decipher.update` will result in
an error like `Unsupported state or unable to authenticate data`.
The example code in
[CCM mode](https://nodejs.org/docs/latest-v14.x/api/crypto.html#crypto_ccm_mode )
is correct, but to demonstrate the mistake in the documentation you
can take the same example and move the `setAuthTag` call to in between
`update` and `final` you will see the error.
2020-05-08 01:37:26 +02:00
rickyes
ab22d2cdcb
test: rename test-lookupService-promises
...
PR-URL: https://github.com/nodejs/node/pull/33100
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2020-05-08 01:34:48 +02:00
Adam Majer
df8db42082
test: skip some console tests on dumb terminal
...
Add capabilities to common test module to detect and skip tests
on dumb terminals.
In some of our build environments, like s390x, the terminal
is a dumb terminal meaning it has very rudimentary capabilities.
These in turn prevent some of the tests from completing with errors
as below.
not ok 1777 parallel/test-readline-tab-complete
---
duration_ms: 0.365
severity: fail
exitcode: 1
stack: |-
assert.js:103
throw new AssertionError(obj);
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
'\t' !== ''
at /home/abuild/rpmbuild/BUILD/node-git.8698dd98bb/test/parallel/test-readline-tab-complete.js:63:14
at Array.forEach (<anonymous>)
at /home/abuild/rpmbuild/BUILD/node-git.8698dd98bb/test/parallel/test-readline-tab-complete.js:18:17
at Array.forEach (<anonymous>)
at Object.<anonymous> (/home/abuild/rpmbuild/BUILD/node-git.8698dd98bb/test/parallel/test-readline-tab-complete.js:17:3)
at Module._compile (internal/modules/cjs/loader.js:1176:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
at Module.load (internal/modules/cjs/loader.js:1040:32)
at Function.Module._load (internal/modules/cjs/loader.js:929:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '\t',
expected: '',
operator: 'strictEqual'
}
...
PR-URL: https://github.com/nodejs/node/pull/33165
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-05-08 01:26:01 +02:00
szTheory
4d4e3c3674
lib: fix grammar in internal/bootstrap/loaders.js
...
PR-URL: https://github.com/nodejs/node/pull/33211
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-05-08 01:24:52 +02:00
osher
d6913dc1f0
doc: mention python3-distutils dependency in BUILDING.md
...
Ran into #30189 , solved by this comment:
https://github.com/nodejs/node/issues/30189#issuecomment-548250793
Refs: https://github.com/nodejs/node/issues/30189
PR-URL: https://github.com/nodejs/node/pull/33174
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Christian Clauss <cclauss@me.com >
2020-05-08 01:20:48 +02:00
Karol Walasek
d6b19fd537
doc: removed unnecessary util imports from vm examples
...
PR-URL: https://github.com/nodejs/node/pull/33179
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-05-08 01:20:10 +02:00
Nikolai Vavilov
dbad1b6515
doc: update Buffer(size) documentation
...
It returns zero-filled memory since v8.0.0.
PR-URL: https://github.com/nodejs/node/pull/33198
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-05-08 01:16:03 +02:00
himself65
f153081d26
module: lazy load 'getOptionValue' in initializeLoader
...
This enables loading this module during early bootstrapping.
PR-URL: https://github.com/nodejs/node/pull/33212
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2020-05-08 01:11:45 +02:00
Pranshu Srivastava
280c485d36
doc: add Uint8Array to end and write
...
PR-URL: https://github.com/nodejs/node/pull/33217
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-05-08 01:10:36 +02:00
Juan José Arboleda
3f1e65dd7b
doc: fix md issue in src/README.md
...
PR-URL: https://github.com/nodejs/node/pull/33224
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-05-08 01:07:38 +02:00
Simen Bekkhus
5424f1b844
doc: specify unit of time passed to fs.utimes
...
PR-URL: https://github.com/nodejs/node/pull/33230
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-05-08 01:06:40 +02:00
Tobias Nießen
c01544de1f
wasi: prevent syscalls before start
...
PR-URL: https://github.com/nodejs/node/pull/33235
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-05-08 01:02:19 +02:00
Andrey Pechkurov
fedb0f4d54
doc: add troubleshooting guide for AsyncLocalStorage
...
PR-URL: https://github.com/nodejs/node/pull/33248
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2020-05-08 01:00:24 +02:00
Andrey Pechkurov
dab51dddc8
doc: remove AsyncWrap mentions from async_hooks.md
...
AsyncWrap is a private API and should not be mentioned
in the documentation.
PR-URL: https://github.com/nodejs/node/pull/33249
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-05-08 00:59:42 +02:00
James M Snell
baba42c38b
doc: add warnings about transferring Buffers and ArrayBuffer
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/33252
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Mathias Buus <mathiasbuus@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2020-05-08 00:59:15 +02:00
Gabriel Schulhof
e454e9b33f
n-api: add uint32 test for -1
...
Adds a test to ensure that napi_get_value_uint32 returns 0xffffffff for
-1.
Re: https://github.com/nodejs/node/issues/33117
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
2020-05-06 23:52:05 -07:00
Robert Nagy
8607f9ec5c
stream: make from read one at a time
...
Currently from will eagerly buffer up items
which means that errors are also eagerly
encountered and items which are buffer when
an error occurs will be discarded, which is
inconsistent with how generators work.
Fixes: https://github.com/nodejs/node/issues/29428
PR-URL: https://github.com/nodejs/node/pull/33201
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-05-06 22:39:33 +02:00
Michael Dawson
3662b0c2c7
doc: update napi_async_init documentation
...
Fixes: https://github.com/nodejs/node/issues/33153
Change documentation to make async_resource required
as opposed to optional in napi-async_init.
Changes over time mean this parameter is required for
proper operation of async hooks (which are still experimental).
This changes the documentation to document what
callers should do. We are doing this only in the doc
in order to avoid a breaking change in N-API. We could
create a new version of the method for which the
parametrer is enforced as mandatory but we should only
do that once async hooks is no longer experimental. In
that case we could deprecate (but not remove this version
of the method).
Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com >
PR-URL: https://github.com/nodejs/node/pull/33181
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2020-05-06 14:58:14 -04:00
James M Snell
548439a530
doc: doc and test URLSearchParams discrepancy
...
The WHATWG URL spec is not going to change this behavior so
let's document it
Signed-off-by: James M Snell <jasnell@gmail.com >
Fixes: https://github.com/nodejs/node/issues/33037
PR-URL: https://github.com/nodejs/node/pull/33236
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
2020-05-06 10:40:10 -07:00
James M Snell
1dc006ef19
src: use BaseObjectPtr in StreamReq::Dispose
...
Allow the AsyncWrap to be properly detached.
Extracted from the [QUIC PR](https://github.com/nodejs/node/pull/32379 ).
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/33102
Refs: https://github.com/nodejs/node/pull/32379/files?file-filters%5B%5D=.bat&file-filters%5B%5D=.gyp&file-filters%5B%5D=.gypi&file-filters%5B%5D=.h&file-filters%5B%5D=.md&file-filters%5B%5D=.py&file-filters%5B%5D=.sh&file-filters%5B%5D=No+extension&file-filters%5B%5D=dotfile#r409084763
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-05-06 07:56:47 -07:00
Richard Lau
120d7076d5
Revert "src: add test/abort build tasks"
...
This reverts commit e08ac09569 .
PR-URL: https://github.com/nodejs/node/pull/33196
Refs: https://github.com/nodejs/node/pull/31740
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-05-06 09:39:58 -04:00
Richard Lau
a22991b044
Revert "src: add aliased-buffer-overflow abort test"
...
This reverts commit babeb58c52 .
PR-URL: https://github.com/nodejs/node/pull/33196
Refs: https://github.com/nodejs/node/pull/31740
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-05-06 09:39:43 -04:00