Jan Krems
656ceea393
deps: cherry-pick dbfe4a49d8 from upstream V8
...
Original commit message:
Introduce ScriptOrModule and HostDefinedOptions
This patch introduces a new container type ScriptOrModule which
provides the name and the host defined options of the script/module.
This patch also introduces a new PrimitivesArray that can hold
Primitive values, which the embedder can use to store metadata.
The HostDefinedOptions is passed to V8 through the ScriptOrigin, and
passed back to the embedder through HostImportModuleDynamically for
module loading.
Bug: v8:5785, v8:6658, v8:6683
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I56c26fc9a680b273ac0a6691e5ad75f15b8dc80a
Reviewed-on: https://chromium-review.googlesource.com/622158
Reviewed-by: Adam Klein <adamk@chromium.org >
Reviewed-by: Georg Neis <neis@chromium.org >
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org >
Cr-Commit-Position: refs/heads/master@{#47724}
Backport-PR-URL: https://github.com/nodejs/node/pull/17823
PR-URL: https://github.com/nodejs/node/pull/16889
Refs: https://github.com/v8/v8/commit/dbfe4a49d88f6655ed31285a40b63786ab1e8e49
Refs: https://github.com/nodejs/node/pull/15713
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-08-16 11:38:48 +10:00
Anna Henningsen
e094275799
http: simplify parser lifetime tracking
...
Instead of providing a separate class for keeping the
parser alive during its own call back, just delay a
possible `.close()` call until the stack has cleared
completely.
PR-URL: https://github.com/nodejs/node/pull/18135
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-16 11:38:48 +10:00
Anna Henningsen
59f13304e1
src: refactor callback #defines into C++ templates
...
Use template helpers instead of `#define`s to generate
the raw C callbacks that are passed to the HTTP parser library.
A nice effect of this is that it is more obvious what
parameters the `Parser` methods take.
PR-URL: https://github.com/nodejs/node/pull/18133
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
2018-08-16 11:38:48 +10:00
Daniel Bevenius
18fd620606
build: add node_lib_target_name to cctest deps
...
Currently the cctest target depend on the node_core_target_name
target. But it is the node_lib_target_name target that compiles the
sources now which means that if a source file in src is updated the
cctest executable will not be re-linked against it, but will remain
unchanged. The code will still be compiled, just not linked which
means that if you are debugging you'll not see the changes and also a
warning will be displayed about this issue.
This commit changes the cctest target to depend on node_lib_target_name.
Backport-PR-URL: https://github.com/nodejs/node/pull/20797
PR-URL: https://github.com/nodejs/node/pull/18576
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Yihong Wang <yh.wang@ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-08-16 11:38:48 +10:00
Daniel Bevenius
9bd5fc2b34
build: make gyp user defined variables lowercase
...
I mistakenly introduced user defined variables using uppercase
characters, reading the gyp documentation they state:
"Predefined variables. By convention, these are named with
CAPITAL_LETTERS. Predefined variables are set automatically by GYP"
and also "By convention, user-defined variables are named with
lowercase_letters."
This commit renames the user defined variables to lowercase to follow
the above mentioned convention.
Backport-PR-URL: https://github.com/nodejs/node/pull/20797
PR-URL: https://github.com/nodejs/node/pull/16238
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:48 +10:00
Anna Henningsen
a8d2ab50fc
src: rename On* -> Emit* for stream callbacks
...
This should make these function calls a lot more intuitive for people
who are more accustomed to Node’s EventEmitter API.
PR-URL: https://github.com/nodejs/node/pull/17701
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-16 11:38:48 +10:00
Anna Henningsen
15c4717e0a
src: harden JSStream callbacks
...
Since these are executing JS code, and in particular parts of that
code may be provided by userland, handle such exceptions in C++.
Refs: https://github.com/nodejs/node/pull/17938#issuecomment-354683850
PR-URL: https://github.com/nodejs/node/pull/18028
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-08-16 11:38:48 +10:00
Anna Henningsen
0a3ebb030e
benchmark: add JSStreamWrap benchmark
...
This is made to mirror the connection-bound net benchmarks.
PR-URL: https://github.com/nodejs/node/pull/17983
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:48 +10:00
Anna Henningsen
1942440696
test: refactor test-repl
...
- Switch over to async tracking through promises/async fns
- Remove an unused temp dir refresh
- Inline the multiline/npm text prompts into expectations
- Unify handling prompts/stripping prompts out
- Make sure no unexpected data is received by requireing
all *lines* to be matched, rather than chunks received from
the REPL. This made the test too loose in terms of
matched lines and too strict in terms of stream chunking
requirements.
- Some general cleanup
PR-URL: https://github.com/nodejs/node/pull/17926
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:48 +10:00
Michael Dawson
5ea1492b74
src: fix code coverage cleanup
...
In https://github.com/nodejs/node/pull/17987 which updated
the location of the code coverage patches I missed a few
changes needed to properly clean up for code coverage. Add
these.
PR-URL: https://github.com/nodejs/node/pull/18081
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:48 +10:00
Michael Dawson
0d2a720c70
src: update make for new code coverage locations
...
The files for code coverage are moving to the build
repository. Update the references to reflect this.
PR-URL: https://github.com/nodejs/node/pull/17987
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:48 +10:00
Anatoli Papirovski
68d33c692e
perf_hooks: fix scheduling regression
...
Scheduling a PerformanceGCCallback should not keep the
loop alive but due to the recent switch to using the
native SetImmediate method, it does. Go back to using
uv_async_t and add a regression test.
PR-URL: https://github.com/nodejs/node/pull/18051
Fixes: https://github.com/nodejs/node/issues/18047
Refs: https://github.com/nodejs/node/pull/18020
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-16 11:38:48 +10:00
Tobias Nießen
06329a8eaf
http2: remove duplicate words in comments
...
PR-URL: https://github.com/nodejs/node/pull/17939
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:48 +10:00
Tobias Nießen
2c6f482ba2
src: remove duplicate words in comments
...
PR-URL: https://github.com/nodejs/node/pull/17939
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:48 +10:00
Rich Trott
7d263ff708
test: fix unreliable async-hooks/test-signalwrap
...
Use an interval to keep the event loop open so the test does not exit
before receiving all signals fom asynchronous `exec()` calls.
PR-URL: https://github.com/nodejs/node/pull/17827
Fixes: https://github.com/nodejs/node/issues/14070
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2018-08-16 11:38:48 +10:00
Jon Moss
7c6e391419
lib, src: use process.config instead of regex
...
Is safer to use a `process.binding(config)` defined boolean, than to
regex on `process.execArgv`. Also, this better falls in line with the
conventions of checking flags passed to the executable.
PR-URL: https://github.com/nodejs/node/pull/17814
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-16 11:38:48 +10:00
cjihrig
fa6f808c71
test: add test for postmortem metadata validation
...
This commit adds a test to validate postmortem debugging metadata.
When this test runs, it can check for the presence of metadata
constants used by tools such as llnode and mdb and report if any
have accidentally been removed.
PR-URL: https://github.com/nodejs/node/pull/17685
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-08-16 11:38:48 +10:00
Hakan Kimeiga
40a36b3af8
url: added url fragment lookup table
...
Percent-encoded additional characters in fragment state with new
FRAGMENT_ENCODE_SET lookup table. The fragment percent-encode set
includes the C0 control percent-encode set and code points U+0020,
U+0022, U+003C, U+003E, and U+0060.
PR-URL: https://github.com/nodejs/node/pull/17627
Fixes: https://github.com/nodejs/node/issues/17540
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:48 +10:00
Haejin Jo
654ce4ba17
url: added space to class string of iterator objects
...
PR-URL: https://github.com/nodejs/node/pull/17558
Fixes: https://github.com/nodejs/node/issues/17540
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:48 +10:00
Timothy Gu
7fa97d4f09
src: make FSEventWrap/StatWatcher::Start more robust
...
PR-URL: https://github.com/nodejs/node/pull/17432
Fixes: https://github.com/nodejs/node/issues/17430
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:48 +10:00
Anna Henningsen
8292bc3892
tls: use correct class name in deprecation message
...
`tls.Socket` does not exist, and the deprecation message
should refer to `tls.TLSSocket` (like the documentation
for the deprecation message already does).
PR-URL: https://github.com/nodejs/node/pull/17561
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-16 11:38:48 +10:00
Refael Ackermann
f2506d46b5
tools: don't lint-md as part of main lint target
...
PR-URL: https://github.com/nodejs/node/pull/17587
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-16 11:38:48 +10:00
Daniel Bevenius
c491ac424b
crypto: remove BIO_set_shutdown
...
I've not been able to find any reason for calling
BIO_set_shutdown(bio, 1). This is done by default for the following
versions of OpenSSL:
https://github.com/openssl/openssl/blob/OpenSSL_1_1_0/
crypto/bio/bio_lib.c#L26
https://github.com/openssl/openssl/blob/OpenSSL_1_0_1/
crypto/bio/bio_lib.c#L90
https://github.com/openssl/openssl/blob/OpenSSL_1_0_2/
crypto/bio/bio_lib.c#L88
https://github.com/openssl/openssl/blob/OpenSSL_1_0_0/
crypto/bio/bio_lib.c#L90
This commit removes the call and the comment.
PR-URL: https://github.com/nodejs/node/pull/17542
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-16 11:38:48 +10:00
Daniel Bevenius
88c4adfdde
test: remove test case 0 from tls-cnnic-whitelist
...
I looks like this test has not worked as expected since commit
2bc7841d0f ("test: use random ports
where possible"). The test in that commit checked for `CERT_REVOKED`
which was returned by CheckWhitelistedServerCert.
CheckWhitelistedServerCert was later removed in commit
6ee4228c1d ("src: drop CNNIC+StartCom
certificate whitelisting").
I'm suggesting that this test case be removed as I don't think it is
valid anymore.
Backport-PR-URL: https://github.com/nodejs/node/pull/20776
PR-URL: https://github.com/nodejs/node/pull/19767
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-16 11:38:48 +10:00
Daniel Bevenius
64b4ea47ed
test: set clientOpts.port property
...
Currently this test will overwrite the clientOpts object with the port,
instead of setting the port property on the clientOpts object which
looks like the original intent.
Doing this the test fails reporting that the fake-cnnic-root-cert has
expired. This is indeed true:
$ openssl x509 -in test/fixtures/keys/fake-cnnic-root-cert.pem \
-text -noout
Certificate:
...
Validity
Not Before: Jun 9 17:15:16 2015 GMT
Not After : Mar 29 17:15:16 2018 GMT
This commit sets the errorCode to CERT_HAS_EXPIRED. I tried updating the
certificate using test/fixtures/keys/Makefile but then no error is
thrown and I'm currently looking into this.
Backport-PR-URL: https://github.com/nodejs/node/pull/20776
PR-URL: https://github.com/nodejs/node/pull/19767
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-16 11:38:48 +10:00
Ruben Bridgewater
98f5b17ee1
errors: make message non-enumerable
...
A error message should always be non-enumerable. This makes sure
that is true for dns errors as well. It also adds another check
in `common.expectsError` to make sure no other regressions are
introduced going forward.
Fixes #19716
Backport-PR-URL: https://github.com/nodejs/node/pull/19191
PR-URL: https://github.com/nodejs/node/pull/19719
Fixes: https://github.com/nodejs/node/issues/19716
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:48 +10:00
Joyee Cheung
9dc1f509f1
errors: move error creation helpers to errors.js
...
This commit moves error creation helpers scattered around
under lib/ into lib/internal/errors.js in the hope of being clearer
about the differences of errors that we throw into the user land.
- Move util._errnoException and util._exceptionWithHostPort
into internal/errors.js and simplify their logic so it's
clearer what the properties these helpers create.
- Move the errnoException helper in dns.js to internal/errors.js
into internal/errors.js and rename it to dnsException. Simplify
it's logic so it no longer calls errnoException and skips
the unnecessary argument checks.
Backport-PR-URL: https://github.com/nodejs/node/pull/19191
PR-URL: https://github.com/nodejs/node/pull/18546
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:48 +10:00
Joyee Cheung
66520afdb8
util: skip type checks in internal getSystemErrorName
...
Backport-PR-URL: https://github.com/nodejs/node/pull/19191
PR-URL: https://github.com/nodejs/node/pull/18546
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:47 +10:00
Joyee Cheung
9696bf920f
errors: lazy load util in internal/errors.js
...
Backport-PR-URL: https://github.com/nodejs/node/pull/19191
PR-URL: https://github.com/nodejs/node/pull/18358
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-08-16 11:38:47 +10:00
Joyee Cheung
58b5a610d8
util: implement util.getSystemErrorName()
...
Reimplement uv.errname() as internal/util.getSystemErrorName() to
avoid the memory leaks caused by unknown error codes
and avoid calling into C++ for the error names. Also
expose it as a public API for external use.
Backport-PR-URL: https://github.com/nodejs/node/pull/19191
PR-URL: https://github.com/nodejs/node/pull/18186
Refs: http://docs.libuv.org/en/v1.x/errors.html#c.uv_err_name
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: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-16 11:38:47 +10:00
Joyee Cheung
c39b0020b5
src: expose uv.errmap to binding
...
Add a errno -> [error code, uv error message] map to the uv binding
so the error message can be assembled in the JS layer.
Backport-PR-URL: https://github.com/nodejs/node/pull/19191
PR-URL: https://github.com/nodejs/node/pull/17338
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-16 11:38:47 +10:00
Joyee Cheung
75b456d0b8
src: do not redefine private for GenDebugSymbols
...
Redefining private breaks any private inheritance in the
included files. We can simply declare GenDebugSymbols()
as friends in related classes to gain the access that we need.
Backport-PR-URL: https://github.com/nodejs/node/pull/19176
PR-URL: https://github.com/nodejs/node/pull/18653
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:47 +10:00
Ben Noordhuis
b7564c48dd
test: fix cctest -Wunused-variable warning
...
Backport-PR-URL: https://github.com/nodejs/node/pull/19176
PR-URL: https://github.com/nodejs/node/pull/18530
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2018-08-16 11:38:47 +10:00
Matheus Marchini
0564454b75
src, test: node internals' postmortem metadata
...
Before these changes, only V8 added postmortem metadata to Node's
binary, limiting the possibilities for debugger's developers to add some
features that rely on investigating Node's internal structures.
These changes are first steps towards empowering debug tools to
navigate Node's internal structures. One example of what can be
achieved with this is shown at nodejs/llnode#122 (a command which prints
information about handles and requests on the queue for a core dump
file). Node postmortem metadata are prefixed with nodedbg_.
This also adds tests to validate if all postmortem metadata are
calculated correctly, plus some documentation on what is postmortem
metadata and a few care to be taken to avoid breaking it.
Ref: https://github.com/nodejs/llnode/pull/122
Ref: https://github.com/nodejs/post-mortem/issues/46
Backport-PR-URL: https://github.com/nodejs/node/pull/19176
PR-URL: https://github.com/nodejs/node/pull/14901
Refs: https://github.com/nodejs/post-mortem/issues/46
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-08-16 11:38:47 +10:00
Andreas Madsen
e602726c68
trace_events: add file pattern cli option
...
Allow the user to specify the filepath for the trace_events log file
using a template string.
Backport-PR-URL: https://github.com/nodejs/node/pull/19145
PR-URL: https://github.com/nodejs/node/pull/18480
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-16 11:38:47 +10:00
Anna Henningsen
7cf26e5813
src: remove superfluous check in backtrace_posix.cc
...
The error check doesn't matter because a failure would be ignored
as part of the loop condition.
PR-URL: https://github.com/nodejs/node/pull/16950
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2018-08-16 11:38:47 +10:00
Refael Ackermann
3857e108ca
tools: speed up lint-md-build
...
by using package-lock.json
PR-URL: https://github.com/nodejs/node/pull/16945
Fixes: https://github.com/nodejs/node/issues/16628
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:47 +10:00
Daniel Bevenius
955080f7ee
http2: pass session to DEBUG_HTTP2SESSION2
...
When configure with --debug-http2 --debug-nghttp2 the following
compilation error is generated:
DEBUG_HTTP2SESSION2(this, "fatal error receiving data: %d", ret);
^
../src/node_http2.cc:1690:27:
error: invalid use of 'this' outside of a non-static member function
1 errors generated.
OnStreamReadImpl is static and I think the intention was to pass in the
session variable here.
PR-URL: https://github.com/nodejs/node/pull/20815
Refs: https://github.com/nodejs/node/issues/20806
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2018-08-16 11:38:47 +10:00
Vse Mozhet Byt
52f5829cdb
doc: fix typo in http2.md
...
Backport-PR-URL: https://github.com/nodejs/node/pull/20456
PR-URL: https://github.com/nodejs/node/pull/18872
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-08-16 11:38:47 +10:00
Peter Marton
b1b0486049
http2: add req and res options to server creation
...
Add optional Http2ServerRequest and Http2ServerResponse options
to createServer and createSecureServer. Allows custom req & res
classes that extend the default ones to be used without
overriding the prototype.
Backport-PR-URL: https://github.com/nodejs/node/pull/20456
PR-URL: https://github.com/nodejs/node/pull/15560
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-16 11:38:47 +10:00
Peter Marton
3f78847e0e
http2: add http fallback options to .createServer
...
This adds the Http1IncomingMessage and Http1ServerReponse options
to http2.createServer().
Backport-PR-URL: https://github.com/nodejs/node/pull/20456
PR-URL: https://github.com/nodejs/node/pull/15752
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-08-16 11:38:47 +10:00
Peter Marton
01dc646382
http: add options to http.createServer()
...
This adds the optional options argument to `http.createServer()`.
It contains two options: the `IncomingMessage` and `ServerReponse`
option.
Backport-PR-URL: https://github.com/nodejs/node/pull/20456
PR-URL: https://github.com/nodejs/node/pull/15752
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-08-16 11:38:47 +10:00
Rod Vagg
0cae3c3fe5
2018-08-15, Version 8.11.4 'Carbon' (LTS)
...
This is a security release. All Node.js users should consult the
security release summary at:
https://nodejs.org/en/blog/vulnerability/august-2018-security-releases/
for details on patched vulnerabilities.
Fixes for the following CVEs are included in this release:
* CVE-2018-0732 (OpenSSL)
* CVE-2018-12115 (Node.js)
Notable changes:
* buffer: Fix out-of-bounds (OOB) write in `Buffer.write()` for UCS-2 encoding
(CVE-2018-12115)
* deps: Upgrade to OpenSSL 1.0.2p, fixing:
* Client DoS due to large DH parameter (CVE-2018-0732)
* ECDSA key extraction via local side-channel (CVE not assigned)
v8.11.4
2018-08-15 19:27:43 +10:00
Rod Vagg
fc14d812b7
buffer: avoid overrun on UCS-2 string write
...
CVE-2018-12115
Discovered by ChALkeR - Сковорода Никита Андреевич
Fix by Anna Henningsen
Writing to the second-to-last byte with UCS-2 encoding will cause a -1
length to be send to String::Write(), writing all of the provided Buffer
from that point and beyond.
Fixes: https://github.com/nodejs-private/security/issues/203
PR-URL: https://github.com/nodejs-private/node-private/pull/138
2018-08-15 17:49:13 +10:00
Shigeki Ohtsu
3139897ff5
test: fix error messages for OpenSSL-1.0.2p
...
After upgradeing OpenSSL-1.0.2p, test-tls-passphrase.js was failed
due to change of error messages.
Ref: https://github.com/openssl/openssl/commit/18026c0215e942f0ad33a6012cb8cad2f51f841b
PR-URL: https://github.com/nodejs/node/pull/22320
Reviewed-By: Rod Vagg <rod@vagg.org >
2018-08-15 16:16:21 +10:00
Shigeki Ohtsu
8f59838ae7
deps: add -no_rand_screen to openssl s_client
...
In openssl s_client on Windows, RAND_screen() is invoked to initialize
random state but it takes several seconds in each connection.
This added -no_rand_screen to openssl s_client on Windows to skip
RAND_screen() and gets a better performance in the unit test of
test-tls-server-verify.
Do not enable this except to use in the unit test.
Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-08-15 16:16:19 +10:00
Shigeki Ohtsu
131c5ed438
openssl: fix keypress requirement in apps on win32
...
Reapply b910613792 .
Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-08-15 16:16:19 +10:00
Shigeki Ohtsu
97607f8622
deps: fix asm build error of openssl in x86_win32
...
See
https://mta.openssl.org/pipermail/openssl-dev/2015-February/000651.html
iojs needs to stop using masm and move to nasm or yasm on Win32.
Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-08-15 16:16:19 +10:00
Fedor Indutny
46e4917d98
deps: fix openssl assembly error on ia32 win32
...
`x86masm.pl` was mistakenly using .486 instruction set, why `cpuid` (and
perhaps others) are requiring .686 .
Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2018-08-15 16:16:19 +10:00
Shigeki Ohtsu
1b93677a81
deps: copy all openssl header files to include dir
...
All symlink files in `deps/openssl/openssl/include/openssl/`
are removed and replaced with real header files to avoid
issues on Windows. Two files of opensslconf.h in crypto and
include dir are replaced to refer config/opensslconf.h.
PR-URL: https://github.com/nodejs/node/pull/22320
Reviewed-By: Rod Vagg <rod@vagg.org >
2018-08-15 16:16:14 +10:00