Joyee Cheung
34470b0524
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-24 23:41:27 +01:00
Tobias Nießen
7e0ddf66b9
doc: fix deprecation "End-of-Life" capitalization
...
PR-URL: https://github.com/nodejs/node/pull/26251
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@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-02-23 15:15:20 -08:00
Tobias Nießen
8d69fdde19
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-23 13:53:58 +01:00
Tobias Nießen
10c3db3da6
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-23 13:48:41 +01:00
Anna Henningsen
8ebd339031
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-22 21:42:09 +01:00
cjihrig
455b927be0
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-22 13:45:16 -05:00
cjihrig
fac40db36e
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-22 13:42:02 -05:00
cjihrig
a1d05e49fe
timers: support name in validateTimerDuration()
...
Allow passing a name to validateTimerDuration() so that error
messages can reflect the name of the thing being validated.
PR-URL: https://github.com/nodejs/node/pull/26215
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-22 13:39:21 -05:00
Richard Lau
4804a18812
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-22 12:42:32 -05:00
Tobias Nießen
3d4db3a7bf
doc: fix metadata of DEP0114
...
PR-URL: https://github.com/nodejs/node/pull/26250
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2019-02-22 11:43:23 +01:00
gengjiawen
3d2e862e52
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-22 05:39:36 +01:00
Ben Noordhuis
9334e45aa0
build: remove mips support
...
Upstream V8 is dropping support for mips/mipsel/mips64/mips64el.
This commit removes the build flags from the configure script
and some loose ends from the documentation.
PR-URL: https://github.com/nodejs/node/pull/26192
Fixes: https://github.com/nodejs/node/issues/26179
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Yang Guo <yangguo@chromium.org >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-22 05:29:25 +01:00
Rich Trott
eb9e6c0157
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-21 20:22:48 -08:00
Anna Henningsen
d1011f6bbf
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-21 22:22:04 +01:00
ZYSzys
6fb7baf935
buffer: harden validation of buffer allocation size
...
This makes using `NaN` as the buffer size throw an error.
Fixes: https://github.com/nodejs/node/issues/26151
PR-URL: https://github.com/nodejs/node/pull/26162
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-02-21 22:08:53 +01:00
Gireesh Punathil
dbfe14c809
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-21 20:25:57 +05:30
Anna Henningsen
83e1b97443
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-21 15:39:18 +01:00
Gireesh Punathil
e51da1fcad
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-21 08:45:40 +01:00
Ben Noordhuis
24f3f11606
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-21 07:23:30 +01:00
Rich Trott
70b13c28c9
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-20 22:06:47 -08:00
Ben Noordhuis
042e2640e6
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-21 05:51:32 +01:00
Daniel Bevenius
f17f467544
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-21 05:35:12 +01:00
Joyee Cheung
85df2c4703
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-21 10:47:31 +08:00
Joyee Cheung
908e114750
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-21 10:47:29 +08:00
Joyee Cheung
c435f069eb
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-21 10:47:28 +08:00
Joyee Cheung
435eea6400
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-21 10:47:24 +08:00
Jon Kunkee
dec3dadd32
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-20 19:32:32 -05:00
cjihrig
823c988b48
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-20 15:15:57 -05:00
cjihrig
11a8a940d7
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-20 15:13:09 -05:00
Ruben Bridgewater
3d62d0c480
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-20 18:33:10 +01:00
Ruben Bridgewater
e557647470
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-20 18:33:09 +01:00
cjihrig
14c089b50e
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-20 12:25:10 -05:00
Anna Henningsen
cfcbfc0011
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-20 16:55:29 +01:00
Anna Henningsen
a34a84d281
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-20 16:54:39 +01:00
Anna Henningsen
49a2e40632
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-20 16:49:02 +01:00
Anna Henningsen
fab0668123
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-20 16:46:33 +01:00
Joyee Cheung
7fc6e62531
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-20 23:42:11 +08:00
cjihrig
1dc22bf3e5
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-20 08:43:59 -05:00
cjihrig
1aadfa8700
test: simplify test-api-getreport.js
...
PR-URL: https://github.com/nodejs/node/pull/26169
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-20 08:40:14 -05:00
Anna Henningsen
7b198935d6
src: only call .ReThrow() if not terminating
...
Otherwise, it looks like a `null` exception is being thrown.
PR-URL: https://github.com/nodejs/node/pull/26130
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-02-20 05:33:04 +01:00
Rich Trott
d2c29bda50
test: remove unnecessary default tmpdir value in test
...
`tmpdir.path` will never be falsy so there is no need to guard against
that.
PR-URL: https://github.com/nodejs/node/pull/26177
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
2019-02-19 19:18:05 -08:00
Rich Trott
e4a3664fe9
doc: revise Style Guide
...
Most important change here is to point people to the YAML material in
the docs rather than the previous way we indicated versions that
introduced or deprecated APIs.
Remove contents about assets as we do not actually have any in the docs.
Otherwise, a bunch of stylistic changes, mostly to keep things concise
and direct.
PR-URL: https://github.com/nodejs/node/pull/26176
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
2019-02-19 19:17:12 -08:00
Joyee Cheung
5c9b37bb48
process: move test-process-uptime to parallel
...
In addition, do not make too many assumptions about the startup
time and timer latency in test-process-uptime. Instead only test
that the value is likely in the correct unit (seconds) and it should
be increasing in subsequent calls.
PR-URL: https://github.com/nodejs/node/pull/26206
Fixes: https://github.com/nodejs/node/issues/26205
Refs: https://github.com/nodejs/node/pull/26016
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-02-19 13:29:31 -08:00
Joyee Cheung
a32c574536
process: fix calculation in process.uptime()
...
In https://github.com/nodejs/node/pull/26016 the result returned
by process.uptime() was mistakenly set to be based in the wrong
unit. This patch fixes the calculation and makes sure the returned
value is in seconds.
Refs: https://github.com/nodejs/node/pull/26016
PR-URL: https://github.com/nodejs/node/pull/26206
Fixes: https://github.com/nodejs/node/issues/26205
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-02-19 13:29:26 -08:00
Uttam Pawar
129516dfa2
src: add missing includes for vtune build
...
`v8-vtune.h` must be included in order to be able to build with vtune
support.
PR-URL: https://github.com/nodejs/node/pull/26136
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-02-19 11:52:48 -08:00
Anna Henningsen
1c71c0cb9a
tracing: use ‘real’ atomics
...
Use actual atomic operations instead of things that are
named as if they were atomics, but aren’t.
Refs: https://github.com/nodejs/node/issues/26100
PR-URL: https://github.com/nodejs/node/pull/26156
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Yang Guo <yangguo@chromium.org >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
2019-02-19 19:52:09 +01:00
Ujjwal Sharma
5f8ccecaa2
module: revert module._compile to original state if module is patched
...
PR-URL: https://github.com/nodejs/node/pull/21573
Fixes: https://github.com/nodejs/node/issues/17396
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-02-19 20:58:37 +05:30
Ujjwal Sharma
d345b0dc12
module: use compileFunction over Module.wrap
...
Use vm.compileFunction (which is a binding for
v8::CompileFunctionInContext) instead of Module.wrap internally in
Module._compile for the cjs loader.
Fixes: https://github.com/nodejs/node/issues/17396
PR-URL: https://github.com/nodejs/node/pull/21573
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-02-19 20:56:24 +05:30
gengjiawen
8375c706ad
src: apply clang-tidy rule performance-unnecessary-value-param
...
PR-URL: https://github.com/nodejs/node/pull/26042
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-19 12:54:41 +01:00
Joyee Cheung
b200a46bef
src: remove process.binding('config').debugOptions
...
`process.binding('config').debugOptions`, which contains the initial
values of parsed debugger-related CLI options, has been used for
internal testing. This patch removes them and uses `internal/options`
to query the values in the tests instead.
PR-URL: https://github.com/nodejs/node/pull/25999
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-19 09:38:20 +01:00