0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

25802 Commits

Author SHA1 Message Date
Sakthipriyan Vairamani (thefourtheye)
5e0a3261f0
tools: make test.py Python 3 compatible
PR-URL: https://github.com/nodejs/node/pull/25767
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: cclauss <cclauss@me.com>
Reviewed-By: gengjiawen <technicalcute@gmail.com>
2019-02-02 00:24:54 +01:00
gengjiawen
dee9a61bb9
src: remove unused AsyncResource constructor in node.h
Signed-off-by: gengjiawen <technicalcute@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/25793
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
2019-02-02 00:21:50 +01:00
gengjiawen
8c8144e51c
src: remove unused method in js_stream.h
Signed-off-by: gengjiawen <technicalcute@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/25790
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-02 00:20:59 +01:00
Joyee Cheung
fa5e097530
process: move DEP0062 (node --debug) to end-of-life
This has already been practically end-of-life since `node --debug`
alone would exit the process. This patch drops support of
`node --inspect --debug-brk` as well.

`node --inspect --debug-brk` has been deprecated since v8,
it has been maintained so that vendors can target Node.js
v6 and above without detecting versions.
The support of `--inspect`, which starts from v6, will reach
end-of-life in April 2019, it should be safe to drop the support
of `--inspect --debug-brk` altogether in v12.

Also removes `process._deprecatedDebugBrk`

PR-URL: https://github.com/nodejs/node/pull/25828
Refs: https://github.com/nodejs/node/pull/12949
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-02-02 05:45:05 +08:00
Joyee Cheung
154efc9bde
process: exit on --debug and --debug-brk after option parsing
Moves the exit of `--debug` and `--debug-brk` earlier, that is,
after the option parsing is done in the C++ land.

Also removes `process._invalidDebug`.

PR-URL: https://github.com/nodejs/node/pull/25828
Refs: https://github.com/nodejs/node/pull/12949
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-02-02 05:45:05 +08:00
Michael Dawson
c369b3e929 test: exclude additional test for coverage
Exclude async-hooks/test-callback-error as it seems
to fail consistently when run with coverage on
the docker ubuntu16 machines we plan to run the
coverage sanity test on.

PR-URL: https://github.com/nodejs/node/pull/25833
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Coe <bencoe@gmail.com>
2019-02-01 16:44:01 -05:00
Joyee Cheung
406329de57
process: move process mutation into bootstrap/node.js
This patch moves the part in the report initialization
that mutates the process object into bootstrap/node.js
so it's easier to tell the side effect of the initialization
on the global state during bootstrap.

PR-URL: https://github.com/nodejs/node/pull/25821
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-02-02 05:42:48 +08:00
Joyee Cheung
c2359bdad6
process: expose process.features.inspector
Instead of using process.config.variables.v8_enable_inspector
to detect whether inspector is enabled in the build.

PR-URL: https://github.com/nodejs/node/pull/25819
Refs: https://github.com/nodejs/node/issues/25343
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-02 05:41:45 +08:00
Joyee Cheung
39d922123c
lib: save primordials during bootstrap and use it in builtins
This patches changes the `safe_globals` internal module into a
script that gets run during bootstrap and saves JavaScript builtins
(primordials) into an object that is available for all other builtin
modules to access lexically later.

PR-URL: https://github.com/nodejs/node/pull/25816
Refs: https://github.com/nodejs/node/issues/18795
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
2019-02-02 05:40:47 +08:00
Ali Ijaz Sheikh
1d996f58af src: properly configure default heap limits
Unless configured, V8 defaults to limiting the max heaps size to 700 MB
or 1400MB on 32 and 64-bit platforms respectively. This default is
based on the browser use-cases and doesn't make a lot of sense
generally. This change properly configures the heap size based on
actual available memory.

PR-URL: https://github.com/nodejs/node/pull/25576
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-02-01 13:18:13 -08:00
Richard Lau
d0d84b009c report: separate release metadata
Report release metadata separately from `componentVersions`.
Test `componentVersions` and `release` values in the report.

PR-URL: https://github.com/nodejs/node/pull/25826
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-02-01 14:30:45 -05:00
Anna Henningsen
393c196605
worker: refactor thread id management
- Assign thread IDs to `Environment` instances, rather than Workers.
  This is more embedder-friendly than the current system, in which
  all “main threads” (if there are multiple ones) would get the
  id `0`.
- Because that means that `isMainThread === (threadId === 0)` no longer
  holds, refactor `isMainThread` into a separate entity. Implement it
  in a way that allows for future extensibility, because we use
  `isMainThread` in multiple different ways (determining whether there
  is a parent thread; determining whether the current thread has control
  of the current process; etc.).

PR-URL: https://github.com/nodejs/node/pull/25796
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2019-02-01 20:22:33 +01:00
Albert Still
bcf2886a84 http: return HTTP 431 on HPE_HEADER_OVERFLOW error
Instead of returning a generic 400 response when the
max header size is reached, return a 431 Request Header
Fields Too Large.

This is a semver-major because it changes the HTTP
status code for requests that trigger the header
overflow error.

PR-URL: https://github.com/nodejs/node/pull/25605
Fixes: https://github.com/nodejs/node/issues/25528
Refs: https://tools.ietf.org/html/rfc6585#section-5

Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-01 19:48:23 +01:00
Benjamin Coe
a861adde3b
test: allow coverage threshold to be enforced
If COV_ENFORCE_THRESHOLD is set, tests run in coverage mode will
exit with an error, if line coverage is below the percentage
threshold.

PR-URL: https://github.com/nodejs/node/pull/25675
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-02-01 10:20:40 -08:00
Anna Henningsen
0ff0af534e
worker: throw for duplicates in transfer list
Throw a `DataCloneError` exception when encountering duplicate
`ArrayBuffer`s or `MessagePort`s in the transfer list.

Fixes: https://github.com/nodejs/node/issues/25786

PR-URL: https://github.com/nodejs/node/pull/25815
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-02-01 16:09:22 +01:00
Yang Guo
7c8ac5a01b deps: cherry-pick c736883 from upstream V8
Original commit message:

    Optionally use halfsiphash for integer hashing.

    Change-Id: Ibd14f7b3fe78635675c76ae864112e3a3a7bc701
    Reviewed-on: https://chromium-review.googlesource.com/c/1382463
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#58674}

Refs: c736883ed4
2019-02-01 15:09:33 +01:00
Daniel Bevenius
f4510c4148 test, tools: suppress addon function cast warnings
Currently, there are a number of compiler warnings generated when
building the addons on Linux, for example:

make[1]: Entering directory '/node/test/addons/zlib-binding/build'
  CXX(target) Release/obj.target/binding/binding.o
  SOLINK_MODULE(target) Release/obj.target/binding.node
  COPY Release/binding.node
make[1]: Leaving directory '/node/test/addons/zlib-binding/build'
In file included from ../binding.cc:1:
/node/src/node.h:515:51: warning:
cast between incompatible function types from
'void (*)(v8::Local<v8::Object>,
          v8::Local<v8::Value>,
          v8::Local<v8::Context>)' to
'node::addon_context_register_func' {aka
'void (*)(v8::Local<v8::Object>,
          v8::Local<v8::Value>,
          v8::Local<v8::Context>,
          void*)'} [-Wcast-function-type]
(node::addon_context_register_func) (regfunc), \
					   ^
/node/src/node.h:533:3:
note: in expansion of macro 'NODE_MODULE_CONTEXT_AWARE_X'
   NODE_MODULE_CONTEXT_AWARE_X(modname, regfunc, NULL, 0)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../binding.cc:58:1:
note: in expansion of macro 'NODE_MODULE_CONTEXT_AWARE'
 NODE_MODULE_CONTEXT_AWARE(NODE_GYP_MODULE_NAME, Initialize)
 ^~~~~~~~~~~~~~~~~~~~~~~~~

This commit adds the flag -Wno-cast-function-type to suppress these
warnings. With this change the warnings are not displayed anymore and
the output matches that of osx when running
'make -j8 test/addons/.buildstamp'.

PR-URL: https://github.com/nodejs/node/pull/25663
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-02-01 14:08:20 +01:00
David Benjamin
80873ec3c2 crypto: fix public key encoding name in comment
PKCS#8 describes an encoding for private keys, not public keys. Using
the name as a format usually refers to the PrivateKeyInfo structure it
defines. (Or sometimes the EncryptedPrivateKeyInfo variant or the
little-used OneAsymmetricKey extension defined in RFC 5958.) None of
these structures can hold public keys to begin with.

d2i_PUBKEY actually parses the public key analogous format defined in
X.509, SubjectPublicKeyInfo. This function already uses "X.509" to refer
to an entire certificate, so say SubjectPublicKeyInfo in the comment.

(The abbreviation SPKI sometimes refers to SubjectPublicKeyInfo, e.g. in
RFC 7469, but it can also an alternate S-expression-based PKI to X.509,
Simple Public Key Infrastructure. To avoid confusion, stick with the
expanded name.)

PR-URL: https://github.com/nodejs/node/pull/25736
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-01 10:45:20 +01:00
Rich Trott
7c9fba30ef benchmark: refactor benchmark/common.js
Refactor benchmark/common.js to consistently use arrow functions for
anonymous callbacks and trailing commas.

PR-URL: https://github.com/nodejs/node/pull/25805
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-01-31 20:46:54 -08:00
Rich Trott
0fd6e64503 benchmark: refactor _http-benchmarkers.js
Refactor _http-benchmarkers.js:

* The file used a mixture of inline callbacks with the `function`
  keyword and arrow functions. Use arrow functions for consistency.
* The file used a mixture of trailing commas and no trailing commas. Use
  trailing commas for consistency.

PR-URL: https://github.com/nodejs/node/pull/25803
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-01-31 20:45:47 -08:00
Kei Ito
32c7ad6c67 doc: add documentation for request.path
The field has been added in v0.4.0.

PR-URL: https://github.com/nodejs/node/pull/25788
Refs: b09c5889be (diff-1c0f1c434b17b7f8795d44a51a14320aR814)
Refs: 380929ec0c/test/parallel/test-http-client-defaults.js
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-02-01 02:35:34 +02:00
Refael Ackermann
e3c4b670a4 src: workaround MSVC compiler bug
PR-URL: https://github.com/nodejs/node/pull/25596
Fixes: https://github.com/nodejs/node/issues/25593
Refs: https://developercommunity.visualstudio.com/content/problem/432157/dynamic-initializers-out-of-order.html
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-01-31 18:47:08 -05:00
Joyee Cheung
ca9e24e8b4
src: move public C++ APIs into src/api/*.cc
This patch moves most of the public C++ APIs into src/api/*.cc
so that it's easier to tell that we need to be careful about
the compatibility of these code.

Some APIs, like `node::LoadEnvironmet()`, `node::Start()` and
`node::Init()` still stay in `node.cc` because they are still
very specific to our use cases and do not work quite well yet
for embedders anyway - we could not even manage to write cctest for
them at the moment.

PR-URL: https://github.com/nodejs/node/pull/25541
Reviewed-By: Gus Caplan <me@gus.host>
2019-02-01 07:43:27 +08:00
Joyee Cheung
99c3243b22
src: move v8_platform implementation into node_v8_platform-inl.h
So that the v8_platform global variable can be referenced in other
files.

PR-URL: https://github.com/nodejs/node/pull/25541
Reviewed-By: Gus Caplan <me@gus.host>
2019-02-01 07:43:25 +08:00
cjihrig
5d4b085b1b
report: disambiguate glibc versions
- Give the glibc version entries more specific names.
- Group all of the glibc version reporting together.

PR-URL: https://github.com/nodejs/node/pull/25781
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-31 13:27:52 -05:00
cjihrig
973c223429
report: fix typo in error message
PR-URL: https://github.com/nodejs/node/pull/25782
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-31 13:00:24 -05:00
Joyee Cheung
d9066bef2c
test: run html/webappapis/timers WPT
PR-URL: https://github.com/nodejs/node/pull/25618
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-01 00:52:00 +08:00
Joyee Cheung
476531ba42
test: pull html/webappapis/timers WPT
Using

```
git node wpt html/webappapis/timers
```

PR-URL: https://github.com/nodejs/node/pull/25618
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-01 00:51:58 +08:00
Luigi Pinca
4b6e4c1eb1 http: make timeout event work with agent timeout
The `'timeout'` event is currently not emitted on the `ClientRequest`
instance when the socket timeout expires if only the `timeout` option
of the agent is set. This happens because, under these circumstances,
`listenSocketTimeout()` is not called.

This commit fixes the issue by calling it also when only the agent
`timeout` option is set.

PR-URL: https://github.com/nodejs/node/pull/25488
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-31 11:51:25 +01:00
Anna Henningsen
16362cb868 src: make StreamPipe::Unpipe() more resilient
Clean up `StreamPipe::Unpipe()` to be more resilient against
unexpected exceptions, in particular while executing its
`MakeCallback()` line (which can fail in the presence of
termination exceptions), and clean up the getter/setter part
of the code to match that pattern as well (even though it should
not fail as part of regular operations).

PR-URL: https://github.com/nodejs/node/pull/25716
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-01-31 08:09:38 +01:00
gengjiawen
0dfd5a55d6 src: make deleted functions public in node.h
Signed-off-by: gengjiawen <technicalcute@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/25764
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-01-31 07:58:01 +01:00
Rich Trott
43bba40717 doc: remove outdated COLLABORATOR_GUIDE sentence about breaking changes
The TSC has delegated authority over LTS and Current branches to the
Release WG. Remove the bullet point about TSC having authority to
determine that a breaking change is necessary on LTS and Current release
branches. Retaining that authority would require de-chartering the
Release WG.

Fixes: https://github.com/nodejs/TSC/issues/660

PR-URL: https://github.com/nodejs/node/pull/25780
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2019-01-30 21:44:59 -08:00
Rich Trott
6ab0d56a59 doc: revise inspect security info in cli.md
Revise inspect security information in cli.md.

* Reword sentence for brevity.
* Use bulleted list for clarity of options.
* Eliminate personal pronoun (_you_) per style guide.

PR-URL: https://github.com/nodejs/node/pull/25779
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@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>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-01-30 21:35:10 -08:00
Rich Trott
d34671ab79 doc: revise style guide
Use italics for words-as-words within style guide. Other minor
improvements.

PR-URL: https://github.com/nodejs/node/pull/25778
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-30 21:33:15 -08:00
cjihrig
dc1d331403
process: simplify report uncaught exception logic
This commit combines two if statements into a single if
statement. Another if statement is replaced with a ternary.

PR-URL: https://github.com/nodejs/node/pull/25744
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-01-30 19:43:45 -05:00
Refael Ackermann
4d193008d7 tools: refloat Node.js patches to cpplint.py
* Preserve 3 node-core checks
* Preserve patch to `FileInfo.RepositoryName`
* Remove TAP to logfile (unused)

PR-URL: https://github.com/nodejs/node/pull/25771
Fixes: https://github.com/nodejs/node/issues/25760
Refs: 3d8f6f876d/cpplint.py
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-01-30 18:19:52 -05:00
Refael Ackermann
3dca9e0a57 tools: bump cpplint.py to 3d8f6f876d
PR-URL: https://github.com/nodejs/node/pull/25771
Fixes: https://github.com/nodejs/node/issues/25760
Refs: 3d8f6f876d/cpplint.py
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-01-30 18:19:45 -05:00
Anna Henningsen
de2bdfbc6f
src: simplify SlicedArguments
Re-use the existing `MaybeStackBuffer` logic for `SlicedArguments`.

PR-URL: https://github.com/nodejs/node/pull/25745
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-01-31 00:14:51 +01:00
cclauss
bb564a3688
build: update prerequisites on progress towards Python 3
As recommended at https://github.com/nodejs/node/pull/25759#issuecomment-458139766
* Python 2.6 end of life statement in 2013: https://www.python.org/dev/peps/pep-0361/#release-lifespan
* Python 2.7 end of life statement in 2019: https://www.python.org/dev/peps/pep-0373/#update
* Python 3.4 reaches it end of life in < 50 days so it should not be a target: https://devguide.python.org/#branchstatus

PR-URL: https://github.com/nodejs/node/pull/25766
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-01-31 00:13:58 +01:00
Daniel Bevenius
756b0acce0
src: fix indentation in a few node_http2 enums
PR-URL: https://github.com/nodejs/node/pull/25761
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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: Anna Henningsen <anna@addaleax.net>
2019-01-31 00:12:28 +01:00
Anna Henningsen
15b0ab1651
src: add debug check for inspector uv_async_t
Add a check to make sure start_io_thread_async is not
accidentally re-used or used when uninitialized.
(This is a bit of an odd check imo, but it helped me figure
out a real issue and it might do so again, so… why not?)

PR-URL: https://github.com/nodejs/node/pull/25777
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-30 23:56:25 +01:00
Anna Henningsen
006aa632c6
src: add handle scope to OnFatalError()
For the report generation, we use `Environment::GetCurrent(isolate)`
which uses `isolate->GetCurrentContext()` under the hood, thus
allocates a handle. Without a `HandleScope`, this is invalid.

This might not strictly be allowed inside of `OnFatalError()`,
but it won’t make anything worse either.

PR-URL: https://github.com/nodejs/node/pull/25775
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-30 23:44:09 +01:00
Anna Henningsen
6f217e7ce5
src: turn ROUND_UP into an inline function
PR-URL: https://github.com/nodejs/node/pull/25743
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2019-01-30 23:40:37 +01:00
Anna Henningsen
23d51a1f08
report: use consistent format for dumpEventTime
Use the same JS-compatible format on both POSIX and Windows.

PR-URL: https://github.com/nodejs/node/pull/25751
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-01-30 23:39:23 +01:00
Michaël Zasso
9e08386e61
2019-01-30, Version 11.9.0 (Current)
Notable changes:

* deps:
  * OpenSSL has been updated to 1.1.1a, which is API/ABI compatible with
    the previous OpenSSL 1.1.0j. Note that while OpenSSL 1.1.1a supports
    TLS1.3, Node.js still does not.
    https://github.com/nodejs/node/pull/25582

PR-URL: https://github.com/nodejs/node/pull/25802
2019-01-30 23:06:17 +01:00
cjihrig
c2335465c3
report: split up osVersion and machine values
Prior to this commit, on non-Windows platforms, the "osVersion"
value was prepended to the "machine" value.

PR-URL: https://github.com/nodejs/node/pull/25755
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-01-30 16:39:44 -05:00
cjihrig
5aa89d616f
lib: refactor ERR_SYNTHETIC
- Tidy up description in docs.
- Remove a second definition in the docs.
- Remove unused string input parameter.
- Remove duplicate "JavaScript Callstack" in error messages.

PR-URL: https://github.com/nodejs/node/pull/25749
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-01-30 15:52:46 -05:00
Eugene Ostroukhov
80a18cac8b inspector, trace_events: make sure messages are sent on a main thread
Fixes: https://github.com/nodejs/node/issues/23185
PR-URL: https://github.com/nodejs/node/pull/24814
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-30 11:48:42 -08:00
cjihrig
c64b1aef07
test: refactor test/common/report.js
- Don't unnecessarily require('../common').
- Eliminate state maintained in tmppath.
- validate() was being used synchronously, but was actually
  asynchronous. Make it synchronous.
- Other misc. drive by cleanup.

PR-URL: https://github.com/nodejs/node/pull/25754
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-01-30 13:16:57 -05:00
Anna Henningsen
7fa5157497
module: do not use process.exit()
Inside workers, using stdio is always asynchronous, so using
`process.exit()` always interrupts sending of messages to the
parent thread, including error messages presented over stdio.

Do not use `process.exit()` and instead trigger a “real”
uncaught exception.

PR-URL: https://github.com/nodejs/node/pull/25769
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-30 18:17:26 +01:00