Daniel Beckert and Matheus Marchini
ece507394a
src: do not reuse async resource in http parsers
...
Change resource being used, previously HTTParser was being reused.
We are now using IncomingMessage and ClientRequest objects. The goal
here is to make the async resource unique for each async operatio
Refs: https://github.com/nodejs/node/pull/24330
Refs: https://github.com/nodejs/diagnostics/issues/248
Refs: https://github.com/nodejs/node/pull/21313
Co-authored-by: Matheus Marchini <mat@mmarchini.me >
PR-URL: https://github.com/nodejs/node/pull/25094
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-04-22 11:51:46 -07:00
Refael Ackermann
5aaf666b3b
build: improve embedded code-cache detection
...
PR-URL: https://github.com/nodejs/node/pull/27311
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-04-22 14:48:50 -04:00
cjihrig
b368571fba
test: move known issue test to parallel
...
As of libuv 1.28.0, this bug is fixed, and the test can be
moved to parallel. This commit also updates an error code
check to work on Windows.
PR-URL: https://github.com/nodejs/node/pull/27241
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2019-04-22 12:04:35 -04:00
Joyee Cheung
19e3e02a2d
src: move SIGINT watchdog utils to the contextify binding
...
These are used when evaluating scripts so it makes more sense
to put them in the contextify binding whose other methods are
going to be used together.
PR-URL: https://github.com/nodejs/node/pull/27290
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-22 18:43:40 +08:00
Refael Ackermann
528d100394
test: mark some known flakes
...
PR-URL: https://github.com/nodejs/node/pull/27225
Refs: https://github.com/nodejs/node/issues/26910
Refs: https://github.com/nodejs/node/issues/27219
Refs: https://github.com/nodejs/node/issues/26938
Refs: https://github.com/nodejs/node/issues/23089
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-04-21 09:19:54 -04:00
Rich Trott
e37eee2b1e
test: remove flaky designation for test-cli-node-options
...
The test failure is not platform-specific and is the result of
manual/human error. Some improvements may be possible, but there is
nothing fundamentally unsound about the test insofar as when it fails in
CI, there is a problem on the host that needs to be addressed and not an
inherent issue with the test.
Refs: https://github.com/nodejs/node/issues/25028#issuecomment-479554080
Closes: https://github.com/nodejs/node/issues/25028
PR-URL: https://github.com/nodejs/node/pull/27305
Fixes: https://github.com/nodejs/node/issues/25028
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-04-21 04:00:24 -07:00
Rich Trott
7167eb2f12
test: increase coverage for dns.promises.lookup()
...
Add coverage for uv_getaddrinfo() returning an error.
PR-URL: https://github.com/nodejs/node/pull/27299
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-04-20 19:05:39 -07:00
cjihrig
57ab3b56fc
test: allow leaked global check to be skipped
...
This simplifies the process of running tests on different
versions of Node, which might have a different set of
global variables.
PR-URL: https://github.com/nodejs/node/pull/27239
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-19 05:45:04 +02:00
Refael Ackermann
4f8b497991
test: try to stabalize test-child-process-fork-exec-path.js
...
PR-URL: https://github.com/nodejs/node/pull/27277
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2019-04-18 05:24:19 +02:00
kohta ito
652877e3a9
child_process: change the defaults maxBuffer size
...
PR-URL: https://github.com/nodejs/node/pull/27179
Refs: https://github.com/nodejs/node/pull/23027
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2019-04-17 14:05:15 -07:00
Sam Roberts
69140bc7f8
crypto: do not abort when setting throws
...
PR-URL: https://github.com/nodejs/node/pull/27157
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-17 11:15:04 -07:00
Maël Nison
3ef1512f9e
src: allows escaping NODE_OPTIONS with backslashes
...
The characters specified within NODE_OPTIONS can now be escaped, which
is handy especially in conjunction with `--require` (where the file path
might happen to contain spaces that shouldn't cause the option to be
split into two).
Fixes: https://github.com/nodejs/node/issues/12971
PR-URL: https://github.com/nodejs/node/pull/24065
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-04-17 19:46:00 +02:00
Refael Ackermann
14df42fd00
build: run mkcodecache as an action
...
* fix test-code-cache (for the common cases)
* deprecate `configure --code-cache-path`
PR-URL: https://github.com/nodejs/node/pull/27161
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2019-04-16 18:25:04 -04:00
Richard Lau
c6c37e9e85
test: use assert.rejects() and assert.throws()
...
Replace try-catch blocks in tests with `assert.rejects()` and
`assert.throws()`.
PR-URL: https://github.com/nodejs/node/pull/27207
Fixes: https://github.com/nodejs/node/issues/27198
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Ben Coe <bencoe@gmail.com >
2019-04-16 13:59:50 -04:00
Richard Lau
2400cbcf7c
fs: fix infinite loop with async recursive mkdir on Windows
...
If `file` is a file then on Windows `mkdir` on `file/a` returns an
`ENOENT` error while on POSIX the equivalent returns `ENOTDIR`. On the
POSIX systems `ENOTDIR` would break out of the loop but on Windows the
`ENOENT` would strip off the `a` and attempt to make `file` as a
directory. This would return `EEXIST` but the code wasn't detecting
that the existing path was a file and attempted to make `file/a` again.
PR-URL: https://github.com/nodejs/node/pull/27207
Fixes: https://github.com/nodejs/node/issues/27198
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Ben Coe <bencoe@gmail.com >
2019-04-16 13:59:43 -04:00
Geoffrey Booth
96e46d37c4
esm: replace --entry-type with --input-type
...
New flag is for string input only
PR-URL: https://github.com/nodejs/node/pull/27184
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2019-04-16 12:41:59 -04:00
Ruwan Geeganage
de463f1490
test: ec2 generateKeyPairSync invalid parameter encoding
...
PR-URL: https://github.com/nodejs/node/pull/27212
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-04-16 05:27:06 +02:00
gengjiawen
fe963149f6
repl: add welcome message
...
PR-URL: https://github.com/nodejs/node/pull/25947
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2019-04-16 03:37:03 +02:00
Ruben Bridgewater
9dcc9b6a6b
process: add --unhandled-rejections flag
...
This adds a flag to define the default behavior for unhandled
rejections. Three modes exist: `none`, `warn` and `strict`. The first
is going to silence all unhandled rejection warnings. The second
behaves identical to the current default with the excetion that no
deprecation warning will be printed and the last is going to throw
an error for each unhandled rejection, just as regular exceptions do.
It is possible to intercept those with the `uncaughtException` hook
as with all other exceptions as well.
This PR has no influence on the existing `unhandledRejection` hook.
If that is used, it will continue to function as before.
PR-URL: https://github.com/nodejs/node/pull/26599
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2019-04-15 18:29:07 +02:00
Ruben Bridgewater
1940114ac3
util: highlight stack frames
...
Using `util.inspect` on errors is going to highlight userland and
node_module stack frames from now on. This is done by marking Node.js
core frames grey and frames that contain `node_modules` in their path
yellow.
That way it's easy to grasp what frames belong to what code.
PR-URL: https://github.com/nodejs/node/pull/27052
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-15 17:30:50 +02:00
Ruben Bridgewater
693401d0dd
buffer: use stricter range checks
...
This validates the input to make sure the arguments do not overflow.
Before, if the input would overflow, it would cause the write to be
performt in the wrong spot / result in unexpected behavior.
Instead, just use a strict number validation.
PR-URL: https://github.com/nodejs/node/pull/27045
Fixes: https://github.com/nodejs/node/issues/27043
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-04-15 17:21:34 +02:00
Ben Noordhuis
2fed83dee8
test: test privateEncrypt/publicDecrypt + padding
...
Verify that RSA_NO_PADDING and RSA_PKCS1_PADDING work as advertised.
PR-URL: https://github.com/nodejs/node/pull/27188
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-04-15 07:46:39 +02:00
ZYSzys
9ad5106934
child_process: harden fork arguments validation
...
Ensure that the first argument `modulePath` of `fork` method
must be provided and be of type string.
PR-URL: https://github.com/nodejs/node/pull/27039
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-04-12 08:54:13 +08:00
Refael Ackermann
abe4183d41
test: mark some known flakes
...
PR-URL: https://github.com/nodejs/node/pull/27193
Refs: https://github.com/nodejs/node/issues/20750
Refs: https://github.com/nodejs/node/issues/26610
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-04-11 15:43:07 -04:00
Anatoli Papirovski
47f5cc1ad1
lib: faster FreeList
...
Make FreeList faster by using Reflect.apply and not using
is_reused_symbol, but rather just checking whether any
items are present in the list prior to calling alloc.
PR-URL: https://github.com/nodejs/node/pull/27021
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-11 05:40:59 +02:00
szabolcsit
2a51ae424a
test: cover thenables when we check for promises
...
Added tests that cover the issue when assert.rejects() and
assert.doesNotReject() should not accept Thenables without
a `catch` method or any Thenable function with `catch` and
`then` methods attached.
PR-URL: https://github.com/nodejs/node/pull/24219
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-04-10 23:37:41 +02:00
Ruben Bridgewater
c9fece38c8
util: change inspect compact and breakLength default
...
This changes the `compact` default from `true` to `3`. That mode
changes arrays to be grouped together, it alignes multiple small
entries on a single line in similar to `compact` true but only for
the most inner three depth levels and the closing brackets are
always on the same indentation as the openeing of the object instead
of at the same line as another property.
Big strings will be naturally broken into multiple lines instead of
having one huge line that is not well readable.
The output size mainly stays the same that way while it will be
smaller in case of big arrays.
Increasing the `breakLength` to 80 adjusts for most terminals that
support at least 80 characters in a single line and improves the
general output that way. A lot of calculations use the `breakLength`
to determine the concrete behavior.
PR-URL: https://github.com/nodejs/node/pull/27109
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-04-10 17:59:14 +02:00
Ruben Bridgewater
892c51f330
util: improve inspect edge cases
...
This makes sure `compact` number mode causes small proxies and map
entries to be printed on a single line.
It also fixed the line break calculation for `compact` mode when not
set to `true`. It now also adds the additional whitespace, comma and
quotes to the formula to prevent exceeding the `breakLength`.
PR-URL: https://github.com/nodejs/node/pull/27109
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-04-10 17:59:12 +02:00
Ruben Bridgewater
3a6eba3de6
test: use assert.rejects
...
This verifies that the test actually rejects at this point by using
`assert.rejects` instead of `try / catch`.
PR-URL: https://github.com/nodejs/node/pull/27123
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-10 02:52:43 +02:00
Ruben Bridgewater
3d6533ea02
test: simplify vm-module-errors test
...
Use `assert.rejects` to test error cases. This simplifies the test.
PR-URL: https://github.com/nodejs/node/pull/27123
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-10 02:52:41 +02:00
kohta ito
eb8a51a35c
child_process: use non-infinite maxBuffer defaults
...
Set the default maxBuffer size to 204,800 bytes for execSync,
execFileSync, and spawnSync.
APIs that return the child output as a string should have non-infinite
defaults for maxBuffer sizes to avoid out-of-memory error conditions. A
non-infinite default used to be the documented behaviour for all
relevant APIs, but the implemented behaviour for execSync, execFileSync
and spawnSync was to have no maxBuffer limits.
PR-URL: https://github.com/nodejs/node/pull/23027
Refs: https://github.com/nodejs/node/pull/22894
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-04-09 13:57:04 -07:00
Anna Henningsen
d1413305e0
test: print child stderr in test-http-chunk-problem
...
This helps with debugging test failures.
PR-URL: https://github.com/nodejs/node/pull/27117
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-04-09 21:56:29 +02:00
cjihrig
b925379f50
fs: warn on non-portable mkdtemp() templates
...
Refs: https://github.com/nodejs/node/issues/26435
PR-URL: https://github.com/nodejs/node/pull/26980
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-08 21:16:56 -04:00
Ruben Bridgewater
d11c4beb4b
module: remove dead code
...
This removes a lot of code that has no functionality anymore. All
Node.js internal code calls `_resolveLookupPaths` with two arguments.
The code that validates `index.js` is not required at all as we check
for these files anyway, so it's just redundant code that should be
removed.
PR-URL: https://github.com/nodejs/node/pull/26983
Refs: https://github.com/nodejs/node/pull/25362
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-04-08 18:56:17 +02:00
Sam Roberts
0911e88056
crypto: fix rsa key gen with non-default exponent
...
EVP_PKEY_CTX_set_rsa_keygen_pubexp() accepts ownership of the exponent
on success, so do not free it.
Fixes: https://github.com/nodejs/node/issues/27087
PR-URL: https://github.com/nodejs/node/pull/27092
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-08 09:44:36 -07:00
Michael Dawson
f96a6608eb
test: fix test-worker-memory.js for large cpu #s
...
This test consistently failed on a system with a
large number of cores (~120). Cap the number of
concurrent workers so we'll stay consistently within
the "slack" allowed with respect to rss.
PR-URL: https://github.com/nodejs/node/pull/27090
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-04-08 12:17:48 -04:00
gengjiawen
93df085386
test: fix this scope bug in test-stream2-writable.js
...
PR-URL: https://github.com/nodejs/node/pull/27111
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-04-08 22:40:15 +08:00
Tobias Nießen
969bd1eb7b
crypto: add support for RSA-PSS keys
...
This commit adds support for RSA-PSS keys, including
- KeyObjects of type rsa-pss,
- key pair generation for RSA-PSS, and
- signing and verification using RSA-PSS keys.
PR-URL: https://github.com/nodejs/node/pull/26960
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-04-08 09:22:32 +02:00
Ruben Bridgewater
d834275a48
buffer: fix custom inspection with extra properties
...
This broke due to a recent change that prevents exposing inspect
internals. It now relies on the public API instead and should be a
bit more robust due to that.
PR-URL: https://github.com/nodejs/node/pull/27074
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-04-08 08:55:46 +02:00
Ruben Bridgewater
75463a9004
assert: fix rejects stack trace and operator
...
This makes sure the stack trace is not removed due to a wrong stack
start function being used. It also fixes the wrong operator caused
by the same reason. This only applies in case an validation object
was used to validate the rejection passed to `assert.reject()` as
first argument.
PR-URL: https://github.com/nodejs/node/pull/27047
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-07 20:25:32 +02:00
Michaël Zasso
58aaf58406
test: fix test-repl-require-after-write
...
Currently, the test creates a file in the cwd and doesn't clean it up.
Use a temporary directory instead.
PR-URL: https://github.com/nodejs/node/pull/27088
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-04-06 23:04:49 +02:00
Nikolai Vavilov
3d8532f851
buffer: add {read|write}Big[U]Int64{BE|LE} methods
...
PR-URL: https://github.com/nodejs/node/pull/19691
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-04-06 19:30:23 +02:00
Joyee Cheung
de23055536
lib: remove env: node in eslint config for lib files
...
This patch removes the redundant `require-globals` custom
eslint rule by removing `env: node` in the eslint config
and whitelist the globals that can be accessed in native
modules instead of black listing them. This makes sense
for our `lib/` files because here we are creating the
Node.js environment instead of running in a normal user
land Node.js environment.
PR-URL: https://github.com/nodejs/node/pull/27082
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-04-06 12:04:36 +08:00
Joyee Cheung
864860e9f3
src: port coverage serialization to C++
...
This patch moves the serialization of coverage profiles into
C++. With this we no longer need to patch `process.reallyExit`
and hook into the exit events, but instead hook into relevant
places in C++ which are safe from user manipulation. This also
makes the code easier to reuse for other types of profiles.
PR-URL: https://github.com/nodejs/node/pull/26874
Reviewed-By: Ben Coe <bencoe@gmail.com >
2019-04-06 12:01:45 +08:00
Ben Noordhuis
f13733d12d
test: test vm.runInNewContext() filename option
...
The 'filename as a string' case was already being tested. This commit
also exercises the 'filename as an option' case.
PR-URL: https://github.com/nodejs/node/pull/27056
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gus Caplan <me@gus.host >
2019-04-05 05:44:51 +02:00
Tobias Nießen
73bca57988
crypto: fail early if passphrase is too long
...
This causes OpenSSL to fail early if the decryption passphrase is too
long, and produces a somewhat helpful error message.
PR-URL: https://github.com/nodejs/node/pull/27010
Refs: https://github.com/nodejs/node/pull/25208
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2019-04-04 16:09:11 +02:00
Filip Skokan
b2bb6c2b80
crypto: fix crash of encrypted private key export without cipher
...
PR-URL: https://github.com/nodejs/node/pull/27041
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-04-04 15:54:04 +02:00
Thomas
6fb32ac255
src: prevent crash in TTYWrap::Initialize
...
When console.log is called for the first time it initializes
TTYWrap object. However, if there is not enough space on the
V8 stack, creating function template fails and triggers
empty maybe local exception.
PR-URL: https://github.com/nodejs/node/pull/26832
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2019-04-04 15:35:02 +02:00
Ruben Bridgewater
4f094c0ae6
buffer: fix concat error message
...
The list argument may only be of type array, not of any other type
as it actually suggests.
PR-URL: https://github.com/nodejs/node/pull/27050
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-04-04 14:21:11 +02:00
Ruben Bridgewater
3b044962c4
errors: add more information in case of invalid callbacks
...
This adds the actual callback that is passed through to the error
message in case an ERR_INVALID_CALLBACK error is thrown.
PR-URL: https://github.com/nodejs/node/pull/27048
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-04-04 12:51:03 +02:00