Jon Kunkee
d57c526cfd
win,build: add arbitrary and binlog options
...
This change adds a 'msbuild_arg' option to vcbuild.bat that can be used
to pass arbitrary flags to MSBuild.
It also adds a 'binlog' flag as a shortcut 'msbuild_arg' option to
enable binary logging to `%config%\node.binlog`. This is especially
convenient when debugging changes to the build system.
In the process of developing this change, the idea of adding 'setlocal'
to the beginning of the script was rejected since other scripts in this
repo rely on the exported environment variables. This change adds a
note describing this.
PR-URL: https://github.com/nodejs/node/pull/25994
Reviewed-By: João Reis <reis@janeasystems.com >
2019-03-04 12:24:09 +00:00
Rich Trott
d3d79d9f86
tools: rebuild lint-md.js
...
Update lint-md.js from updated rollup modules.
PR-URL: https://github.com/nodejs/node/pull/26393
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-03 22:27:16 -08:00
Rich Trott
d9536f73e5
tools: update node-lint-md-cli-rollup lockfile
...
This includes an update for chownr from 1.0.1 to 1.1.1, which means a
fix for the issue described in
https://github.com/isaacs/chownr/issues/14 . While not a
user-facing issue, it seems like a good idea to patch promptly anyway.
PR-URL: https://github.com/nodejs/node/pull/26393
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-03 22:27:13 -08:00
cjihrig
17b7fa75c3
tools: update ESLint to 5.15.0
...
Update ESLint to 5.15.0
PR-URL: https://github.com/nodejs/node/pull/26391
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-03 22:04:24 -05:00
Sagi Tsofan
8c597df350
http2: improve compatibility with http/1
...
When using the compatibility API the connection header is from now on
ignored instead of throwing an `ERR_HTTP2_INVALID_CONNECTION_HEADERS`
error.
This logs a warning in such case to notify the user about the ignored
header.
PR-URL: https://github.com/nodejs/node/pull/23908
Fixes: https://github.com/nodejs/node/issues/23748
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-04 02:59:26 +01:00
gengjiawen
5e23bac9dd
src: fix typo in callback.cc
...
PR-URL: https://github.com/nodejs/node/pull/26337
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-04 02:42:20 +01:00
Jeremy Apthorp
2bf6e71d9e
src: extra-semi warning in node_platform.h
...
https://clang.llvm.org/docs/DiagnosticsReference.html#wextra-semi
PR-URL: https://github.com/nodejs/node/pull/26330
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-04 02:37:37 +01:00
ZYSzys
c3386e6cc3
src: reduce to simple const char* in OptionsParser
...
> A lot of the `std::string` usage here could be reduced
to simple `const char*`s if it's reasonable to expect the values to be
known at compile-time.
So this commit uses `const char*` to replace most of `std::string` in
`OptionsParser`.
PR-URL: https://github.com/nodejs/node/pull/26297
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-04 02:34:29 +01:00
Juan José Arboleda
3826d692cc
test: improve test coverage in perf_hooks
...
PR-URL: https://github.com/nodejs/node/pull/26290
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-04 02:27:43 +01:00
ZYSzys
6f6f6d4087
test: remove duplicated buffer negative allocation test
...
PR-URL: https://github.com/nodejs/node/pull/26160
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
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: Сковорода Никита Андреевич <chalkerx@gmail.com >
2019-03-04 02:20:41 +01:00
Ben Noordhuis
df67cd0fef
inspector: print all listening addresses
...
Some hostnames have multiple interfaces. Before this commit, the
inspector only printed the first one. Now, it prints them all.
No test. I can't think of a reliable way to test this on the CI matrix.
PR-URL: https://github.com/nodejs/node/pull/26008
Fixes: https://github.com/nodejs/node/issues/13772
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-04 02:19:27 +01:00
Refael Ackermann
000788ec23
meta: update note about building on smartOS 16
...
PR-URL: https://github.com/nodejs/node/pull/25684
Refs: https://github.com/nodejs/node/pull/25683
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-04 02:16:57 +01:00
Refael Ackermann
2c6d94f3db
src: fix warnings around node_options
...
* header explicit usage, order, and reduce use of `*-inl.h`
* pointer -> const reference when possible
* no variable recyclicng
* `std::begin/end` prefered over `instance.begin/end`
* `USE` for explicit unused resaults
PR-URL: https://github.com/nodejs/node/pull/26280
Fixes: https://github.com/nodejs/node/issues/25593
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2019-03-03 20:03:31 -05:00
Refael Ackermann
af8b92c073
src: refactor node options parsers to mitigate MSVC bug
...
PR-URL: https://github.com/nodejs/node/pull/26280
Fixes: https://github.com/nodejs/node/issues/25593
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2019-03-03 20:03:31 -05:00
cjihrig
31be55203f
report: rename location to trigger
...
trigger more accurately describes the use of the field.
Previously, location was just the name of the C++ function
that called TriggerNodeReport().
PR-URL: https://github.com/nodejs/node/pull/26386
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-03 19:26:14 -05:00
cjihrig
d4abe2fc61
src: remove unused variable
...
PR-URL: https://github.com/nodejs/node/pull/26386
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-03 19:26:09 -05:00
cjihrig
b271b0315a
report: use triggerReport() to handle signals
...
This commit uses the triggerReport() binding to handle
signals and removes the custom onUserSignal() function.
PR-URL: https://github.com/nodejs/node/pull/26386
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-03 19:26:04 -05:00
cjihrig
4db423c0ee
src: remove unnecessary function declaration
...
PR-URL: https://github.com/nodejs/node/pull/26386
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-03 19:25:58 -05:00
cjihrig
48ab54c323
report: use triggerReport() to handle exceptions
...
This commit uses the triggerReport() binding to handle
uncaught exceptions and removes the custom onUncaughtException
function.
PR-URL: https://github.com/nodejs/node/pull/26386
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-03 19:25:46 -05:00
Anna Henningsen
28db96f31c
zlib: report premature ends earlier
...
Report end-of-stream when decompressing when we detect it,
and do not wait until the writable side of a zlib stream
is closed as well.
Refs: https://github.com/nodejs/node/issues/26332
PR-URL: https://github.com/nodejs/node/pull/26363
Refs: https://github.com/nodejs/node/issues/26332
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-04 00:13:40 +01:00
Anna Henningsen
a0778a97e1
repl: use object writer for thrown errors
...
This makes us use the defaults that were set for the REPL, i.e.
aligns with the printing of expression completion values, and in
particular enables color support.
PR-URL: https://github.com/nodejs/node/pull/26361
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-04 00:12:07 +01:00
Ruben Bridgewater
6c38fcff1d
test: only inspect on failure
...
The inspection was done in all cases so far and that's not necessary.
Therefore this changed this behavior to only inspect the input on
failure cases.
PR-URL: https://github.com/nodejs/node/pull/26360
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-03-03 23:33:46 +01:00
Ruben Bridgewater
f871c80a6d
tty: improve color detection
...
1) Using `process.env.TERM = 'dumb'` should never return any colors.
2) `process.env.TERM = 'terminator'` supports 24 bit colors.
3) Add support for `process.env.TERM = 'rxvt-unicode-24bit'`
4) `Hyper` does not support true colors anymore. It should fall back
to the xterm settings in regular cases.
5) `process.env.COLORTERM = 'truecolor'` should return 24 bit colors.
PR-URL: https://github.com/nodejs/node/pull/26264
Refs: https://github.com/nodejs/node/pull/26261
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-03 23:31:44 +01:00
Ruben Bridgewater
7f2d2cdc0c
test: always activate colors if necessary
...
PR-URL: https://github.com/nodejs/node/pull/26264
Refs: https://github.com/nodejs/node/pull/26261
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-03 23:31:43 +01:00
Rich Trott
d773311c33
doc: edit deprecation identifier info in Collaborator Guide
...
Edit the deprecation identifier material in the Collaborator Guide for
simplicity and clarity.
PR-URL: https://github.com/nodejs/node/pull/26372
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2019-03-03 14:07:14 -08:00
Guy Bedford
ccaebdef66
esm: process proxy Symbol.toString fix
...
PR-URL: https://github.com/nodejs/node/pull/25963
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-03 18:20:45 +02:00
Juan José Arboleda
1d97374f69
src: remove already elevated Isolate namespce
...
PR-URL: https://github.com/nodejs/node/pull/26294
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-03-03 12:23:22 +05:30
gengjiawen
d16cfa4d7d
src: remove unused macro in env.cc
...
PR-URL: https://github.com/nodejs/node/pull/26273
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-03-03 12:17:59 +05:30
Rich Trott
60a148ad2e
tools: update extend to 3.0.2
...
Update `extend` to 3.0.2 as 3.0.1 is susceptible to a low-severity
security issue.
Refs: https://snyk.io/vuln/npm:extend:20180424
PR-URL: https://github.com/nodejs/node/pull/26392
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-03-02 18:58:09 -08:00
Rich Trott
b97cd9b932
tools: remove unneeded .gitignore entries
...
Remove entries from `.gitignore` that are already covered by the generic
`.*` entry on line 2 of the .gitignore file.
PR-URL: https://github.com/nodejs/node/pull/26370
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-02 18:56:43 -08:00
cjihrig
f9cd5e3094
doc,lib,test: rename node-report to report
...
This commit completes the renaming of node-report to report
in order to better differentiate core's reporting from the
node-report npm module.
PR-URL: https://github.com/nodejs/node/pull/26371
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-02 21:17:33 -05:00
cjihrig
fe292fac55
test: rename node-report suite to report
...
This commit renames the "node-report" test suite to "report"
in order to begin differentiating core's diagnostic reporting
from the original node-report module on npm
PR-URL: https://github.com/nodejs/node/pull/26371
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-02 21:17:19 -05:00
cjihrig
060af324ae
test: improve validation of report output
...
This commit improves the validation of generated diagnostic
reports.
PR-URL: https://github.com/nodejs/node/pull/26289
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-02 18:06:48 -05:00
Matteo Collina and David Mark Clements
b1ef279d57
events: add once method to use promises with EventEmitter
...
This change adds a EventEmitter.once() method that wraps ee.once in a
promise.
Co-authored-by: David Mark Clements <david.mark.clements@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/26078
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2019-03-02 19:17:45 +01:00
Sebastiaan Deckers
2a5edafabd
doc: maxReservedRemoteStreams value constraints
...
PR-URL: https://github.com/nodejs/node/pull/26309
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-03-02 14:12:35 +01:00
Beni von Cheni
8f87080fcd
doc: correct typos in various docs
...
PR-URL: https://github.com/nodejs/node/pull/26312
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-03-02 14:10:30 +01:00
Rich Trott
536e062c2c
tools: update babel-eslint to 10.0.1
...
Update babel-eslint to 10.0.1.
PR-URL: https://github.com/nodejs/node/pull/26347
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-02 14:05:15 +01:00
Ben Noordhuis
99797cc9cd
build: make 'floating patch' message informational
...
Downgrade the 'Using floating patch' message that is emitted
when a local patch is applied to the bundled ICU from a warning
to a notice. There isn't anything the user can or should do so
warning isn't appropriate. Instead of angry yellow use soothing green.
Fixes: https://github.com/nodejs/node/issues/26346
PR-URL: https://github.com/nodejs/node/pull/26349
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-02 14:01:47 +01:00
Anna Henningsen
f65b4afaea
worker: provide process.execArgv
...
Provide `process.execArgv`. If an `execArgv` option is passed to the
`Worker` constructor, that option is used as its value; if not,
the parent’s `process.execArgv` is inherited (since that also goes
for the actual options in that case).
PR-URL: https://github.com/nodejs/node/pull/26267
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-02 13:16:35 +01:00
Tobias Nießen
b8018f407b
crypto: move DEP0113 to End-of-Life
...
PR-URL: https://github.com/nodejs/node/pull/26249
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-03-02 10:58:12 +01:00
Rich Trott
f11e8b959d
tools: update eslint-plugin-markdown to 1.0.0
...
For eslint-plugin-markdown, we had been using an RC but can now use the
most recent stable release of 1.0.0, as it has the bugfix that caused us
to start using the RC in the first place.
There are a few other updates in this commit too because it was
performed by running `update-eslint.sh`. This did not update ESLint
itself but did update some dependencies.
PR-URL: https://github.com/nodejs/node/pull/26345
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-03-01 22:55:28 -08:00
Rich Trott
e0c39218d9
tools: use latest rather than next for markdown linting plugin
...
eslint-plugin-markdown is being installed @next to get a bugfix for
https://github.com/eslint/eslint-plugin-markdown/issues/69 but that
bugfix is in 1.0.0. Go back to installing @latest rather than @next.
PR-URL: https://github.com/nodejs/node/pull/26345
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-03-01 22:55:09 -08:00
Luigi Pinca
144f876c68
doc: sort http.request() options alphabetically
...
PR-URL: https://github.com/nodejs/node/pull/26152
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-02 07:50:52 +01:00
Luigi Pinca
f42bf397bd
doc: add documentation for the defaultPort option
...
PR-URL: https://github.com/nodejs/node/pull/26152
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-02 07:50:44 +01:00
gengjiawen
453ed05343
src: remove unused macro in node_http2.h
...
PR-URL: https://github.com/nodejs/node/pull/26204
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-02 00:13:12 +01:00
gengjiawen
f1d846b3b7
src: remove redundant cast in PipeWrap::Fchmod
...
PR-URL: https://github.com/nodejs/node/pull/26242
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-02 00:12:16 +01:00
Thomas
e9ed6b988f
console: prevent constructing console methods
...
Ref: https://github.com/nodejs/node/issues/25987
PR-URL: https://github.com/nodejs/node/pull/26096
Refs: https://github.com/nodejs/node/issues/25987
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com >
2019-03-02 00:07:53 +01:00
Richard Lau
fc4c0de92f
report: add fallback for uv_getnameinfo() failures
...
Attempt to report the host and port in the case that uv_getnameinfo()
fails.
PR-URL: https://github.com/nodejs/node/pull/26140
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-03-02 00:02:05 +01:00
Anna Henningsen
d64e4deb73
src: simplify native immediate by using v8::Global
...
Unlike `node::Persistent`, `v8::Global` has move semantics and
can be used directly in STL containers.
PR-URL: https://github.com/nodejs/node/pull/26254
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-01 22:46:24 +01:00
Anna Henningsen
018e95ad13
dns: refactor QueryWrap lifetime management
...
- Prefer RAII-style management over manual resource management.
- Prefer `env->SetImmediate()` over a separate `uv_async_t`.
- Perform `ares_destroy()` before possibly tearing down c-ares state.
- Verify that the number of active queries is non-negative.
- Let pending callbacks know when their underlying `QueryWrap` object
has been destroyed.
The last item has been a real bug, in that when Workers shut down
during currently running DNS queries, they may run into use-after-free
situations because:
1. Shutting the `Worker` down leads to the cleanup code deleting
the `QueryWrap` objects first; then
2. deleting the `ChannelWrap` object (as it has been created before
the `QueryWrap`s), whose destructor runs `ares_destroy()`, which
in turn invokes all pending query callbacks with `ARES_ECANCELLED`,
3. which lead to use-after-free, as the callback tried to access the
deleted `QueryWrap` object.
The added test verifies that this is no longer an issue.
PR-URL: https://github.com/nodejs/node/pull/26253
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-01 22:18:26 +01:00