Gus Caplan
ea8000f119
lib: lazy load internal/queue_microtask
...
PR-URL: https://github.com/nodejs/node/pull/23046
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2018-09-24 00:07:33 -05:00
Gus Caplan
de0441f6f6
lib: implement queueMicrotask
...
PR-URL: https://github.com/nodejs/node/pull/22951
Refs: https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-09-23 15:57:19 -05:00
Daniel Bevenius
56493bf1eb
tools: add bash completion for node
...
This commit adds a --completion-bash option to node which can be
sourced to provide bash code completion for node options.
Usage:
$ node --completion-bash > node_bash_completion
$ source node_bash_completion
$ node --[tab]
PR-URL: https://github.com/nodejs/node/pull/20713
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2018-09-21 07:18:24 +02:00
James M Snell
9d71e6a607
src: deprecate global COUNTER_* and remove perfctr
...
To support Performance Counters on Windows, a number of
global `COUNTER_` methods were added that are undocumented
and really only intended to be used internally by Node.js.
Unfortunately, the perfctr support apparently hasn't even
worked for quite a while and no one has even complained.
This removes the perfctr support and replaces the global
functions with deprecated non-ops for now, with the intent
of removing those outright in the next major release cycle.
PR-URL: https://github.com/nodejs/node/pull/22485
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: João Reis <reis@janeasystems.com >
2018-09-19 11:07:01 +02:00
Anto Aravinth
dcc0c2c5c9
lib: move process.binding('js_stream') to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/22239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-09-18 13:29:55 +02:00
James M Snell
932be0164f
util: make TextEncoder/TextDecoder global
...
Fixes: https://github.com/nodejs/node/issues/20365
PR-URL: https://github.com/nodejs/node/pull/22281
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2018-09-17 17:09:25 +02:00
Anna Henningsen
23f8b02513
src: fix --prof-process CLI argument handling
...
Make sure that options after `--prof-process` are not treated
as Node.js options.
Fixes: https://github.com/nodejs/node/issues/22786
PR-URL: https://github.com/nodejs/node/pull/22790
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.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: Bryan English <bryan@bryanenglish.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-09-16 09:44:37 +02:00
Anto Aravinth
9c9c01f183
child_process: move process.binding('spawn_sync') to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/22260
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-09-15 13:48:44 +02:00
Anna Henningsen
d994e261c3
lib: generate allowedNodeEnvironmentFlags lazily
...
PR-URL: https://github.com/nodejs/node/pull/22638
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-09-09 16:20:29 +02:00
Anna Henningsen
995782c872
process: generate list of allowed env flags programmatically
...
Avoids having a separate, second source of truth on this matter.
PR-URL: https://github.com/nodejs/node/pull/22638
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-09-09 16:20:28 +02:00
Weijia Wang
e917a23d2e
url: move process.binding('url') to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/22204
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
2018-09-07 09:03:25 +08:00
cjihrig
7e4b0a4850
util: make util binding internal
...
Refs: https://github.com/nodejs/node/issues/22160
PR-URL: https://github.com/nodejs/node/pull/22675
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-09-05 21:53:11 -04:00
Benjamin Coe
c9d6e3ff04
coverage: expose native V8 coverage
...
native V8 coverage reports can now be written to disk by setting the
variable NODE_V8_COVERAGE=dir
PR-URL: https://github.com/nodejs/node/pull/22527
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yang Guo <yangguo@chromium.org >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
2018-09-05 10:26:48 -07:00
Anna Henningsen
c8880ea276
cli: generate --help text in JS
...
Instead of having a custom, static, hand-written string
that is being printed to stdout when `--help` is present,
generate it in JS when requested.
PR-URL: https://github.com/nodejs/node/pull/22490
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-09-01 00:13:23 +02:00
cjihrig
c8950cdabc
dgram: make process.binding('udp_wrap') internal
...
PR-URL: https://github.com/nodejs/node/pull/22475
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-08-31 09:27:44 -04:00
cjihrig
8b0c482647
dns: make process.binding('cares_wrap') internal
...
PR-URL: https://github.com/nodejs/node/pull/22474
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-30 09:08:44 -04:00
cjihrig
6a689c8aa3
lib: make pipe_wrap binding internal
...
PR-URL: https://github.com/nodejs/node/pull/22482
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-29 15:11:59 -04:00
cjihrig
df073cdda4
tty: make process.binding('tty_wrap') internal
...
PR-URL: https://github.com/nodejs/node/pull/22477
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-08-29 12:28:51 -04:00
cjihrig
6e942e7353
fs: make fs_event_wrap binding internal
...
PR-URL: https://github.com/nodejs/node/pull/22480
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-28 20:38:58 -04:00
cjihrig
56cf058878
child_process: make process_wrap binding internal
...
PR-URL: https://github.com/nodejs/node/pull/22479
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-27 17:49:01 -04:00
Daniel Bevenius
da8641f3b4
src: move process.binding('async_wrap') internal
...
This commit makes the async_wrap builtin an internal builtin, and
changes usage of the builtin from using process.binding('async_wrap')
to use internalBinding instead.
Refs: https://github.com/nodejs/node/issues/22160
PR-URL: https://github.com/nodejs/node/pull/22469
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-27 05:42:55 +02:00
Christopher Hiller
80143f616d
process: add allowedNodeEnvironmentFlags property
...
`process.allowedNodeEnvironmentFlags` provides an API to validate and
list flags as specified in `NODE_OPTIONS` from user code.
Refs: https://github.com/nodejs/node/issues/17740
Signed-off-by: Christopher Hiller <boneskull@boneskull.com >
PR-URL: https://github.com/nodejs/node/pull/19335
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Sam Ruby <rubys@intertwingly.net >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-24 18:15:19 -07:00
Daniel Bevenius
eab916c4e8
crypto: move process.binding('tls_wrap') internal
...
This commit makes the tls_wrap builtin an internal builtin, and
changes usage of the builtin from using process.binding('tls_wrap')
to use internalBinding instead.
Refs: https://github.com/nodejs/node/issues/22160
PR-URL: https://github.com/nodejs/node/pull/22429
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-24 13:53:14 +02:00
Daniel Bevenius
57d98bc732
src: move process.binding('tcp_wrap') to internal
...
This commit makes the tcp_wrap builtin an internal builtin, and
changes usage of the builtin from using process.binding('tcp_wrap')
to use internalBinding instead.
Refs: https://github.com/nodejs/node/issues/22160
PR-URL: https://github.com/nodejs/node/pull/22432
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-24 09:10:38 +02:00
James M Snell
4963a04b30
vm: move process.binding('contextify') to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/22419
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-23 16:09:19 -07:00
Daniel Bevenius
bf5cc3bf1a
crypto: move process.binding('crypto') to internal
...
This commit makes the crypto builtin an internal builtin, and
changes usage of the builtin from using process.binding('crypto')
to use internalBinding instead.
Refs: https://github.com/nodejs/node/issues/22160
PR-URL: https://github.com/nodejs/node/pull/22426
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-24 00:49:29 +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
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
James M Snell
0257fd7ce9
process: wrap process.binding for selective fallthrough
...
Selectively fallthrough `process.binding()` to `internalBinding()`
Refs: https://github.com/nodejs/node/pull/22163
PR-URL: https://github.com/nodejs/node/pull/22269
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-14 17:04:27 -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
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
Denys Otrishko
35326f27fd
process: fix process.exitCode handling for fatalException
...
* set process.exitCode before calling 'exit' handlers so that there will
not be a situation where process.exitCode !== code in 'exit' callback
during uncaughtException handling
* don't ignore process.exitCode set in 'exit' callback when failed with
uncaughtException and there is no uncaughtException listener
PR-URL: https://github.com/nodejs/node/pull/21739
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-07-14 12:04:53 +02:00
Matteo Collina
19795d8383
inspector: expose original console
...
Adds require('inspector').console, mapping it to the original
global.console of V8. This enables applications to send messages to
the inspector console programmatically.
Fixes: https://github.com/nodejs/node/issues/21651
PR-URL: https://github.com/nodejs/node/pull/21659
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-07-07 00:04:52 +02:00
Timothy Gu
5f3bdb016a
messaging: use actual DOMException for DataCloneError
...
PR-URL: https://github.com/nodejs/node/pull/21540
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-03 22:53:59 -04:00
Joyee Cheung
e43d91cdc1
process: split bootstrappers by threads that can run them
...
This patch split part of the bootstrappers into three files:
- `lib/internal/process/main_thread_only.js`: contains bootstrappers
that can only be run in the main thread, including
- `setupStdio` for the main thread that sets up `process.stdin`,
`process.stdout`, `process.error` that may interact with external
resources, e.g. TTY/File/Pipe/TCP sockets
- `setupProcessMethods` that setup methods changing process-global
states, e.g. `process.chdir`, `process.umask`, `process.setuid`
- `setupSignalHandlers`
- `setupChildProcessIpcChannel` that setup `process.send` for
child processes.
- `lib/internal/process/worker_thread_only.js`: contains bootstrappers
that can only be run in the worker threads, including
- `setupStdio` for the worker thread that are streams to be
manipulated or piped to the parent thread
- `lib/internal/process/per_thread.js`: contains bootstrappers
that can be run in all threads, including:
- `setupAssert` for `process.assert`
- `setupCpuUsage` for `process.cpuUsage`
- `setupHrtime` for `process.hrtime` and `process.hrtime.bigint`
- `setupMemoryUsage` for `process.memoryUsage`
- `setupConfig` for `process.config`
- `setupKillAndExit` for `process.kill` and `process.exit`
- `setupRawDebug` for `process._rawDebug`
- `setupUncaughtExceptionCapture` for
`process.setUncaughtExceptionCaptureCallback` and
`process.hasUncaughtExceptionCaptureCallback`
Hopefully in the future we can sort more bootstrappers in
`boostrap/node.js` into these three files and further group
them into functions that can be run before creating the
snapshot / after loading the snapshot.
This patch also moves most of the `isMainThread` conditionals
into the main bootstrapper instead of letting them scattered around
special-casing different implementations.
PR-URL: https://github.com/nodejs/node/pull/21378
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2018-06-21 00:09:53 +08:00
Joyee Cheung
3ff1cb955f
process: remove unused arguments in setup()
...
PR-URL: https://github.com/nodejs/node/pull/21377
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-06-20 20:02:57 +08:00
Joyee Cheung
1d8a231733
process: implement process.hrtime.bigint()
...
PR-URL: https://github.com/nodejs/node/pull/21256
Reviewed-By: Gus Caplan <me@gus.host >
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: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2018-06-17 22:34:58 +08:00
James M Snell
b55f6a0f01
perf_hooks: remove less useful bootstrap marks
...
While `perf_hooks` is still in experimental, remove less useful
bootstrap milestones.
PR-URL: https://github.com/nodejs/node/pull/21247
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-06-15 09:05:19 -07:00
James M Snell
17e378b51a
perf_hooks: set bootstrap complete in only one place
...
PR-URL: https://github.com/nodejs/node/pull/21247
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-06-15 09:05:19 -07:00
Anna Henningsen
0df031acad
worker: initial implementation
...
Implement multi-threading support for most of the API.
Thanks to Stephen Belanger for reviewing this change in its
original form, to Olivia Hugger for reviewing the
documentation and some of the tests coming along with it,
and to Alexey Orlenko and Timothy Gu for reviewing other
parts of the tests.
Refs: https://github.com/ayojs/ayo/pull/110
Refs: https://github.com/ayojs/ayo/pull/114
Refs: https://github.com/ayojs/ayo/pull/117
PR-URL: https://github.com/nodejs/node/pull/20876
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2018-06-06 19:43:52 +02:00
James M Snell
cb3d049bad
src: refactor bootstrap to use bootstrap object
...
PR-URL: https://github.com/nodejs/node/pull/20917
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-05-31 14:05:53 -07:00
James M Snell
456a8193cb
perf_hooks: always set bootstrapComplete
...
PR-URL: https://github.com/nodejs/node/pull/20768
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-05-19 09:48:35 -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
Ruben Bridgewater
1a8aa8cac7
lib: do not call performance hooks
...
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2018-05-18 15:32:14 +02:00
Ruben Bridgewater
7afb73715f
lib: remove unnecessary require
...
The call to url was not necessary since the `url` module itself was
already taking care of this.
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2018-05-18 15:32:05 +02:00
Ruben Bridgewater
dc1737881e
lib: use capital letters in comments
...
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2018-05-18 15:27:29 +02:00