Luigi Pinca
dfbbfbb765
net: make writeAfterFIN() return false
...
If `false` is not returned a readable stream piped into the socket
might continue reading indefinitely until the process goes out of
memory.
PR-URL: https://github.com/nodejs/node/pull/27996
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-06-17 19:49:43 +02:00
Refael Ackermann
e5c26753e9
build,meta: rearrange and narrow git ignore rules
...
PR-URL: https://github.com/nodejs/node/pull/27954
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-06-17 19:49:42 +02:00
Joyee Cheung
e8bedd2009
src: split RunBootstrapping()
...
Split `RunBootstrapping()` into `BootstrapInternalLoaders()`
and `BootstrapNode()` from so the two can be snapshotted
incrementally.
PR-URL: https://github.com/nodejs/node/pull/27539
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-06-17 19:49:42 +02:00
Joyee Cheung
c20c6e55b5
src: reorganize inspector and diagnostics initialization
...
- Split the initialization of the inspector and other diagnostics
into `Environment::InitializeInspector()` and
`Environment::InitializeDiagnostics()` - these need to be
reinitialized separately after snapshot deserialization.
- Do not store worker url alongside the inspector parent handle,
instead just get it from the handle.
- Rename `Worker::profiler_idle_notifier_started_` to
`Worker::start_profiler_idle_notifier_` because it stores
the state inherited from the parent env to use for initializing
itself.
PR-URL: https://github.com/nodejs/node/pull/27539
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-06-17 19:49:42 +02:00
Joyee Cheung
c086736a49
src: create Environment properties in Environment::CreateProperties()
...
Move creation of `env->as_callback_data()`, `env->primordials()`
and `env->process()` into `Environment::CreateProperties()` and
call it in the `Environment` constructor - this can be replaced with
deserialization when we snapshot the per-environment properties
after the instantiation of `Environment`.
PR-URL: https://github.com/nodejs/node/pull/27539
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-06-17 19:49:41 +02:00
Joyee Cheung
70f8e71a0d
src: inline ProcessCliArgs in the Environment constructor
...
Inline `ProcessCliArgs()` in the `Environment` constructor, and
emit the `Environment` creation trace events with the arguments
earlier. Remove the unused arguments passed to `CreateProcessObject()`
since these are now attached to process in `PatchProcessObject()`
during pre-execution instead.
PR-URL: https://github.com/nodejs/node/pull/27539
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-06-17 19:49:41 +02:00
Aleksei Koziatinskii
f8c9a58bf5
inspector: added --inspect-publish-uid
...
This flag specifies how inspector websocket url should be reported.
Tthre options are supported:
- stderr - reports websocket as a message to stderr,
- http - exposes /json/list endpoint that contains inspector websocket
url,
- binding - require('inspector').url().
Related discussion: https://github.com/nodejs/diagnostics/issues/303
PR-URL: https://github.com/nodejs/node/pull/27741
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2019-06-17 19:49:40 +02:00
Michaël Zasso
40a1a11542
deps: patch V8 to be API/ABI compatible with 7.4
...
Reverts https://github.com/v8/v8/commit/1b51dca30d697a448f70fdf3e11c8491b122f4ee
Reverts https://github.com/v8/v8/commit/1ab717db8495b4ad40d2754dd0ba2b339c9c80a4
Partially reverts https://github.com/v8/v8/commit/b0077b3b50e551a10d8ef4fabfe18f9005494b5a
PR-URL: https://github.com/nodejs/node/pull/28005
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2019-06-04 18:47:14 +02:00
Refael Ackermann
92d1ca9645
test: fail test-worker-prof on internal timeout
...
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:46:17 +02:00
Refael Ackermann
ab1a4eb12d
test: drain platform before unregistering isolate
...
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:46:14 +02:00
Michaël Zasso
ad3a164ec3
deps: bump minimum icu version to 64
...
Bump minimum version of ICU needed to build node to 64.
Refs: https://github.com/v8/v8/commit/ccbe3d07fbac807e15c524257f3e79e04492f9cf
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:46:09 +02:00
Refael Ackermann
e4aa869726
deps: V8: backport 3a75c1f
...
Original commit message:
Fixing a possible freeze on abort with 'v8_win64_unwinding_info'
Win64 unwind data can specify a language-specific handler function which is
called as part of the search for an exception handler, as described in
https://docs.microsoft.com/en-us/cpp/build/exception-handling-x64?view=vs-2019 .
This is used for example by Crashpad to register its own exception handler for
exceptions in V8-generated code.
There is a problem in the code that may cause a freeze on abort: in file
\deps\v8\src\unwinding-info-win64.cc in function CRASH_HANDLER_FUNCTION_NAME the
line:
return EXCEPTION_CONTINUE_SEARCH;
should be
return ExceptionContinueSearch;
These constants are both used in the context of Win32 exception handlers, but
they have different semantics and unfortunately different values:
EXCEPTION_CONTINUE_SEARCH (=0) should be returned by an exception filter
while a language-specific handler should return an EXCEPTION_DISPOSITION value,
and more precisely ExceptionContinueSearch (=1) in this case.
Bug: v8:9295
Change-Id: I1a3aaabf357e52a909611814f1ea013cf652ae06
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1629795
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org >
Commit-Queue: Paolo Severini <paolosev@microsoft.com >
Cr-Commit-Position: refs/heads/master@{#61867}
Refs: https://github.com/v8/v8/commit/3a75c1fb577d7bb1499cc20e98f580d3d3bc0a2f
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:46:05 +02:00
Refael Ackermann
bb729a415a
deps: V8: fix BUILDING_V8_SHARED issues
...
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:46:02 +02:00
Refael Ackermann
f8a33abe0c
deps: V8: workaround for MSVC 14.20 optimizer bug
...
Refs: https://developercommunity.visualstudio.com/content/problem/512352/compiler-doesnt-finish-142027508.html
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:45:59 +02:00
Refael Ackermann
0a5ff4cb33
deps: V8: template explicit instantiation for GCC-8
...
Fails to link for missing:
void JSObject::ApplyAttributesToDictionary<NumberDictionary>(...)
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:45:56 +02:00
Refael Ackermann
b411114a52
deps: V8: use ATOMIC_VAR_INIT instead of std::atomic_init
...
`std::atomic_init<size_t>` is not implemented in all platforms.
* pragma to ignore `-Wbraced-scalar-init`
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:45:53 +02:00
Refael Ackermann
c08d94baef
deps: V8: forward declaration of Rtl*FunctionTable
...
This should be semver-patch since actual invocation is version
conditional.
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:45:50 +02:00
Refael Ackermann
445bb81ab6
deps: V8: patch register-arm64.h
...
Fixes a compilation issue on some platforms
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:45:46 +02:00
Michaël Zasso
fa6dfec186
deps: V8: backport f89e555
...
Original commit message:
[api] Fix compilation issue with macOS
Fixes the following error caught by the Node.js CI:
../deps/v8/src/api.cc:8943:10:
error: no viable conversion from returned value of type
'unique_ptr<v8::internal::MicrotaskQueue, default_delete<v8::internal::MicrotaskQueue>>'
to function return type
'unique_ptr<v8::MicrotaskQueue, default_delete<v8::MicrotaskQueue>>'
return microtask_queue;
^~~~~~~~~~~~~~~
Change-Id: Ic09dab46bb8f87a2b3b59f5836e0883bfe0e9681
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627533
Commit-Queue: Michaël Zasso <mic.besace@gmail.com >
Commit-Queue: Yang Guo <yangguo@chromium.org >
Reviewed-by: Yang Guo <yangguo@chromium.org >
Cr-Commit-Position: refs/heads/master@{#61789}
Refs: https://github.com/v8/v8/commit/f89e555956ff0155b2aee563987a077a0f7fdc19
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:45:43 +02:00
Benedikt Meurer
8b8fe87e54
deps: V8: cherry-pick cca9ae3c9a
...
Original commit message:
Remove recursion from NeedsCheckHeapObject.
We use the predicate NeedsCheckHeapObject in the compiler frontend to
determine whether we can skip introducing CheckHeapObject nodes. But
this predicate would also walk up the graph in case of Phis, which can
result in really long compilation times (on the main thread). In the
report in https://github.com/nodejs/node/issues/27667 , the compiler
frontend alone took around 4-5mins of main thread time for a single
function. With this patch the time goes down to 4-5ms.
Bug: v8:9250
Refs: nodejs/node#27667
Change-Id: I231eb780ff04f949fa1669714f9af6ebfbcade05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1612897
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org >
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org >
Cr-Commit-Position: refs/heads/master@{#61503}
Fixes: https://github.com/nodejs/node/issues/27667
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27729
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-06-04 18:45:39 +02:00
cjihrig
55e99448c8
deps: V8: update postmortem metadata generation script
...
Update postmortem metadata constants for V8 7.5 in Node.js.
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
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-06-04 18:45:36 +02:00
Michaël Zasso
2f92b15435
deps: V8: silence irrelevant warning
...
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
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-06-04 18:45:32 +02:00
Refael Ackermann
ca8e5aa77b
deps: V8: un-cherry-pick bd019bd
...
Original commit message:
[testrunner] delete ancient junit compatible format support
Testrunner has ancient support for JUnit compatible XML output.
This CL removes this old feature.
R=mstarzinger@chromium.org ,jgruber@chromium.org ,jkummerow@chromium.org
CC=machenbach@chromium.org
Bug: v8:8728
Change-Id: I7e1beb011dbaec3aa1a27398a5c52abdd778eaf0
Reviewed-on: https://chromium-review.googlesource.com/c/1430065
Reviewed-by: Jakob Gruber <jgruber@chromium.org >
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org >
Commit-Queue: Tamer Tas <tmrts@chromium.org >
Cr-Commit-Position: refs/heads/master@{#59045}
Refs: https://github.com/v8/v8/commit/bd019bdb725cebaa34327634d73936cd7003d17c
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
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-06-04 18:45:08 +02:00
Refael Ackermann
4a61bdbc1f
deps: V8: fix filename manipulation for Windows
...
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:45:05 +02:00
Refael Ackermann
018159d734
tools,gyp: introduce MSVS 2019
...
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:45:00 +02:00
5101e4c2a2
build,v8: sync V8 gypfiles with 7.5
...
Co-authored-by: Ujjwal Sharma <usharma1998@gmail.com >
Co-authored-by: Michaël Zasso <targos@protonmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:44:56 +02:00
Refael Ackermann
21bcfb67f6
build: reset embedder string to "-node.0"
...
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:44:51 +02:00
Refael Ackermann
86a8bb7612
deps: update V8 to 7.5.288.22
...
Backport-PR-URL: https://github.com/nodejs/node/pull/28005
PR-URL: https://github.com/nodejs/node/pull/27375
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-04 18:44:21 +02:00
Michaël Zasso
fee23beec2
Working on v12.4.1
...
PR-URL: https://github.com/nodejs/node/pull/28040
2019-06-04 15:57:37 +02:00
Michaël Zasso
6421974121
2019-06-04, Version 12.4.0 (Current)
...
Notable changes:
* doc:
* The JSON variant of the API documentation is no longer experimental
(Rich Trott) https://github.com/nodejs/node/pull/27842 .
* esm:
* JSON module support is always enabled under
`--experimental-modules`. The `--experimental-json-modules` flag
has been removed (Myles Borins)
https://github.com/nodejs/node/pull/27752 .
* http,http2:
* A new flag has been added for overriding the default HTTP server
socket timeout (which is two minutes). Pass
`--http-server-default-timeout=milliseconds`
or `--http-server-default-timeout=0` to respectively change or
disable the timeout. Starting with Node.js 13.0.0, the timeout will
be disabled by default
(Ali Ijaz Sheikh) https://github.com/nodejs/node/pull/27704 .
* inspector:
* Added an experimental `--heap-prof` flag to start the V8 heap
profiler on startup and write the heap profile to disk before exit
(Joyee Cheung) https://github.com/nodejs/node/pull/27596 .
* stream:
* The `readable.unshift()` method now correctly converts strings to
buffers. Additionally, a new optional argument is accepted to
specify the string's encoding, such as `'utf8'` or `'ascii'`
(Marcos Casagrande) https://github.com/nodejs/node/pull/27194 .
* v8:
* The object returned by `v8.getHeapStatistics()` has two new
properties: `number_of_native_contexts` and
`number_of_detached_contexts` (Yuriy Vasiyarov)
https://github.com/nodejs/node/pull/27933 .
PR-URL: https://github.com/nodejs/node/pull/28040
v12.4.0
2019-06-03 14:16:07 +02:00
Aleksei Koziatinskii
23119cacf8
inspector: supported NodeRuntime domain in worker
...
NodeRuntime domain was introduced to give inspector client way to
fetch captured information before Node process is gone. We need
similar capability for work.
With current protocol inspector client can force worker to wait
on start by passing waitForDebuggerOnStart flag to NodeWorker.enable
method. So client has some time to setup environment, e.g. start
profiler. At the same time there is no way to prevent worker from
being terminated. So we can start capturing profile but we can not
reliably get captured data back.
This PR implemented NodeRuntime.notifyWhenWaitingForDisconnect
method for worker. When NodeRuntime.waitingForDisconnect notification
is enabled, worker will wait for explicit NodeWorker.detach call.
With this PR worker tooling story is nicely aligned with main thread
tooling story. The only difference is that main thread by default is
waiting for disconnect but worker thread is not waiting.
Issue: https://github.com/nodejs/node/issues/27677
PR-URL: https://github.com/nodejs/node/pull/27706
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
2019-06-03 13:14:25 +02:00
Rich Trott
6a5ce36fb8
test: handle unknown message type in worker threads
...
Check that main thread handles an unknown message type from a worker
thread as expected.
PR-URL: https://github.com/nodejs/node/pull/27995
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-06-03 13:14:25 +02:00
Rich Trott
182725651b
test: add coverage for unserializable worker thread error
...
Check that the main thread handles unserializable errors in a worker
thread as expected.
PR-URL: https://github.com/nodejs/node/pull/27995
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-06-03 13:14:25 +02:00
Marcos Casagrande
a47ee80114
stream: convert string to Buffer when calling unshift(<string>)
...
`readable.unshift` can take a string as an argument, but that
string wasn't being converted to a Buffer, which caused a
<TypeError: Argument must be a buffer> in some cases. Also if a
string was passed, that string was coerced to utf8 encoding.
A second optional argument `encoding` was added to `unshift` to
fix the encoding issue.
Fixes: https://github.com/nodejs/node/issues/27192
PR-URL: https://github.com/nodejs/node/pull/27194
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-03 13:14:24 +02:00
Daniel Nalborczyk
887dd604f1
test: simplify fs promises test
...
Simplify test, fix comment.
PR-URL: https://github.com/nodejs/node/pull/27242
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-03 13:14:24 +02:00
himself65
ea2d550507
child_process: move exports to bottom for consistent code style
...
PR-URL: https://github.com/nodejs/node/pull/27845
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-06-03 13:14:07 +02:00
Refael Ackermann
2ce24a9452
tools: fix js2c regression
...
PR-URL: https://github.com/nodejs/node/pull/27980
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2019-06-02 15:15:25 +02:00
Alex Temny
ef25ac5223
doc: clarify wording in modules.md
...
This is a minor clarification in two places in modules.md.
PR-URL: https://github.com/nodejs/node/pull/27853
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-02 15:15:25 +02:00
Keroosha
9229825496
test: covering destroying when worker already disconnected
...
This test covers 374 line in lib/internal/cluster/master
that was uncovered by previous tests
PR-URL: https://github.com/nodejs/node/pull/27896
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-06-02 15:15:25 +02:00
Rich Trott
c683cd99d7
doc: improve explanation for directory with fs.rename()
...
PR-URL: https://github.com/nodejs/node/pull/27963
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-06-02 15:15:24 +02:00
Ben Noordhuis
89483be254
inspector: more conservative minimum stack size
...
PTHREAD_STACK_MIN is 2 KB with musl, which is too small to safely
receive signals. PTHREAD_STACK_MIN + MINSIGSTKSZ is 8 KB on arm64,
which is the musl architecture with the biggest MINSIGSTKSZ so let's
use that as a lower bound and let's quadruple it just in case.
PR-URL: https://github.com/nodejs/node/pull/27855
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-02 15:15:24 +02:00
Robert Nagy
d948656635
http: fix deferToConnect comments
...
PR-URL: https://github.com/nodejs/node/pull/27876
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-02 15:15:24 +02:00
Refael Ackermann (רפאל פלחי)
18650579e8
meta: correct personal info
...
PR-URL: https://github.com/nodejs/node/pull/27940
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2019-06-02 15:15:24 +02:00
Anatoli Papirovski
24eaeed393
http: fix socketOnWrap edge cases
...
Properly handle prependListener wrapping on http server
socket, in addition to on and addListener.
PR-URL: https://github.com/nodejs/node/pull/27968
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-02 15:15:23 +02:00
Kyle Zhang
70b485478c
doc: fix the wrong name of AssertionError
...
err.name of AssertionError should be 'AssertionError'
PR-URL: https://github.com/nodejs/node/pull/27982
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-02 15:15:23 +02:00
Rich Trott
11c3ddb4cb
doc: simplify system call material in doc overview
...
PR-URL: https://github.com/nodejs/node/pull/27966
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-06-02 15:15:23 +02:00
cjihrig
799aeca134
http2: respect inspect() depth
...
This commit causes Http2Stream and Http2Session to account
for inspect() depth.
PR-URL: https://github.com/nodejs/node/pull/27983
Fixes: https://github.com/nodejs/node/issues/27976
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-06-02 15:15:23 +02:00
Luigi Pinca
8b38dfbf39
http: call write callback even if there is no message body
...
Ensure that the callback of `OutgoingMessage.prototype.write()` is
called when `outgoingMessage._hasBody` is `false` (HEAD method, 204
status code, etc.).
Refs: https://github.com/nodejs/node/pull/27709
PR-URL: https://github.com/nodejs/node/pull/27777
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-01 18:29:47 +02:00
Refael Ackermann
9b08c458be
build,aix: link with noerrmsg to eliminate warnings
...
PR-URL: https://github.com/nodejs/node/pull/27773
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-06-01 18:29:47 +02:00
Ujjwal Sharma
10bdd13972
test: rename test-performance to test-perf-hooks
...
Rename test-performance to test-perf-hooks to better match its function
Refs: https://github.com/nodejs/node/pull/27884#issuecomment-497270542
PR-URL: https://github.com/nodejs/node/pull/27969
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-06-01 18:29:47 +02:00