Ruben Bridgewater
68b07ded9c
repl: tab auto complete big arrays
...
Due to a new API it's possible to skip the indices. That allows to
use auto completion with big (typed) arrays.
PR-URL: https://github.com/nodejs/node/pull/22408
Fixes: https://github.com/nodejs/node/issues/21446
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-23 00:10:52 +02:00
Anna Henningsen
29a71bae40
src: refactor options parsing
...
This is a major refactor of our Node’s parser. See `node_options.cc`
for how it is used, and `node_options-inl.h` for the bulk
of its implementation.
Unfortunately, the implementation has come to have some
complexity, in order to meet the following goals:
- Make it easy to *use* for defining or changing options.
- Keep it (mostly) backwards-compatible.
- No tests were harmed as part of this commit.
- Be as consistent as possible.
- In particular, options can now generally accept arguments
through both `--foo=bar` notation and `--foo bar` notation.
We were previously very inconsistent on this point.
- Separate into different levels of scope, namely
per-process (global), per-Isolate and per-Environment
(+ debug options).
- Allow programmatic accessibility in the future.
- This includes a possible expansion for `--help` output.
This commit also leaves a number of `TODO` comments, mostly for
improving consistency even more (possibly with having to modify
tests), improving embedder support, as well as removing pieces of
exposed configuration variables that should never have become
part of the public API but unfortunately are at this point.
PR-URL: https://github.com/nodejs/node/pull/22392
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2018-08-22 23:37:19 +02:00
cjihrig
92880f31da
os: add os.{get,set}Priority()
...
PR-URL: https://github.com/nodejs/node/pull/22407
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-08-22 17:27:16 -04:00
James M Snell
588fb05e78
perf_hooks: move strings to env
...
Move repeatedly created strings to env
PR-URL: https://github.com/nodejs/node/pull/22401
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-21 22:29:08 -07:00
Alexey Kozyatinskiy
b1e26128f3
src: implement v8::Platform::CallDelayedOnWorkerThread
...
This method is crucial for Runtime.evaluate protocol command with
timeout flag. At least Chrome DevTools frontend uses this method for
every execution in console.
PR-URL: https://github.com/nodejs/node/pull/22383
Fixes: https://github.com/nodejs/node/issues/22157
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-20 18:10:00 -07:00
Ruben Bridgewater
3479b1ca82
util,assert: improve performance
...
This significantly improves regular and typed array performance by
not checking the indices keys anymore. This can be done with a V8
API that allows to only retrieve the non indices property keys.
PR-URL: https://github.com/nodejs/node/pull/22197
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-20 02:11:46 +02:00
James M Snell
0bdb95f4cf
src: move process.binding('signal_wrap') to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/22290
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-19 14:18:29 -07:00
James M Snell
884b23daf7
stream: move process.binding('stream_wrap') to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/22345
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-19 12:46:10 -07:00
James M Snell
892932f9bd
v8: move process.binding('v8') to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/22288
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-18 16:27:11 -07:00
James M Snell
1744205ff5
http: move process.binding('http_parser') to internalBinding
...
Refs: https://github.com/nodejs/node/issues/22160
PR-URL: https://github.com/nodejs/node/pull/22329
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-18 13:01:21 -07:00
James M Snell
4fa5448e5d
http2: move process.binding('http2') to internalBinding
...
Refs: https://github.com/nodejs/node/issues/22160
PR-URL: https://github.com/nodejs/node/pull/22328
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-08-18 12:39:59 -07:00
Timothy Gu
c7788fba28
src: encode 0x27 (') for special URLs
...
Refs: 6ef17ebe12
PR-URL: https://github.com/nodejs/node/pull/22022
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-18 15:18:05 -04:00
Joyee Cheung
2d72a9543c
src: implement the new EmbedderGraph::AddEdge()
...
The signature of EmbedderGraph::AddEdge() has been changed so
the current implementation of JSGraph no longer compiles.
This patch updates the implementation accordingly.
PR-URL: https://github.com/nodejs/node/pull/22106
Refs: 6ee834532d
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-19 00:52:42 +08:00
Sarat Addepalli
9d6619efea
doc: add doc for --loader option
...
PR-URL: https://github.com/nodejs/node/pull/22104
Fixes: https://github.com/nodejs/node/issues/21230
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
2018-08-18 11:15:37 +03:00
Joyee Cheung
7cbbb27c07
src: perform integrity checks on built-in code cache
...
Currently V8 only checks that the length of the source code is the
same as the code used to generate the hash, so we add an additional
check here:
1. During compile time, when generating node_javascript.cc and
node_code_cache.cc, we compute and include the hash of the
(unwrapped) JavaScript source in both.
2. At runtime, we check that the hash of the code being compiled
and the hash of the code used to generate the cache
(inside the wrapper) is the same.
This is based on the assumptions:
1. `internalBinding('code_cache_hash')` must be in sync with
`internalBinding('code_cache')` (same C++ file)
2. `internalBinding('natives_hash')` must be in sync with
`process.binding('natives')` (same C++ file)
3. If `internalBinding('natives_hash')` is in sync with
`internalBinding('natives_hash')`, then the (unwrapped)
code used to generate `internalBinding('code_cache')`
should be in sync with the (unwrapped) code in
`process.binding('natives')`
There will be, however, false positives if the wrapper used
to generate the cache is different from the one used at run time,
and the length of the wrapper somehow stays the same.
But that should be rare and can be eased once we make the
two bootstrappers cached and checked as well.
PR-URL: https://github.com/nodejs/node/pull/22152
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2018-08-18 05:21:52 +08:00
James M Snell
4b7cd4bd60
trace_events: add trace category enabled tracking
...
Track state of async_hooks trace event category enablement.
Enable/disable the async_hooks trace event dynamically.
PR-URL: https://github.com/nodejs/node/pull/22128
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
2018-08-17 09:08:05 -07:00
Ryan Petrich
38145344f1
src: fix race on modpending
...
Fixes a rare race condition on modpending when two native modules are
loaded simultaneously on different threads by storing it thread-
locally.
PR-URL: https://github.com/nodejs/node/pull/21611
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2018-08-16 19:57:09 -04:00
Gus Caplan
be9f7860e1
cli: fix flags on help output
...
PR-URL: https://github.com/nodejs/node/pull/22271
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-08-16 11:11:13 -05:00
Rod Vagg
88105c998e
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-16 19:14:15 +10:00
Ruben Bridgewater
525544b73d
test: remove harmony flags
...
v8 6.8 supports all removed flags. For example for BigInt.
PR-URL: https://github.com/nodejs/node/pull/22285
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-15 17:39:59 +02:00
Eugene Ostroukhov
7404a4dd42
inspector: tie objects lifetime to the thread they belong to
...
PR-URL: https://github.com/nodejs/node/pull/22242
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com >
2018-08-14 09:04:05 -07:00
Bryan English
c7944a7a7b
fs: readdir optionally returning type information
...
readdir and readdirSync now have a "withFileTypes" option, which, when
enabled, provides an array of DirectoryEntry objects, similar to Stats
objects, which have the filename and the type information.
Refs: https://github.com/nodejs/node/issues/15699
PR-URL: https://github.com/nodejs/node/pull/22020
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
2018-08-13 19:18:45 -07:00
James M Snell
f6eab1acf2
perf_hooks: avoid memory leak on gc observer
...
Fixes: https://github.com/nodejs/node/issues/22229
PR-URL: https://github.com/nodejs/node/pull/22241
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yang Guo <yangguo@chromium.org >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
2018-08-13 18:38:55 +01:00
James M Snell
ac92a42a60
http2: avoid race condition in OnHeaderCallback
...
Fixes: https://github.com/nodejs/node/issues/21416
PR-URL: https://github.com/nodejs/node/pull/22256
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
2018-08-13 09:38:49 +01:00
Anna Henningsen
45d0b4a300
src: yield empty maybes for failed AsyncWrap::MakeCallback calls
...
Use an empty `MaybeLocal<Value>` as the return value for
`AsyncWrap::MakeCallback()` if an exception occurred,
regardless of `MakeCallback` depth.
Unfortunately, the public API can not make this switch without
a breaking change (and possibly some kind of deprecation/renaming).
PR-URL: https://github.com/nodejs/node/pull/22078
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-08-12 10:03:43 -07:00
Anna Henningsen
e4c4745a20
src: remove unnecessary writes in tls_wrap.cc
...
PR-URL: https://github.com/nodejs/node/pull/21984
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-12 03:59:02 -07:00
Anna Henningsen
40ae307071
src: avoid possible race during NodeBIO initialization
...
PR-URL: https://github.com/nodejs/node/pull/21984
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-12 03:58:49 -07:00
Anna Henningsen
987dc07111
src: use smart pointers for NodeBIO
...
PR-URL: https://github.com/nodejs/node/pull/21984
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-12 03:58:37 -07:00
Anatoli Papirovski
01a160a05d
src: fix integer overflow in GetNow
...
PR-URL: https://github.com/nodejs/node/pull/22214
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-11 21:43:28 -07:00
Jon Moss
30b5b8485b
src: add READONLY_STRING_PROPERTY and simplify config
...
Bit of tidying up where we set different config values.
PR-URL: https://github.com/nodejs/node/pull/22222
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-11 20:25:54 -04:00
Jon Moss
640dc7a474
crypto: remove unused SSLWrap handle methods
...
One was not used at all, and the other was only used in a test, which I
converted to use the more standard `ShutdownWrap` API.
PR-URL: https://github.com/nodejs/node/pull/22216
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-11 20:22:10 -04:00
Benjamin Coe
bdef1b1eb4
fs: implement mkdir recursive (mkdirp)
...
Implements mkdirp functionality in node_file.cc. The Benefit
of implementing in C++ layer is that the logic is more easily
shared between the Promise and callback implementation and
there are notable performance improvements.
This commit is part of the Tooling Group Initiative.
Refs: https://github.com/nodejs/user-feedback/pull/70
PR-URL: https://github.com/nodejs/node/pull/21875
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Ron Korving <ron@ronkorving.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Sam Ruby <rubys@intertwingly.net >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-08-11 12:07:32 -07:00
James M Snell
b85460498f
src: remove old process.binding('trace_events').emit
...
Remove the older emit and categoryGroupEnabled bindings in
favor of the new intrinsics
PR-URL: https://github.com/nodejs/node/pull/22127
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-10 07:44:08 -07:00
James M Snell
c85933cbd0
trace_events,async_hooks: use intrinsic trace
...
Switch to using the intrinsic trace event method for async_hooks.
This is a breaking change because of the switch to a nested data
argument for exec id and trigger id values.
PR-URL: https://github.com/nodejs/node/pull/22127
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-10 07:43:23 -07:00
James M Snell
c7962dcba4
src: move process.binding('uv') to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/22163
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-08-09 13:47:31 -07:00
James M Snell
c1e2d6b0f1
trace_events: move trace_events to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/22159
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-08-09 11:12:35 -07:00
James M Snell
9f5cc1fc92
src: move process.binding('performance') to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/22029
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-08-09 07:30:58 -07:00
Tobias Nießen
4253e5583b
tls: preallocate SSL cipher array
...
PR-URL: https://github.com/nodejs/node/pull/22136
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-08-09 16:07:50 +02:00
Anna Henningsen
566d11a1ca
src: fix up doc comment for experimental-worker bool
...
PR-URL: https://github.com/nodejs/node/pull/22165
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-08-09 02:14:24 +02:00
Anna Henningsen
e3bae65583
worker: fix deadlock when calling terminate from exit handler
...
Just before we call the `'exit'` handlers of a Worker, we drain
the public port’s message queue to ensure proper ordering.
Previously, we held the Worker’s `mutex_` during the
exit handler call, so calling `terminate()` on the worker
could lead to a deadlock if called from one of those message
handlers.
This fixes flakiness in the `parallel/test-worker-dns-terminate` test.
PR-URL: https://github.com/nodejs/node/pull/22073
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-09 02:11:55 +02:00
Gus Caplan
cf3bb593de
v8: move serdes to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/22161
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-08-08 17:25:14 -05:00
Tobias Nießen
77ac9628b3
crypto: simplify state failure handling
...
It is more intuitive to return true/false instead of undefined/false
and also simplifies handling in the JS layer.
PR-URL: https://github.com/nodejs/node/pull/22131
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2018-08-08 12:05:23 -07:00
Tobias Nießen
7e29453d2f
crypto: simplify Hmac::HmacUpdate
...
This makes HmacUpdate slightly simpler and introduces a CHECK instead
of ignoring invalid input types.
PR-URL: https://github.com/nodejs/node/pull/22132
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-08 12:03:06 -07:00
Ujjwal Sharma
c6a54af42a
src: remove calls to deprecated v8 functions (NumberValue)
...
Remove all calls to deprecated v8 functions (here:
Value::NumberValue) inside the code (src directory only).
PR-URL: https://github.com/nodejs/node/pull/22094
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-08-08 01:54:08 +05:30
James M Snell
080316b32a
trace_events: add node.promises category, rejection counter
...
Allow the trace event log to include a count of unhandled rejections
and handled after rejections. This is useful primarily as a quick
check to see if rejections may be going unhandled (and unnoticed
in a process).
PR-URL: https://github.com/nodejs/node/pull/22124
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-08-07 07:43:18 -07:00
Ouyang Yadong
2bea9cefbc
dgram: implement socket.bind({ fd })
...
dgram: Implement binding an existing `fd`. Allow pass a `fd` property
to `socket.bind()` in dgram.
src: Add `UDPWrap::Open`
PR-URL: https://github.com/nodejs/node/pull/21745
Fixes: https://github.com/nodejs/node/issues/14961
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-06 11:05:51 +02:00
Jon Moss
2519dcc273
src: remove unused env strings
...
user_string:
Usage removed in 4e05952a8a
onstop_string:
Usage removed in 7b46e177ba
max_old_space_size_string:
Added in 0df031acad , never used
max_semi_space_size_string:
Added in 0df031acad , never used
enter_string:
Usage removed in eeede3b19c
PR-URL: https://github.com/nodejs/node/pull/22137
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-05 20:49:48 +02:00
Anna Henningsen
5be9b1d7f3
process: use owner_symbol for _getActive*
...
This makes it easier to provide public APIs in the return types
of `process._getActiveHandles()` and `process._getActiveRequests()`.
PR-URL: https://github.com/nodejs/node/pull/22002
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-05 13:46:14 +02:00
Anna Henningsen
af7164ebcc
lib,src: standardize owner_symbol for handles
...
Instead of somtimes using an `owner` string to link from a
native handle object to the corresponding JS object, standardize
on a single symbol that fulfills this role.
PR-URL: https://github.com/nodejs/node/pull/22002
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-05 13:46:13 +02:00
Anna Henningsen
a196aa2e24
src: clean up PackageConfig pseudo-boolean fields
...
PR-URL: https://github.com/nodejs/node/pull/21987
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-05 02:08:51 +02:00