Joyee Cheung
61a89630ee
inspector: split the HostPort being used and the one parsed from CLI
...
Instead of using a shared pointer of the entire debug option set,
pass the parsed debug option to inspector classes by value because
they are set once the CLI argument parsing is done. Add another shared
pointer to HostPort being used by the inspector server, which is copied
from the one in the debug options initially. The port of the shared
HostPort is 9229 by default and can be specified as 0 initially but
will be set to the actual port of the server once it starts listening.
This makes the shared state clearer and makes it possible to use
`require('internal/options')` in JS land to query the CLI options
instead of using `process._breakFirstLine` and other underscored
properties of `process` since we are now certain that these
values should not be altered once the parsing is done and can be
passed around in copies without locks.
PR-URL: https://github.com/nodejs/node/pull/24772
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-12-09 06:26:53 +08:00
Jayasankar
bbb9d3721b
src: elevate v8 namespaces for node_process.cc
...
Elevate namespace for repeated entities.
Resolved conflicts.
PR-URL: https://github.com/nodejs/node/pull/24578
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-11-30 21:11:14 -08:00
cjihrig
11c17e4bc9
src: simplify uptime and ppid return values
...
This commit removes extraneous wrapping of return values
in Uptime() and GetParentProcessId().
PR-URL: https://github.com/nodejs/node/pull/24562
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-11-27 06:20:22 +01:00
Daniel Bevenius
39a5e7dbb0
src: remove unused variables
...
Currently the following compiler warnings are generated:
../src/node_process.cc:799:16:
warning: unused variable 'ary' [-Wunused-variable]
Local<Array> ary = Array::New(args.GetIsolate());
^
1 warning generated.
../src/node_http2.cc:1294:16:
warning: unused variable 'holder' [-Wunused-variable]
Local<Array> holder = Array::New(isolate);
^
1 warning generated.
This commit removes these unused variables.
PR-URL: https://github.com/nodejs/node/pull/24355
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-11-16 12:41:08 +01:00
Joyee Cheung
8c60d931f2
process: remove pushValueToArray in GetActiveHandles
...
Instead of calling into JS from C++ to push values into an array,
use the new Array::New API that takes a pointer and a length
directly.
PR-URL: https://github.com/nodejs/node/pull/24264
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-11-14 02:59:44 +08:00
Joyee Cheung
235afb4c6a
process: remove pushValueToArray in GetActiveRequests
...
Instead of calling into JS from C++ to push values into an array,
use the new Array::New API that takes a pointer and a length
directly.
PR-URL: https://github.com/nodejs/node/pull/24264
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-11-14 02:59:44 +08:00
Joyee Cheung
08bfd5625f
process: remove pushValueToArray in EnvEnumerator
...
Instead of calling into JS from C++ to push values into an array,
use the new Array::New API that takes a pointer and a length
directly.
PR-URL: https://github.com/nodejs/node/pull/24264
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-11-14 02:59:43 +08:00
Daniel Bevenius
344d33eef1
src: fix v8 compiler warnings in src
...
This commit changes the code to use the maybe version.
PR-URL: https://github.com/nodejs/node/pull/24246
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-11-11 08:02:30 +01:00
Romain Lanz
added1b0c5
src: refactor deprecated v8::String::NewFromTwoByte call
...
PR-URL: https://github.com/nodejs/node/pull/23803
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-24 12:12:00 +02:00
Rodrigo Bruno
a5604a73d8
src: use HeapStatistics to get external memory
...
V8 is improving the way external memory is internally managed and how
it is reported.
External memory should now be retrieved using HeapStatistics.
Refs: https://github.com/v8/node/pull/80
PR-URL: https://github.com/nodejs/node/pull/22754
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-09-22 18:29:49 +02:00
James M Snell
eaaee92d9b
src: move DebugPortGetter/Setter to node_process.cc
...
PR-URL: https://github.com/nodejs/node/pull/22758
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-09-14 19:02:45 +02:00
James M Snell
efd4796fa9
src: move getActiveResources/Handles to node_process.cc
...
PR-URL: https://github.com/nodejs/node/pull/22758
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-09-14 19:02:44 +02:00
Michaël Zasso
594a84d8f2
src: remove calls to deprecated V8 functions (Int32Value)
...
Remove all calls to deprecated V8 functions (here: Value::Int32Value)
inside the code.
PR-URL: https://github.com/nodejs/node/pull/22662
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2018-09-05 12:59:25 +02:00
Ujjwal Sharma
37cd10a116
src: remove calls to deprecated v8 functions (Uint32Value)
...
Remove all calls to deprecated v8 functions (here:
Value::Uint32Value) inside the code (src directory only).
PR-URL: https://github.com/nodejs/node/pull/22143
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2018-09-02 16:32:15 +02:00
James M Snell
264c99f6c6
src: move more to node_process.cc from node.cc
...
PR-URL: https://github.com/nodejs/node/pull/22422
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-22 17:58:28 -07:00
Ujjwal Sharma
35ec9b247e
src: remove calls to deprecated v8 functions (NewFromUtf8)
...
Remove all calls to deprecated v8 functions (here: String::NewFromUtf8) inside
the code (src directory only).
PR-URL: https://github.com/nodejs/node/pull/21926
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-29 16:59:31 +02:00
Anna Henningsen
cf37945b12
src: include cwd in chdir error message
...
Include the current working directory in the error
message for a failing `process.chdir()` since that is
usually information relevant for debugging.
This is semver-major because it moves properties
of the error message object.
Inspired by https://github.com/nodejs/help/issues/1355 .
PR-URL: https://github.com/nodejs/node/pull/21526
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-07-17 13:57:11 +02:00
Daniel Bevenius
a71d5fc725
src: remove .h if -inl.h is already included
...
This commit removes the normal header file include if an internal one
is specified as per the CPP_STYLE_GUIDE.
PR-URL: https://github.com/nodejs/node/pull/21381
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2018-06-20 05:42:39 +02: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
baadc7ade3
src: add node_process.cc
...
Begin moving `process` object function definitions out of
`node.cc` ... continuing the process of making `node.cc`
smaller and easier to maintain.
PR-URL: https://github.com/nodejs/node/pull/21105
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-06-14 15:51:48 -07:00