Ben Noordhuis
adbcda1eef
src: use sizeof(var) instead of sizeof(type)
...
Change `memset(&s, 0, sizeof(type))` to `memset(&s, 0, sizeof(s))`.
The former is dangerous when the type of `s` changes.
PR-URL: https://github.com/nodejs/node/pull/27038
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2019-04-04 10:12:48 +02:00
Joyee Cheung
e1d55a0cbc
src: port bootstrap/cache.js to C++
...
This allows us to query the categories of modules in C++
so we can implement the code cache generator in C++ that
does not depend on a Node.js binary.
PR-URL: https://github.com/nodejs/node/pull/27046
Refs: https://github.com/nodejs/node/issues/21563
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2019-04-04 11:16:10 +08:00
Joyee Cheung
f59ec2abee
src: implement MemoryRetainer in Environment
...
This allows us to track the essentially-global objects in
Environment in the heap snapshot. Note that this patch only
tracks the fields that can be tracked correctly. There are
still several types of fields that cannot be tracked:
- v8::Data including v8::Private, v8::ObjectTemplate etc.
- Internal types that do not implement MemoryRetainer yet
- STL containers with MemoryRetainer* inside
- STL containers with numeric types inside that should not have their
nodes elided e.g. numeric keys in maps.
The `BaseObject`s are now no longer globals. They are tracked
as arguments in CleanupHookCallbacks referenced by the Environment
node. This model is closer to how their lifetime is managed
internally.
To track the per-environment strong persistent properties, this patch
divides them into those that are also `v8::Value` and those that
are just `v8::Data`. The values can be tracked by the current
memory tracker while the data cannot.
This patch also implements the `MemoryRetainer` interface in several
internal classes so that they can be tracked in the heap snapshot.
PR-URL: https://github.com/nodejs/node/pull/27018
Refs: https://github.com/nodejs/node/issues/26776
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-04-04 11:09:29 +08:00
Joyee Cheung
9dba96dc1a
process: patch more process properties during pre-execution
...
Delay the creation of process properties that depend on
runtime states and properties that should not be accessed
during bootstrap and patch them during pre-execution:
- process.argv
- process.execPath
- process.title
- process.pid
- process.ppid
- process.REVERT_*
- process.debugPort
PR-URL: https://github.com/nodejs/node/pull/26945
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2019-04-04 05:14:54 +08:00
Joyee Cheung
d005f382cd
process: store argv in Environment
...
This gets rid of Environment::ExecutionMode as well now that
we use the original arguments to determine execution mode.
PR-URL: https://github.com/nodejs/node/pull/26945
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2019-04-04 05:14:52 +08:00
Geoffrey Booth
5e98f875b9
esm: fix typos
...
PR-URL: https://github.com/nodejs/node/pull/27067
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-04-03 21:24:41 +03:00
gengjiawen
d711b97aa5
src: apply clang-tidy rule bugprone-incorrect-roundings
...
PR-URL: https://github.com/nodejs/node/pull/26885
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-04-03 12:19:44 -04:00
Ben Noordhuis
1087805eeb
src: check return value, silence coverity warning
...
PR-URL: https://github.com/nodejs/node/pull/26997
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-04-03 14:12:17 +02:00
Santiago Gimeno
9e960175d1
dgram: add support for UDP connected sockets
...
Added the `dgram.connect()` and `dgram.disconnect()` methods that
associate/disassociate a udp socket to/from a remote address.
It optimizes for cases where lots of packets are sent to the same
address.
Also added the `dgram.remoteAddress()` method to retrieve the associated
remote address.
PR-URL: https://github.com/nodejs/node/pull/26871
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-04-03 06:48:13 +02:00
cjihrig
d5a5b99eaf
report: add cwd to report
...
The diagnostic report currently contains command line
information, and the environment, which contains the PWD
environment variable. This combination covers the majority
of cases, but it would be useful to have the result of
uv_cwd() as an additional data point. This commit adds that
information.
PR-URL: https://github.com/nodejs/node/pull/27022
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-04-02 20:48:59 -04:00
Joyee Cheung
1944265678
process: run RunBootstrapping in CreateEnvironment
...
Also creates `CreateMainEnvironment` to encapsulate the code
creating the main environment from the provided Isolate data
and arguments.
PR-URL: https://github.com/nodejs/node/pull/26788
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-04-03 08:46:03 +08:00
gengjiawen
4d2739453d
src: replace c-style cast
...
PR-URL: https://github.com/nodejs/node/pull/26888
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-04-02 14:15:53 -04:00
Sam Roberts
dada2eba93
src: remove internal includes from node_crypto.h
...
Remove headers used by node_crypto.cc that were included in
node_crypto.h. The header file should only include what it uses itself.
PR-URL: https://github.com/nodejs/node/pull/26966
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2019-04-01 20:10:46 -07:00
cjihrig
05bd6071a6
crypto: use EVP_PKEY_X448 in GetEphemeralKeyInfo
...
PR-URL: https://github.com/nodejs/node/pull/26988
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-04-01 09:14:17 -04:00
cjihrig
6ac692a3db
crypto: use EVP_PKEY_X25519 in GetEphemeralKeyInfo
...
PR-URL: https://github.com/nodejs/node/pull/26988
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-04-01 09:14:09 -04:00
Filip Skokan
7c1fc93e30
crypto: don't crash on unknown asymmetricKeyType
...
PR-URL: https://github.com/nodejs/node/pull/26786
Fixes: https://github.com/nodejs/node/issues/26775
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2019-04-01 12:49:17 +02:00
Sam Roberts
66b95362df
src: fix warning on mismatched fn signature
...
Add the missing `void* priv` to node_report's Initialize().
PR-URL: https://github.com/nodejs/node/pull/26950
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-04-01 06:34:01 +02:00
cjihrig
0916749c07
src: add missing uv_fs_req_cleanup()
...
This cleans up after the uv_fs_realpath() call a few lines up.
PR-URL: https://github.com/nodejs/node/pull/27004
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2019-03-31 23:30:13 -04:00
cjihrig
bb98f27181
src: check uv_fs_close() return value
...
Coverity was complaining about not checking the return value.
PR-URL: https://github.com/nodejs/node/pull/26967
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2019-03-30 20:50:18 -04:00
Anna Henningsen
9fbf0c60b5
worker: use copy of process.env
...
Instead of sharing the OS-backed store for all `process.env` instances,
create a copy of `process.env` for every worker that is created.
The copies do not interact. Native-addons do not see modifications to
`process.env` from Worker threads, but child processes started from
Workers do default to the Worker’s copy of `process.env`.
This makes Workers behave like child processes as far as `process.env`
is concerned, and an option corresponding to the `child_process`
module’s `env` option is added to the constructor.
Fixes: https://github.com/nodejs/node/issues/24947
PR-URL: https://github.com/nodejs/node/pull/26544
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2019-03-30 22:25:35 +01:00
Anna Henningsen
1ee37aac09
src: implement generic backend for process.env
...
Allow a generic string-based backing store, with no significance
to the remainder of the process, as a store for `process.env`.
PR-URL: https://github.com/nodejs/node/pull/26544
Fixes: https://github.com/nodejs/node/issues/24947
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2019-03-30 22:25:34 +01:00
Anna Henningsen
f5b5fe3937
src: allow per-Environment set of env vars
...
Abstract the `process.env` backing mechanism in C++ to allow
different kinds of backing stores for `process.env` for different
Environments.
PR-URL: https://github.com/nodejs/node/pull/26544
Fixes: https://github.com/nodejs/node/issues/24947
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2019-03-30 22:25:33 +01:00
Juan José Arboleda
a3cf96c76f
src: elevate v8::Task namespace
...
PR-URL: https://github.com/nodejs/node/pull/26909
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-30 13:17:43 +01:00
Tobias Nießen
2e2c015422
crypto: decode missing passphrase errors
...
When a user attempts to load an encrypted key without supplying a
passphrase, a cryptic OpenSSL error is thrown. This change intercepts
the OpenSSL error and throws a nice error code instead.
PR-URL: https://github.com/nodejs/node/pull/25208
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2019-03-30 10:31:43 +01:00
Joyee Cheung
61ef9df958
inspector: display error when ToggleAsyncHook fails
...
This patch refactors `AppendExceptionLine` and `PrintSyncTrace`
to reuse the error formatting logic and use them to print
uncaught error in ``ToggleAsyncHook`
PR-URL: https://github.com/nodejs/node/pull/26859
Refs: https://github.com/nodejs/node/issues/26798
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-03-30 00:38:55 -04:00
Joyee Cheung
7aad63ba34
src: do not call into JS in the maxAsyncCallStackDepthChanged interrupt
...
If Debugger.setAsyncCallStackDepth is sent during bootstrap,
we cannot immediately call into JS to enable the hooks, which could
interrupt the JS execution of bootstrap. So instead we save the
notification in the inspector agent if it's sent in the middle of
bootstrap, and process the notification later here.
Refs: https://github.com/nodejs/node/issues/26798
PR-URL: https://github.com/nodejs/node/pull/26935
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
2019-03-29 23:37:21 -04:00
Brian White
7d0e50dcfe
crypto: add crypto.sign() and crypto.verify()
...
These methods are added primarily to allow signing and verifying
using Ed25519 and Ed448 keys, which do not support streaming of
input data. However, any key type can be used with these new
APIs, to allow better performance when only signing/verifying
a single chunk.
Fixes: https://github.com/nodejs/node/issues/26320
PR-URL: https://github.com/nodejs/node/pull/26611
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2019-03-28 21:57:53 -04:00
Sam Roberts
8c69e06972
tls: return an OpenSSL error from renegotiate
...
A generic error lacks any of the context or detail of the underlying
OpenSSL error, so throw from C++, and report the OpenSSL error to the
callback.
PR-URL: https://github.com/nodejs/node/pull/26868
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2019-03-28 14:03:25 -07:00
Sam Roberts
bcbd35a48d
crypto: add openssl specific error properties
...
Don't force the user to parse the long-style OpenSSL error message,
decorate the error with the library, reason, code, function.
PR-URL: https://github.com/nodejs/node/pull/26868
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2019-03-28 14:03:18 -07:00
Ujjwal Sharma and Michaël Zasso
cc75ba3f14
deps: sync V8 gypfiles with 7.4
...
Normalized boolean options in the gypfiles for consistency both
internally and with the V8 GN config.
Co-authored-by: Michaël Zasso <targos@protonmail.com >
PR-URL: https://github.com/nodejs/node/pull/26685
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-28 16:36:55 -04:00
Ujjwal Sharma
7df9e77236
src: update NODE_MODULE_VERSION to 72
...
Major V8 updates are usually API/ABI incompatible with previous
versions. This commit adapts NODE_MODULE_VERSION for V8 7.4.
Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md
PR-URL: https://github.com/nodejs/node/pull/26685
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-28 16:36:41 -04:00
Tobias Nießen
df1c9eb975
crypto: rename generateKeyPairEdDSA
...
Now that support for X25519 and X448 has been added, this function is
not used exclusively for EdDSA keys anymore.
PR-URL: https://github.com/nodejs/node/pull/26900
Refs: https://github.com/nodejs/node/pull/26774
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2019-03-28 11:13:08 +01:00
gengjiawen
230f1f2aa4
src: delete useless code in cares_wrap.cc
...
PR-URL: https://github.com/nodejs/node/pull/26815
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-28 07:37:37 +01:00
gengjiawen
78ae094ed0
src: fix task release in cares_wrap.cc
...
PR-URL: https://github.com/nodejs/node/pull/26815
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-28 07:37:34 +01:00
gengjiawen
3440cf6a27
src: use deleted function for class BaseObject
...
PR-URL: https://github.com/nodejs/node/pull/26815
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-28 07:37:30 +01:00
gengjiawen
0601f16a47
src: delete unused field in class ModuleWrap
...
PR-URL: https://github.com/nodejs/node/pull/26815
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-28 07:37:27 +01:00
gengjiawen
9addfefd84
src: tidy up include headers in env.cc
...
PR-URL: https://github.com/nodejs/node/pull/26815
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-28 07:37:24 +01:00
gengjiawen
1b10f0d63c
src: delete unreachable code in heap_utils.cc
...
PR-URL: https://github.com/nodejs/node/pull/26815
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-28 07:37:13 +01:00
gengjiawen
8bc7d2a5be
src: fix data type when using uv_get_total_memory()
...
PR-URL: https://github.com/nodejs/node/pull/26886
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-28 05:34:01 +01:00
b1094dbe19
esm: phase two of new esm implementation
...
This PR updates the current `--experimental-modules` implementation
based on the work of the modules team and reflects Phase 2 of our
new modules plan.
The largest differences from the current implementation include
* `packge.type` which can be either `module` or `commonjs`
- `type: "commonjs"`:
- `.js` is parsed as commonjs
- default for entry point without an extension is commonjs
- `type: "module"`:
- `.js` is parsed as esm
- does not support loading JSON or Native Module by default
- default for entry point without an extension is esm
* `--entry-type=[mode]`
- allows you set the type on entry point.
* A new file extension `.cjs`.
- this is specifically to support importing commonjs in the
`module` mode.
- this is only in the esm loader, the commonjs loader remains
untouched, but the extension will work in the old loader if you use
the full file path.
* `--es-module-specifier-resolution=[type]`
- options are `explicit` (default) and `node`
- by default our loader will not allow for optional extensions in
the import, the path for a module must include the extension if
there is one
- by default our loader will not allow for importing directories that
have an index file
- developers can use `--es-module-specifier-resolution=node` to
enable the commonjs specifier resolution algorithm
- This is not a “feature” but rather an implementation for
experimentation. It is expected to change before the flag is
removed
* `--experimental-json-loader`
- the only way to import json when `"type": "module"`
- when enable all `import 'thing.json'` will go through the
experimental loader independent of mode
- based on https://github.com/whatwg/html/issues/4315
* You can use `package.main` to set an entry point for a module
- the file extensions used in main will be resolved based on the
`type` of the module
Refs: https://github.com/nodejs/modules/blob/master/doc/plan-for-new-modules-implementation.md
Refs: https://github.com/GeoffreyBooth/node-import-file-specifier-resolution-proposal
Refs: https://github.com/nodejs/modules/pull/180
Refs: https://github.com/nodejs/ecmascript-modules/pull/6
Refs: https://github.com/nodejs/ecmascript-modules/pull/12
Refs: https://github.com/nodejs/ecmascript-modules/pull/28
Refs: https://github.com/nodejs/modules/issues/255
Refs: https://github.com/whatwg/html/issues/4315
Refs: https://github.com/w3c/webcomponents/issues/770
Co-authored-by: Myles Borins <MylesBorins@google.com >
Co-authored-by: John-David Dalton <john.david.dalton@gmail.com >
Co-authored-by: Evan Plaice <evanplaice@gmail.com >
Co-authored-by: Geoffrey Booth <webmaster@geoffreybooth.com >
Co-authored-by: Michaël Zasso <targos@protonmail.com >
PR-URL: https://github.com/nodejs/node/pull/26745
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Ben Coe <bencoe@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2019-03-27 15:52:11 -04:00
Joyee Cheung
9d854fb60c
src: move ShouldNotAbortOnUncaughtScope out of Environment
...
PR-URL: https://github.com/nodejs/node/pull/26824
Refs: https://github.com/nodejs/node/issues/26776
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 10:30:19 -04:00
Joyee Cheung
9f37d3c114
src: move TrackingTraceStateObserver out of Environment
...
PR-URL: https://github.com/nodejs/node/pull/26824
Refs: https://github.com/nodejs/node/issues/26776
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 10:30:16 -04:00
Joyee Cheung
242466167d
src: move TickInfo out of Environment
...
PR-URL: https://github.com/nodejs/node/pull/26824
Refs: https://github.com/nodejs/node/issues/26776
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 10:30:14 -04:00
Joyee Cheung
4565698227
src: move ImmediateInfo out of Environment
...
PR-URL: https://github.com/nodejs/node/pull/26824
Refs: https://github.com/nodejs/node/issues/26776
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 10:30:12 -04:00
Joyee Cheung
cc7bb855a7
src: move AsyncCallbackScope out of Environment
...
PR-URL: https://github.com/nodejs/node/pull/26824
Refs: https://github.com/nodejs/node/issues/26776
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 10:30:11 -04:00
Joyee Cheung
51970537ee
src: move AsyncHooks out of Environment
...
PR-URL: https://github.com/nodejs/node/pull/26824
Refs: https://github.com/nodejs/node/issues/26776
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-03-27 10:30:09 -04:00
gengjiawen
975bc897d6
src: add include guard for trace_event_common.h
...
PR-URL: https://github.com/nodejs/node/pull/26883
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-26 17:54:09 -04:00
Joyee Cheung
332032cc52
inspector: always set process.binding('inspector').callAndPauseOnStart
...
Since `process.binding('inspector')` is loaded during bootstrap,
simply set `process.binding('inspector').callAndPauseOnStart`
unconditionally instead of relying on `agent->WillWaitForConnect()`
which depends on runtime states,
PR-URL: https://github.com/nodejs/node/pull/26793
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-26 14:37:16 -04:00
Joyee Cheung
83972ff6ac
process: handle --expose-internals during pre-execution
...
Instead of relying on the value of the CLI option when
executing bootstrap/loaders.js.
PR-URL: https://github.com/nodejs/node/pull/26759
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-26 13:53:36 -04:00
Anna Henningsen
3018441304
src: store onread callback in internal field
...
This gives a slight performance improvement. At 2000 runs:
confidence improvement accuracy (*) (**) (***)
net/net-c2s.js dur=5 type='buf' len=64 *** 0.54 % ±0.16% ±0.21% ±0.27%
PR-URL: https://github.com/nodejs/node/pull/26837
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2019-03-26 14:48:56 +01:00