Tobias Nießen
39f209649f
src: add CHECK_NULL/CHECK_NOT_NULL macros
...
This change introduces CHECK_NULL and CHECK_NOT_NULL macros
similar to their definition in v8 and replaces instances of
CHECK/CHECK_EQ/CHECK_NE with these where it seems appropriate.
PR-URL: https://github.com/nodejs/node/pull/20914
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-26 12:29:31 +02:00
Daniel Bevenius
3294d1bf62
src: remove --expose-http2 option
...
This commit removes the --expose-http2 option. In the code comment it
states that this should should be noop through v9.x, and it sounds like
it can be removed for 10.x and above.
PR-URL: https://github.com/nodejs/node/pull/20887
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-24 08:28:02 +02:00
ohbarye
9461f327f5
src,doc: add doc of --prof flag to help command
...
Fixes: https://github.com/nodejs/node/issues/16459
PR-URL: https://github.com/nodejs/node/pull/20845
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-23 08:47:30 -07:00
Tobias Nießen
e316655468
lib,src,test: fix comments
...
PR-URL: https://github.com/nodejs/node/pull/20846
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-05-22 12:35:17 +04:00
Ali Ijaz Sheikh
32873c5f9b
src: trace_events: background thread events
...
V8 uses a thread pool provided by the host to schedule background tasks
for concurrent GC and compiation. Emit trace events to identify the
background threads. Ensure that the tracing infrastructure is started
before the thread pool is initialized.
PR-URL: https://github.com/nodejs/node/pull/20823
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-05-21 11:16:44 -07:00
James M Snell
9349e15daa
src: move *Exceptions out to separate cc/h
...
PR-URL: https://github.com/nodejs/node/pull/20789
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-05-19 10:42:00 -07:00
James M Snell
c68e6e1f1b
src: fix odd linting issue
...
The prior commit causes a linting issue here.
Fix by changing from a struct to a class.
PR-URL: https://github.com/nodejs/node/pull/20789
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-05-19 10:41:54 -07:00
James M Snell
fbd1c4977e
src: move CallbackScope to separate cc/h
...
PR-URL: https://github.com/nodejs/node/pull/20789
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-05-19 10:41:41 -07:00
Anna Henningsen
70cc5da0f1
lib,src: use V8 API for collection inspection
...
Use a new public V8 API for inspecting weak collections and
collection iterators, rather than using V8-internal functions
to achieve this. This currently comes with a slight modification of
the output for inspecting iterators generated by `Set().entries()`.
Fixes: https://github.com/nodejs/node/issues/20409
PR-URL: https://github.com/nodejs/node/pull/20719
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-19 01:02:14 +02:00
Ali Ijaz Sheikh
3ff723f940
src: trace_events: support for metadata events
...
Add support for metadata events. At this point they are added to the
main buffer. Emit a metadata event for the main thread.
PR-URL: https://github.com/nodejs/node/pull/20757
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-05-18 10:42:35 -07:00
Ben Noordhuis
de4e0d7f6d
src: handle TryCatch with empty message
...
This bug needs a test case with a high goldilocks factor to trigger
but the synopsis is that `v8::TryCatch::Message()` returns an empty
handle when the TryCatch is declared at a time when an exception is
already pending.
We now recompute the message inside `node::ReportException()` and
all is well again.
PR-URL: https://github.com/nodejs/node/pull/20708
Fixes: https://github.com/nodejs/node/issues/8854
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2018-05-16 08:59:37 +04:00
helloshuangzi
963cb3a49c
src: add public API to create isolate and context
...
PR-URL: https://github.com/nodejs/node/pull/20639
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-05-14 18:40:17 +02:00
David Goldstein
236596590c
module: add --preserve-symlinks-main
...
Add `--preserve-symlinks-main` option which behaves like
`--preserve-symlinks` but for `require.main`.
PR-URL: https://github.com/nodejs/node/pull/19911
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-13 00:28:16 +03:00
Anna Henningsen
bcb324c3ff
src: add can_call_into_js flag
...
This prevents calls back into JS from the shutdown phase.
Many thanks for Stephen Belanger for reviewing the original version of
this commit in the Ayo.js project.
Refs: https://github.com/ayojs/ayo/pull/82
PR-URL: https://github.com/nodejs/node/pull/19377
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-10 14:15:17 +02:00
Anna Henningsen
61fd027096
src: use cleanup hooks to tear down BaseObjects
...
Clean up after `BaseObject` instances when the `Environment`
is being shut down. This takes care of closing non-libuv resources
like `zlib` instances, which do not require asynchronous shutdown.
Many thanks for Stephen Belanger, Timothy Gu and Alexey Orlenko for
reviewing the original version of this commit in the Ayo.js project.
Refs: https://github.com/ayojs/ayo/pull/88
PR-URL: https://github.com/nodejs/node/pull/19377
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-10 14:15:17 +02:00
Anna Henningsen
5c6cf30143
src: add environment cleanup hooks
...
This adds pairs of methods to the `Environment` class and to public APIs
which can add and remove cleanup handlers.
Unlike `AtExit`, this API targets addon developers rather than
embedders, giving them (and Node’s internals) the ability to register
per-`Environment` cleanup work.
We may want to replace `AtExit` with this API at some point.
Many thanks for Stephen Belanger for reviewing the original version of
this commit in the Ayo.js project.
Refs: https://github.com/ayojs/ayo/pull/82
PR-URL: https://github.com/nodejs/node/pull/19377
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-10 14:15:16 +02:00
Anna Henningsen
5e6ca894cf
src: fix nullptr dereference for signal during startup
...
This fixes a test failure when running
`test/parallel/test-child-process-spawnsync-kill-signal.js`
under load. What would happen is that `SignalExit()` tries
to shutdown the tracing agent, which might not have been set
up by the point that Node.js receives the signal.
PR-URL: https://github.com/nodejs/node/pull/20637
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-05-10 14:04:20 +02:00
Anna Henningsen
2c52f656bd
src: protect global state with mutexes
...
Protect environment variables and inherently per-process state with
mutexes, to better accommodate Node’s usage in
multi-threading environments.
Thanks to Stephen Belanger for reviewing this change in its original PR.
Refs: https://github.com/ayojs/ayo/pull/82
PR-URL: https://github.com/nodejs/node/pull/20542
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-05-09 18:21:28 +02:00
Allen Yonghuang Wang
b00c34c161
src: add public API to expose the main V8 Platform
...
Add an API to get MultiIsolatePlatform used in node main thread.
PR-URL: https://github.com/nodejs/node/pull/20447
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-05-06 23:34:09 +02:00
Ruben Bridgewater
b87ef189e9
src: improve fatal exception
...
This is just some code cleanup.
PR-URL: https://github.com/nodejs/node/pull/20294
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-27 20:22:26 +02:00
Eugene Ostroukhov
1300103534
inspector: allow concurrent inspector sessions
...
This change enables concurrent inspector sessions, through WebSocket
interface as well as JS interface, in any combination.
PR-URL: https://github.com/nodejs/node/pull/20137
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-04-26 12:48:48 -07:00
Michaël Zasso
2fd248f639
process: migrate methods to throw errors with code
...
Migrate some methods from node.cc to JS in order to properly throw
errors with codes.
PR-URL: https://github.com/nodejs/node/pull/19973
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-26 19:42:55 +02:00
Ruben Bridgewater
e767aa1a2e
Revert "src: make process.env.TZ setter clear tz cache"
...
This reverts commit 1d1ab76e17 .
PR-URL: https://github.com/nodejs/node/pull/20228
Fixes: https://github.com/nodejs/node/issues/20227
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-23 23:39:30 +02:00
Gabriel Schulhof
0f8caf23be
n-api: initialize a module via a special symbol
...
Much like regular modules, N-API modules can also benefit from having
a special symbol which they can expose.
Fixes: https://github.com/nodejs/node/issues/19845
PR-URL: https://github.com/nodejs/node/pull/20161
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-04-23 17:24:18 -04:00
Ben Noordhuis
1d1ab76e17
src: make process.env.TZ setter clear tz cache
...
Since the presence of the libc and V8 timezone caches seem to be
a perennial source of confusion to users ("why doesn't it work?!"),
let's try to support that pattern by intercepting assignments to
the `TZ` environment variable and reset the caches as a side effect.
PR-URL: https://github.com/nodejs/node/pull/20026
Fixes: https://github.com/nodejs/node/issues/19974
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-23 15:53:10 +02:00
Gabriel Schulhof
c1078c4a3b
src: cover extra load-via-special-symbol scenario
...
We need to look for a special symbol even if the module self-registers
when the module self-registers with the wrong version.
PR-URL: https://github.com/nodejs/node/pull/20186
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-04-23 08:59:03 -04:00
Rod Vagg
287ec1e8f4
Revert "process: add version constants and compare"
...
This reverts commit 91e0f8db11 .
PR-URL: https://github.com/nodejs/node/pull/20062
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-04-20 10:28:38 -07:00
Timothy Gu
be92eab92a
repl: hide top-level await feature behind a flag
...
PR-URL: https://github.com/nodejs/node/pull/19604
Refs: https://github.com/nodejs/node/pull/17807
Refs: https://github.com/nodejs/node/pull/15566#issuecomment-353428430
Reviewed-By: Gus Caplan <me@gus.host >
2018-04-18 07:50:17 -07:00
James M Snell
5c27e44488
trace_events: adds a new trace_events api
...
Removes the requirement to use `--trace-events-enabled` to enable
trace events. Tracing is enabled automatically if there are any
enabled categories.
Adds a new `trace_events` module with an API for enabling/disabling
trace events at runtime without a command line flag.
```js
const trace_events = require('trace_events');
const categories = [ 'node.perf', 'node.async_hooks' ];
const tracing = trace_events.createTracing({ categories });
tracing.enable();
// do stuff
tracing.disable();
```
Multiple `Tracing` objects may exist and be enabled at any point
in time. The enabled trace event categories is the union of all
enabled `Tracing` objects and the `--trace-event-categories`
flag.
PR-URL: https://github.com/nodejs/node/pull/19803
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
2018-04-17 08:30:20 -07:00
Gus Caplan
91e0f8db11
process: add version constants and compare
...
PR-URL: https://github.com/nodejs/node/pull/19587
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2018-04-13 22:03:04 -07:00
willhayslett
a43e8896f2
doc, src: sort + fill up cli options and env vars
...
* Alphabetize the command line options and environment
variables in doc/api/cli.md for consistency and readability.
* Update doc/api/cli.md to include command line options
being printed in the `node.PrintHelp()` function in src/node.cc
but weren't otherwise documented in the cli spec. Options added
include:
--napi-modules
--v8-pool-size=num
--experimental-modules
--experimental-vm-modules
* ASCII sort the node man page command line options.
This change brings sort order consistency between the
cli options displayed in doc/node.1 and the cli options
enumerated in other areas of the project.
Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca`
to correspond with the order of the options as displayed.
* Update `node.PrintHelp()` function to return command line options
and environment variables sorted in ASCII order. Additionally,
add missing options as sourced from doc/api/cli.md. Options
added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS`
environment variable.
Also update the comments in the `node.PrintHelp()` method
to C++ style.
* Create tests to validate that the newly ASCII sorted
cli options in the `node.PrintHelp()` function are being
returned according to build configurations as expected.
PR-URL: https://github.com/nodejs/node/pull/19878
Refs: https://github.com/nodejs/node/issues/19814
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-04-13 23:14:54 +03:00
Ben Noordhuis
5bfbe5ceae
tls: drop NPN (next protocol negotiation) support
...
NPN has been superseded by ALPN. Chrome and Firefox removed support for
NPN in 2016 and 2017 respectively to no ill effect.
Fixes: https://github.com/nodejs/node/issues/14602
PR-URL: https://github.com/nodejs/node/pull/19403
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-03-27 16:22:37 +02:00
Daniel Bevenius
ebbf393600
src: name all builtin init functions Initialize
...
This commit renames a few of the builtin modules init functions to
Initialize for consistency.
PR-URL: https://github.com/nodejs/node/pull/19550
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-03-26 08:23:49 +02:00
Tobias Nießen
eeb1b9dcb7
Revert "process: add more version properties to release"
...
This reverts commit 982e3bdb1f . It is
believed that the original PR should not have landed as it is as the
implemented and exposed API has a variety of flaws.
PR-URL: https://github.com/nodejs/node/pull/19577
Refs: https://github.com/nodejs/node/pull/19438
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-03-25 03:18:56 +02:00
Sarat Addepalli
c6c957d3cc
src: fix upcoming V8 deprecation warnings
...
PR-URL: https://github.com/nodejs/node/pull/19490
Fixes: https://github.com/nodejs/node/issues/18909
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-03-23 08:50:03 +01:00
Gus Caplan
982e3bdb1f
process: add more version properties to release
...
PR-URL: https://github.com/nodejs/node/pull/19438
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2018-03-22 17:09:19 -05:00
James M Snell
96cb4fb795
perf_hooks,trace_events: emit perf milestone trace events
...
Emit the perf_hooks node timing milestones as trace events.
PR-URL: https://github.com/nodejs/node/pull/19175
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-03-16 10:54:05 -07:00
Joyee Cheung
855dabd675
src: call CleanupHandles in FreeEnvironment
...
CleanupHandles() has not been called in our own code base anymore
after the v8 debug agent has been removed. It used to be in the
~Environment() destructor but then removed to avoid firing other
events after the exit event, given that we were not going to
clean up handles for the one environment per process setup.
Call it in FreeEnvironment so that embedders can clean up
the handles in the loop when creating multiple environments.
PR-URL: https://github.com/nodejs/node/pull/19319
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jackson Tian <shyvo1987@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-03-15 15:39:11 +01:00
Joyee Cheung
8484b40b3d
src: put bootstrappers in lib/internal/bootstrap/
...
Create `lib/internal/bootstrap/` and put bootstrappers there:
Before:
```
lib/internal
├── ...
├── bootstrap_loaders.js
└── bootstrap_node.js
```
After:
```
lib/internal
├── ...
└── bootstrap
├── loaders.js
└── node.js
```
PR-URL: https://github.com/nodejs/node/pull/19177
Refs: https://github.com/nodejs/node/pull/19112
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2018-03-15 20:50:34 +08:00
Michael Dawson
cd7d7b15c1
n-api: take n-api out of experimental
...
Take n-api out of experimental as per:
https://github.com/nodejs/TSC/issues/501
PR-URL: https://github.com/nodejs/node/pull/19262
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
2018-03-14 17:12:58 -04:00
Gus Caplan
cb5f358ee7
vm: add code generation options
...
Adds options to a VM Context to disable code generation from strings
(such as eval or new Function) and WASM code generation
(WebAssembly.compile).
PR-URL: https://github.com/nodejs/node/pull/19016
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-03-12 14:39:21 -05:00
Sakthipriyan Vairamani (thefourtheye)
50b1cb39bd
src: fix deprecation id for non-string env value
...
This is a follow-up of https://github.com/nodejs/node/pull/18990 . A new
deprecation id was assigned in it, but it was not reflected in code and
test.
PR-URL: https://github.com/nodejs/node/pull/19209
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-03-07 11:32:27 -08:00
Timothy Gu
5826fe4e79
process: doc-only deprecate non-string env value
...
PR-URL: https://github.com/nodejs/node/pull/18990
Refs: https://github.com/nodejs/node/pull/15089
Refs: https://github.com/nodejs/node/pull/18158
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2018-03-07 10:38:58 -08:00
Joyee Cheung
2a9eb316a1
src: move internal loaders out of bootstrap_node.js
...
- Moves the creation of `process.binding()`, `process._linkedBinding()`
`internalBinding()` and `NativeModule` into a separate file
`lib/internal/bootstrap_loaders.js`, and documents them there.
This file will be compiled and run before `bootstrap_node.js`, which
means we now bootstrap the internal module & binding system before
actually bootstrapping Node.js.
- Rename the special ID that can be used to require `NativeModule`
as `internal/bootstrap_loaders` since it is setup there. Also put
`internalBinding` in the object exported by `NativeModule.require`
instead of putting it inside the `NativeModule.wrapper`
- Use the original `getBinding()` to get the source code of native
modules instead of getting it from `process.binding('native')`
so that users cannot fake native modules by modifying the binding
object.
- Names the bootstrapping functions so their names show up
in the stack trace.
PR-URL: https://github.com/nodejs/node/pull/19112
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2018-03-06 22:12:46 +08:00
Sarat Addepalli
b32bcf7e9c
process: unify error message from chdir() errors
...
PR-URL: https://github.com/nodejs/node/pull/19088
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2018-03-06 09:21:44 +01:00
Andreas Madsen
85212bb182
trace_events: add file pattern cli option
...
Allow the user to specify the filepath for the trace_events log file
using a template string.
PR-URL: https://github.com/nodejs/node/pull/18480
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-03-04 12:07:39 +01:00
Glen Keane
30fd3d25df
src: Remove lttng support.
...
This cleans up and removes lttng support completely. Recent discussion
on a PR to deprecate lttng suggested that we remove it completely
pending feedback from the TSC.
This should be considered a non breaking change, as a recent PR reveals
that compiling with this system has been broken for nearly two years.
Refs: https://github.com/nodejs/node/issues/18971
Refs: https://github.com/nodejs/node/pull/18975
Refs: https://github.com/nodejs/node/pull/18945
PR-URL: https://github.com/nodejs/node/pull/18982
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jackson Tian <shyvo1987@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-03-01 16:44:43 +00:00
Ben Noordhuis
3828fc6289
src: make process.dlopen() load well-known symbol
...
Look for symbol `node_register_module_v${NODE_MODULE_VERSION}` if the
add-on didn't self-register. This can be used to create add-ons that
support multiple Node.js versions from a single shared object.
PR-URL: https://github.com/nodejs/node/pull/18934
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-03-01 13:45:57 +01:00
Ben Noordhuis
66315220ae
src: clean up process.dlopen()
...
Move some code around and clean up the DLib helper class as prep work
for a follow-up commit.
PR-URL: https://github.com/nodejs/node/pull/18934
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-03-01 13:44:10 +01:00
Daniel Bevenius
cae4182761
src: remove node namespace qualifiers
...
This commit removes unneccessary node namespace qualifiers in node.cc
for consistency.
PR-URL: https://github.com/nodejs/node/pull/18962
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2018-02-26 07:19:05 +01:00