| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Rework all affected functions to use Maybes, thus improving error
handling substantially in internal functions, API functions as well as
utilities.
Co-authored-by: Michaël Zasso <targos@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/21935
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
|
|
|
|
|
|
|
|
| |
Remove all calls to deprecated v8 functions (here: Value::ToString)
inside the code (src directory only).
PR-URL: https://github.com/nodejs/node/pull/21935
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now, we crash the process if there are handles remaining
on the event loop when we exit (except for the main thread).
This does not provide a lot of information about causes, though;
in particular, we don’t show which handles are pending and
who own them.
This patch adds debug output to these cases to help with the
situation.
PR-URL: https://github.com/nodejs/node/pull/21238
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 870229e66529309dfea932c52d718ddc2d734966 ("src: Add ABORT
macro") replaced the abort call with the abort macro in util-inl.h.
This commit removes the include as it is not needed anymore.
PR-URL: https://github.com/nodejs/node/pull/19427
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
|
|
|
|
|
|
|
| |
Use smart pointers instead of raw pointers for StdioPipes.
Also, use a smart pointer for the array holding them.
PR-URL: https://github.com/nodejs/node/pull/17030
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, built-in modules are registered before main() via
__attribute__((constructor)) mechanism in GCC and similiar
mechanism in MSVC. This causes some issues when node is built as
static library. Calling module registration function for built-in
modules in node::Init() helps to avoid the issues.
Signed-off-by: Yihong Wang <yh.wang@ibm.com>
PR-URL: https://github.com/nodejs/node/pull/16565
Refs: https://github.com/nodejs/node/pull/14986#issuecomment-332758206
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In spawn_sync.cc, two consecutive loops are used to convert
data to strings, and compute the size of the data. This commit
merges the two independent loops into one.
Refs: https://github.com/nodejs/node/pull/15380
PR-URL: https://github.com/nodejs/node/pull/16247
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
|
|
|
|
|
| |
Refs: https://github.com/nodejs/node/pull/15380
PR-URL: https://github.com/nodejs/node/pull/16247
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This commit exposes the UV_PROCESS_WINDOWS_HIDE flag in Node
as a windowsHide option to the child_process methods. The
option is only applicable to Windows, and is ignored elsewhere.
Fixes: https://github.com/nodejs/node/issues/15217
PR-URL: https://github.com/nodejs/node/pull/15380
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A prior io.js era commit inappropriately removed the
original copyright statements from the source. This
restores those in any files still remaining from that
edit.
Ref: https://github.com/nodejs/TSC/issues/174
Ref: https://github.com/nodejs/node/pull/10599
PR-URL: https://github.com/nodejs/node/pull/10155
Note: This PR was required, reviewed-by and approved
by the Node.js Foundation Legal Committee and the TSC.
There is no `Approved-By:` meta data.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit sets the spawnSync() exit code to null when the
child is killed via signal. This brings the behavior more in
sync with spawn().
Fixes: https://github.com/nodejs/node/issues/11284
PR-URL: https://github.com/nodejs/node/pull/11288
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
|
|
|
|
|
|
| |
Fixes: https://github.com/nodejs/node/pull/10767
PR-URL: https://github.com/nodejs/node/pull/10769
Reviewed-By: James M Snell <jasnell@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This commit removes C++ checks from spawn() and spawnSync()
that are duplicates of the JavaScript type checking.
Fixes: https://github.com/nodejs/node/issues/8096
Fixes: https://github.com/nodejs/node/issues/8539
Refs: https://github.com/nodejs/node/issues/9722
PR-URL: https://github.com/nodejs/node/pull/8312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit verifies that the child process handle is of the
correct type before trying to close it in
CloseHandlesAndDeleteLoop(). This catches the case where input
validation failed, and the child process was never actually
spawned.
Fixes: https://github.com/nodejs/node/issues/8096
Fixes: https://github.com/nodejs/node/issues/8539
Refs: https://github.com/nodejs/node/issues/9722
PR-URL: https://github.com/nodejs/node/pull/8312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pointed out by Coverity. Introduced in commits 3546383c ("process_wrap:
avoid leaking memory when throwing due to invalid arguments") and
fa4eb47c ("bindings: add spawn_sync bindings").
The return statements inside the if blocks were dead code because their
guard conditions always evaluated to false. Remove them.
PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
|
|
|
|
|
| |
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows 8+ compiled in Release mode exits with code 0xC0000409 when
abort() is called. This prevents us from being able to reliably verify
an abort exit code (3) on windows.
PR-URL: https://github.com/nodejs/node/pull/2776
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
|
|
|
|
|
|
|
| |
v8::Handle is deprecated: https://codereview.chromium.org/1224623004
PR-URL: https://github.com/nodejs/io.js/pull/2202
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
|
|
|
|
|
|
|
|
| |
Instead of aborting in case of internal failure, return an empty
Local<Object>. Using the MaybeLocal<T> API, users must check their
return values.
PR-URL: https://github.com/nodejs/io.js/pull/1825
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the --trace-sync-io flag to print a stack trace whenever a sync
method is used after the first tick, excluding during the process exit
event. (e.g. fs.readFileSync()) It does not track if the warning has
occurred at a specific location in the past and so will print the
warning every time.
Reason for not printing during the first tick of the appication is so
all necessary resources can be required. Also by excluding synchronous
calls during exit is necessary in case any data needs to be logged out
by the application before it shuts down.
Fixes: https://github.com/nodejs/io.js/issues/1674
PR-URL: https://github.com/nodejs/io.js/pull/1707
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Petka Antonov <petka_antonov@hotmail.com>
|
|
|
|
|
|
|
|
|
| |
Commit ccb199a ("src: fix deprecation warnings") passes env()->isolate()
to the Buffer::New() call. It's somewhat inefficient because the callee
looks up the environment from the isolate. Just pass the env directly.
PR-URL: https://github.com/iojs/io.js/pull/1577
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
|
|
|
|
|
|
|
|
|
| |
The previous commit enables deprecation warnings, this commit fixes
the handful of offending sites where the isolate was not explicitly
being passed around.
PR-URL: https://github.com/iojs/io.js/pull/1565
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On AIX, OS X and the BSDs, calling shutdown() on one end of a pipe
when the other end has closed the connection fails with ENOTCONN.
The sequential/test-child-process-execsync test failed sporadically
because of a race between the parent and the child where one closed
its end of the pipe before the other got around to calling shutdown()
on its end of the pipe.
Libuv is not the right place to handle that because it can't tell if
the ENOTCONN error is genuine but io.js can.
Refs: https://github.com/libuv/libuv/pull/268
PR-URL: https://github.com/iojs/io.js/pull/1214
Reviewed-By: Bert Belder <bertbelder@gmail.com>
|
|
|
|
|
|
|
| |
The copyright and license notice is already in the LICENSE file. There
is no justifiable reason to also require that it be included in every
file, since the individual files are not individually distributed except
as part of the entire package.
|
|
|
|
|
|
|
| |
Due to a recent V8 upgrade, more methods require Isolate as an argument.
PR-URL: https://github.com/iojs/io.js/pull/244
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
|
|
|
|
|
| |
PR-URL: https://github.com/joyent/node/pull/8546
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Now that we are building with C++11 features enabled, replace use
of NULL with nullptr.
The benefit of using nullptr is that it can never be confused for
an integral type because it does not support implicit conversions
to integral types except boolean - unlike NULL, which is defined
as a literal `0`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attach the per-context execution environment directly to API functions.
Rationale:
* Gets node one step closer to multi-isolate readiness.
* Avoids multi-context confusion, e.g. when the caller and callee live
in different contexts.
* Avoids expensive calls to pthread_getspecific() on platforms where
V8 does not know how to use the thread-local storage directly.
(Linux, the BSDs.)
PR-URL: https://github.com/node-forward/node/pull/18
Reviewed-By: Fedor Indutny <fedor@indutny.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Mechanically replace assert() statements with UNREACHABLE(), CHECK(),
or CHECK_{EQ,NE,LT,GT,LE,GE}() statements.
The exceptions are src/node.h and src/node_object_wrap.h because they
are public headers.
PR-URL: https://github.com/node-forward/node/pull/16
Reviewed-By: Fedor Indutny <fedor@indutny.com>
|
|
|
|
|
|
|
|
| |
API callback functions don't need to create a v8::HandleScope instance
because V8 already creates one in the JS->C++ adapter frame.
PR-URL: https://github.com/node-forward/node/pull/16
Reviewed-By: Fedor Indutny <fedor@indutny.com>
|
|
|
|
|
|
|
|
|
| |
The spawnSync() cwd option was being copied to the incorrect
location. This commit copies to the correct location.
Closes #7824
Signed-off-by: Fedor Indutny <fedor@indutny.com>
|
|
|
|
|
|
|
| |
When ExitCallback was not called with an error such as ENOENT in
uv_spawn, the process handle still remains refed and needs to be closed.
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
|
|
|
|
|
| |
async, timer, prepare, idle and check handles no longer get a status
parameter since they can never fail.
|
| |
|
|
|
|
| |
uv_loop_new and uv_loop_delete are considered deprecated now.
|
|
|
|
|
| |
When the exit callback is fired for the child process we should close
the handle associated with it.
|
|
|
|
| |
fix #6899
|
|
This implements a nested event loop that makes it possible to control
a child process, while blocking the main loop until the process exits.
|