cjihrig
a382b52fd8
test: consolidate triggerReport() tests
...
PR-URL: https://github.com/nodejs/node/pull/26268
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-01 10:26:56 +01:00
cjihrig
8e2cc5e440
report: refactor triggerReport()
...
This commit fixes the triggerReport() argument validation. The
existing test is also updated, as it was not passing the Error
object to triggerReport().
PR-URL: https://github.com/nodejs/node/pull/26268
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-01 10:26:56 +01:00
cjihrig
b0c310dcf0
inspector: return Error objects on error
...
The inspector communicates errors via POJOs. This commit
wraps the error information in an actual Error object.
PR-URL: https://github.com/nodejs/node/pull/26255
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-01 10:26:24 +01:00
cjihrig
0034820f67
errors: add ERR_INSPECTOR_COMMAND error
...
This error is used to propagate errors returned from the
inspector module's command system.
PR-URL: https://github.com/nodejs/node/pull/26255
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-01 10:26:24 +01:00
cjihrig
001785520a
url: handle quasi-WHATWG URLs in urlToOptions()
...
PR-URL: https://github.com/nodejs/node/pull/26226
Refs: https://github.com/nodejs/node/issues/26198
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-01 10:26:23 +01:00
Rich Trott
0080350f1a
tools: update markdown linter
...
Update remark-preset-lint-node to 1.4.0. This adds `End-Of-Life` as a
prohibited string, favoring `End-of-Life` for consistency.
Refs: https://github.com/nodejs/node/pull/26251
PR-URL: https://github.com/nodejs/node/pull/26281
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-03-01 10:26:22 +01:00
Minwoo Jung
ff57a1c321
doc: clarify http.ClientRequest path description
...
Clarify `http.ClientRequest` path description.
Fixes: https://github.com/nodejs/node/issues/25864
PR-URL: https://github.com/nodejs/node/pull/26259
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-03-01 10:26:22 +01:00
Anna Henningsen
3c11b4eec2
src: allocate Buffer memory using ArrayBuffer allocator
...
Always use the right allocator for memory that is turned into
an `ArrayBuffer` at a later point.
This enables embedders to use their own `ArrayBuffer::Allocator`s,
and is inspired by Electron’s electron/node@f61bae3440 . It should
render their downstream patch unnecessary.
Refs: https://github.com/electron/node/commit/f61bae3440e1bfcc83bba6ff0785adfb89b4045e
PR-URL: https://github.com/nodejs/node/pull/26207
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/26302
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-01 10:24:47 +01:00
Anna Henningsen
282607644b
src: add allocation utils to env
...
Add a RAII utility for managing blocks of memory that have
been allocated with the `ArrayBuffer::Allocator` for a given
`Isolate`.
PR-URL: https://github.com/nodejs/node/pull/26207
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/26302
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-01 10:24:44 +01:00
Anna Henningsen
238fa5704b
src: add debugging array allocator
...
Add a subclass of `ArrayBufferAllocator` that performs additional
debug checking, which in particular verifies that:
- All `ArrayBuffer` backing stores have been allocated with this
allocator, or have been explicitly marked as coming from a
compatible source.
- All memory allocated by the allocator has been freed once it is
destroyed.
PR-URL: https://github.com/nodejs/node/pull/26207
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/26302
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-01 10:24:39 +01:00
Anna Henningsen
20dc172011
worker: copy transferList ArrayBuffers on unknown allocator
...
If the `ArrayBuffer::Allocator` used to create `ArrayBuffer`s
in the current `Isolate` is not a Node.js `ArrayBufferAllocator`,
we cannot know that it is `malloc()`-based, an in particular it might
not be compatible with the `ArrayBuffer::Allocator` on the receiving
end of the connection.
PR-URL: https://github.com/nodejs/node/pull/26207
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/26302
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-01 10:24:35 +01:00
Anna Henningsen
437bb25d92
src: make IsolateData store ArrayBufferAllocator
...
This enables us to identify whether we are using an
allocator that we know more about than what the generic
`ArrayBuffer::Allocator` API provides, in particular
whether it is `malloc()`-compatible.
PR-URL: https://github.com/nodejs/node/pull/26207
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/26302
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-01 10:24:32 +01:00
Anna Henningsen
7f08e0238a
deps: V8: cherry-pick d3308d0
...
Original commit message:
[api] Add `Isolate::GetArrayBufferAllocator()`
This allows non-monolithic embedders to always allocate memory
for ArrayBuffer instances using the right allocation method.
This is based on a patch that Electron is currently using.
Refs: https://github.com/electron/electron/blob/1898f9162073910c05958295c612deec6121a892/patches/common/v8/array_buffer.patch
Change-Id: I39a614343118a0594aab48699a99cc2aad5b7ba9
Reviewed-on: https://chromium-review.googlesource.com/c/1462003
Reviewed-by: Yang Guo <yangguo@chromium.org >
Commit-Queue: Yang Guo <yangguo@chromium.org >
Cr-Commit-Position: refs/heads/master@{#59697}
Refs: https://github.com/v8/v8/commit/d3308d042c9637958491333831c33335ab9fc734
PR-URL: https://github.com/nodejs/node/pull/26207
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/26302
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-01 10:24:23 +01:00
Daniel Bevenius
68accb5b04
src: use smart pointer in UDPWrap::OnSend
...
PR-URL: https://github.com/nodejs/node/pull/26233
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:38 +11:00
Joyee Cheung
d91520724c
process: use common operations to define browser globals
...
Extracts:
- `exposeNamespace`: https://heycam.github.io/webidl/#es-namespaces
- `exposeInterface`: https://heycam.github.io/webidl/#es-interfaces
- `defineOperation`: https://heycam.github.io/webidl/#define-the-operations
into functions to define browser globals.
PR-URL: https://github.com/nodejs/node/pull/26230
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-02-28 23:35:38 +11:00
Rich Trott and Anna Henningsen
7e7023373a
worker: serialize errors if stack getter throws
...
Current code that is intended to handle the stack getter throwing is
untested. Add a test and adjust code to function as expected.
Co-authored-by: Anna Henningsen <anna@addaleax.net >
PR-URL: https://github.com/nodejs/node/pull/26145
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-02-28 23:35:37 +11:00
Joyee Cheung
b1e739d881
process: move initialization of node-report into pre_execution.js
...
- Splits signal handler setup code into two functions: one sets up
`process.on('SIGNAL_NAME')`, another takes care of the signal
triggers of node-report. Both should only happen on the main thread.
The latter needs to happen after the node-report configurations
are read into the process.
- Move the initialization of node-report into pre_execution.js
because it depends on CLI/environment settings.
PR-URL: https://github.com/nodejs/node/pull/26227
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-02-28 23:35:37 +11:00
Joyee Cheung
57179a0aab
process: setup signal handler in prepareMainThreadExecution
...
Because this is only necessary in the main thread.
Also removes the rearming of signal events since no
signal event handlers should be created during the execution
of node.js now that we've made the creation of stdout and stderr
streams lazy - this has been demonstrated in the test coverage.
PR-URL: https://github.com/nodejs/node/pull/26227
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-02-28 23:35:37 +11:00
Tobias Nießen
1333dccede
crypto: fix unencrypted DER PKCS8 parsing
...
The previously used OpenSSL call only supports encrypted PKCS8,
this commit adds support for unencrypted PKCS8.
PR-URL: https://github.com/nodejs/node/pull/26236
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-02-28 23:35:37 +11:00
Tobias Nießen
70e463c294
crypto: fix error condition in Verify::VerifyFinal
...
Fail early if key parsing failed, don't try to construct a context out
of it.
PR-URL: https://github.com/nodejs/node/pull/26238
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2019-02-28 23:35:37 +11:00
Anna Henningsen
a9a2c5869c
worker: improve integration with native addons
...
Allow loading add-ons from multiple Node.js instances if they are
declared context-aware; in particular, this applies to N-API addons.
Also, plug a memory leak that occurred when registering N-API addons.
Refs: https://github.com/nodejs/node/pull/23319
PR-URL: https://github.com/nodejs/node/pull/26175
Fixes: https://github.com/nodejs/node/issues/21481
Fixes: https://github.com/nodejs/node/issues/21783
Fixes: https://github.com/nodejs/node/issues/25662
Fixes: https://github.com/nodejs/node/issues/20239
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-02-28 23:35:37 +11:00
cjihrig
6f9a764b52
test: remove node-report/test-api.js
...
There does not appear to be any difference between this test
and test/node-report/test-api-nohooks.js.
PR-URL: https://github.com/nodejs/node/pull/26219
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2019-02-28 23:35:37 +11:00
cjihrig
bc114152d0
test: simplify test-api-nohooks.js
...
PR-URL: https://github.com/nodejs/node/pull/26217
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:37 +11:00
Richard Lau
dbbcedae6d
build: tidy up comments in create_expfile.sh
...
Fixes spelling, adds punctuation and rewords some sentences for
readability in the comments of `tools/create_expfile.sh`.
PR-URL: https://github.com/nodejs/node/pull/26220
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:37 +11:00
gengjiawen
3abdcfc813
src: remove unimplemented method in class StreamPipe
...
PR-URL: https://github.com/nodejs/node/pull/26202
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:37 +11:00
Rich Trott
ca18525896
test: improve performance of test-crypto-timing-safe-equal-benchmarks
...
Using `eval()` rather than `require()`'ing a fixture and deleting it
from the cache results in a roughtly 10x improvement in running time.
Fixes: https://github.com/nodejs/node/issues/25984
Refs: https://github.com/nodejs/node/issues/26229
PR-URL: https://github.com/nodejs/node/pull/26237
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yang Guo <yangguo@chromium.org >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-02-28 23:35:37 +11:00
Anna Henningsen
7e26ca6750
src: simplify AliasedBuffer lifetime management
...
Rely on the V8 garbage collector to take care of managing
the lifetime of the underlying memory of an `AliasedBuffer`.
PR-URL: https://github.com/nodejs/node/pull/26196
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:37 +11:00
Ruben Bridgewater
4bf58ac13d
util: update set iterator entries inspection
...
The inspection output for Set#entries() was wrong so far as it did
not return an array as it should have. That was a bug in V8 that is
now fixed and the code in Node.js has to be updated accordingly.
PR-URL: https://github.com/nodejs/node/pull/25941
Fixes: https://github.com/nodejs/node/issues/24629
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-02-28 23:35:37 +11:00
Ruben Bridgewater
206e4b043b
deps: V8: backport 74571c8
...
Original commit message:
Fix preview of set entries
Set entries return an array with the value as first and second entry.
As such these are considered key value pairs to align with maps
entries iterator.
So far the return value was identical to the values iterator and that
is misleading.
This also adds tests to verify the results and improves the coverage
a tiny bit by testing different iterators.
Refs: https://github.com/nodejs/node/issues/24629
R=yangguo@chromium.org
Change-Id: I669a724bb4afaf5a713e468b1f51691d22c25253
Reviewed-on: https://chromium-review.googlesource.com/c/1350790
Commit-Queue: Yang Guo <yangguo@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
Reviewed-by: Jakob Gruber <jgruber@chromium.org >
Reviewed-by: Yang Guo <yangguo@chromium.org >
Cr-Commit-Position: refs/heads/master@{#59311}
Refs: https://github.com/v8/v8/commit/74571c80a945f2bdf4094a090410ae02b9a69af6
PR-URL: https://github.com/nodejs/node/pull/25941
Fixes: https://github.com/nodejs/node/issues/24629
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-02-28 23:35:37 +11:00
Gireesh Punathil
831aa9acb6
src: make node::SignalWrap::OnSignal into lambda
...
PR-URL: https://github.com/nodejs/node/pull/26184
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-02-28 23:35:36 +11:00
Anna Henningsen
8a551b9d3b
http2: shrink memory to match read data
...
Perform a shrinking `Realloc()` so that less data is
used for HTTP2 reads.
PR-URL: https://github.com/nodejs/node/pull/26201
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-02-28 23:35:36 +11:00
Gireesh Punathil
619b5e7c2e
src: simplify loop arithmetic in GetCPUInfo
...
Cache the repeated operations and reuse; potentially generating
efficient code in some platforms, and improving readability.
PR-URL: https://github.com/nodejs/node/pull/26183
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:36 +11:00
Ben Noordhuis
ddd71f4a92
src: move function from header to source file
...
This particular Buffer::New() overload used to live in node_internals.h
to work around a cyclic header dependency (IIRC) but that is no longer
necessary.
PR-URL: https://github.com/nodejs/node/pull/26173
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-02-28 23:35:36 +11:00
Rich Trott
5e44768e9f
doc: revise deprecation level explanations in Collaborator Guide
...
Revise deprecation level explanations for scanability and ease of
understanding.
PR-URL: https://github.com/nodejs/node/pull/26197
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:36 +11:00
Ben Noordhuis
108c698f44
crypto: make ConvertKey clear openssl error stack
...
Failed ConvertKey() operations should not leave errors on OpenSSL's
error stack because that's observable by subsequent cryptographic
operations. More to the point, it makes said operations fail with
an unrelated error.
PR-URL: https://github.com/nodejs/node/pull/26153
Fixes: https://github.com/nodejs/node/issues/26133
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:36 +11:00
Daniel Bevenius
a3f7471d35
build,test: guard eslint with crypto check
...
Currently, configuring --without-ssl will cause the lint-js target to
fail with the following error:
$ make lint-js
Running JS linter...
internal/util.js:101
throw new ERR_NO_CRYPTO();
^
Error [ERR_NO_CRYPTO]:
Node.js is not compiled with OpenSSL crypto support
at assertCrypto (internal/util.js:101:11)
at crypto.js:31:1
...
(/node/tools/node_modules/eslint/node_modules/file-entry-cache/
cache.js:2:14)
at Module._compile (internal/modules/cjs/loader.js:746:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:757:10)
make: *** [lint-js] Error 1
There are also a number of tests that are affected in a similar way.
This commit adds crypto checks to allow for lint-js and the affected
tests to be skipped when configured --without-ssl.
PR-URL: https://github.com/nodejs/node/pull/26182
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-02-28 23:35:36 +11:00
Joyee Cheung
28758b8d69
test: add test for dynamically enabling node.async_hooks tracing
...
PR-URL: https://github.com/nodejs/node/pull/26062
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:36 +11:00
Joyee Cheung
dcbd907142
test: add test for node.async_hooks tracing in workers
...
PR-URL: https://github.com/nodejs/node/pull/26062
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:36 +11:00
Joyee Cheung
966546ceaa
process: simplify the setup of async hooks trace events
...
- Remove `trace_category_state` from `Environment` - since this is
only accessed in the bootstrap process and later in the
trace category update handler, we could just pass the initial
values into JS land via the trace_events binding, and pass
the dynamic values directly to the handler later, instead of
accessing them out-of-band via the AliasedBuffer.
- Instead of creating the hooks directly in
`trace_events_async_hooks.js`, export the hook factory and
create the hooks in trace category state toggle.
PR-URL: https://github.com/nodejs/node/pull/26062
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:36 +11:00
Joyee Cheung
5cc2574fac
src: move async hooks trace events setup to pre_execution.js
...
Reasons:
- Moves more environment-dependent setup out of bootstrap/node.js
- No async operations should be done before the call to
the setup functions in pre_execution.js so no async hooks should be
triggered before that. Therefore it is safe to delay the setup
until then.
PR-URL: https://github.com/nodejs/node/pull/26062
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:36 +11:00
Jon Kunkee
f0a81664c7
deps: backport ICU fix for ARM64 Windows
...
ICU 63 as ingested by Node.js does not quite support ARM64 Windows
because its OBJ file IMAGE_FILE_MACHINE_TYPE field logic defaults to
x86 instead of Unknown. This change backports the ICU 64.1 fix for
this.
ICU Issue: https://unicode-org.atlassian.net/browse/ICU-20382
ICU Commit: unicode-org/icu@11e538b
PR-URL: https://github.com/nodejs/node/pull/26090
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:36 +11:00
cjihrig
8a40468635
report: remove verbose setting
...
This commit removes the --diagnostic-report-verbose CLI option
and all associated logic. The flag is currently only used in one
place, and only reflects the settings at startup. Additionally,
Node tends to use the NODE_DEBUG mechanism for adding verbose
output.
PR-URL: https://github.com/nodejs/node/pull/26195
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-02-28 23:35:35 +11:00
cjihrig
0e89d7add6
report: simplify OnFatalError() handling
...
PR-URL: https://github.com/nodejs/node/pull/26191
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-02-28 23:35:35 +11:00
cjihrig
dff0149d57
tools: update ESLint to 5.14.1
...
Update ESLint to 5.14.1
PR-URL: https://github.com/nodejs/node/pull/26190
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-02-28 23:35:35 +11:00
Anna Henningsen
fbf6dd558a
test,inspector: add heap allocation tracker test
...
This provides coverage for the `InspectorTimer` instances
created as part of heap allocation tracking.
PR-URL: https://github.com/nodejs/node/pull/26089
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:35 +11:00
Anna Henningsen
8881c0baaa
src: simplify InspectorConsoleCall
...
Instead of a JS object, set the is-in-console-call flag as
a boolean in C++.
PR-URL: https://github.com/nodejs/node/pull/26168
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
2019-02-28 23:35:35 +11:00
Anna Henningsen
c6d5af53be
src: move req_wrap_queue to base class of ReqWrap
...
Introduce a second base class for `ReqWrap` that does not
depend on a template parameter and move the `req_wrap_queue_`
field to it.
This addresses undefined behaviour that occurs when casting
to `ReqWrap<uv_req_t>` in the `ReqWrap` constructor.
Refs: https://github.com/nodejs/node/issues/26131
PR-URL: https://github.com/nodejs/node/pull/26148
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:35 +11:00
Anna Henningsen
007b2fa198
test: increase run time in test-worker-prof
...
This test has occasionally been failing on Windows since it
was added, with 6 instead of 15 ticks being seen.
Increasing the duration of the test should make it more reliable.
PR-URL: https://github.com/nodejs/node/pull/26172
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-02-28 23:35:35 +11:00
Joyee Cheung
a39cd45ce8
src: remove process.binding('config').fipsForced
...
Instead use `require('internal/options').getOptionValue` to
query to value of `--force-fips`.
PR-URL: https://github.com/nodejs/node/pull/26178
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:35 +11:00
cjihrig
633c1eac29
report: simplify TriggerNodeReport()
...
PR-URL: https://github.com/nodejs/node/pull/26174
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-28 23:35:35 +11:00