summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* process: allow reading from stdout/stderr socketsAnna Henningsen2019-03-198-20/+35
| | | | | | | | | | | | | | | | | | Allow reading from stdio streams that are conventionally associated with process output, since this is only convention. This involves disabling the oddness around closing stdio streams. Its purpose is to prevent the file descriptors 0 through 2 from being closed, since doing so can lead to information leaks when new file descriptors are being opened; instead, not doing anything seems like a more reasonable choice. Fixes: https://github.com/nodejs/node/issues/21203 Backport-PR-URL: https://github.com/nodejs/node/pull/25351 PR-URL: https://github.com/nodejs/node/pull/23053 Reviewed-By: James M Snell <jasnell@gmail.com>
* tools: allow input for TTY testsAnna Henningsen2019-03-192-4/+21
| | | | | | | | | Since faking TTY input is not otherwise fake-able, we need support in the test runner for it. Backport-PR-URL: https://github.com/nodejs/node/pull/25351 PR-URL: https://github.com/nodejs/node/pull/23053 Reviewed-By: James M Snell <jasnell@gmail.com>
* build: set `-blibpath:` for AIXRichard Lau2019-03-191-2/+22
| | | | | | | | | | | | | https://github.com/nodejs/node/pull/17604 refactored the gyp files so that `-blibpath:` on AIX was only set if `node_shared=="true"`. Restore the setting for non-shared builds. Fixes: https://github.com/nodejs/node/issues/25444 Backport-PR-URL: https://github.com/nodejs/node/pull/25521 PR-URL: https://github.com/nodejs/node/pull/25447 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* test: fix module loading error for AIX 7.1Richard Lau2019-03-151-1/+2
| | | | | | | | | | | AIX 7.1 appears to return a different error message compared to AIX 6.1. PR-URL: https://github.com/nodejs/node/pull/25418 Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* test: mark test-cli-node-options flaky on armRich Trott2019-02-281-0/+2
| | | | | | | | | Refs: https://github.com/nodejs/node/issues/25028 PR-URL: https://github.com/nodejs/node/pull/25032 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
* test: mark test_threadsafe_function/test as flakyGireesh Punathil2019-02-281-0/+11
| | | | | | | | | | | | The test fails consistently on windows-fanned with vs2017. mark it as flaky while the issue is being progressed, and to keep CI green / amber. Ref: https://github.com/nodejs/node/issues/23621 Backport-PR-URL: https://github.com/nodejs/node/pull/25002 PR-URL: https://github.com/nodejs/node/pull/24714 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* n-api: add missing handle scopesDaniel Bevenius2019-02-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when building with --debug test/addons-napi/test_threadsafe_function will error: $ out/Debug/node test/addons-napi/test_threadsafe_function/test.js FATAL ERROR: v8::HandleScope::CreateHandle() Cannot create a handle without a HandleScope 1: 0x10004e287 node::DumpBacktrace(__sFILE*) [node/out/Debug/node] 2: 0x1000cd37b node::Abort() [/node/out/Debug/node] 3: 0x1000cd69f node::OnFatalError(char const*, char const*) [/node/out/Debug/node] 4: 0x1004df0b1 v8::Utils::ReportApiFailure(char const*, char const*) [/nodejs/node/out/Debug/node] 5: 0x100a8c0a9 v8::internal::HandleScope::Extend( v8::internal::Isolate*) [/node/out/Debug/node] 6: 0x1004e4229 v8::EmbedderDataFor(v8::Context*, int, bool, char const*) [/node/out/Debug/node] 7: 0x1004e43fa v8::Context::SlowGetAlignedPointerFromEmbedderData(int) [/node/out/Debug/node] 8: 0x10001c26b v8::Context::GetAlignedPointerFromEmbedderData(int) [/node/out/Debug/node] 9: 0x1000144ea node::Environment::GetCurrent(v8::Local<v8::Context>) [/node/out/Debug/node] 10: 0x1000f49e2 napi_env__::node_env() const [/node/out/Debug/node] 11: 0x1000f9885 (anonymous namespace)::v8impl::ThreadSafeFunction:: CloseHandlesAndMaybeDelete(bool) [/node/out/Debug/node] 12: 0x1000fb34f (anonymous namespace)::v8impl::ThreadSafeFunction:: DispatchOne() [/node/out/Debug/node] 13: 0x1000fb129 (anonymous namespace)::v8impl::ThreadSafeFunction:: IdleCb(uv_idle_s*) [/node/out/Debug/node] 14: 0x1011a1b69 uv__run_idle [/node/out/Debug/node] 15: 0x101198179 uv_run [/node/out/Debug/node] 16: 0x1000dfca1 node::Start(...) [/node/out/Debug/node] 17: 0x1000dae50 node::Start(...) [/node/out/Debug/node] 18: 0x1000da56f node::Start(int, char**) [/node/out/Debug/node] 19: 0x10141112e main [/node/out/Debug/node] 20: 0x100001034 start [/node/out/Debug/node] Abort trap: 6 This commit adds two HandleScope's, one to CloseHandlesAndMaybeDelete and one to the lambda. SlowGetAlignedPointerFromEmbedderData will only be called for debug builds: https://github.com/v8/v8/blob/2ef0aa662fe907a1b36ac1abe7d77ad2bcd27733 /include/v8.h#L10440-L10447 Backport-PR-URL: https://github.com/nodejs/node/pull/25002 PR-URL: https://github.com/nodejs/node/pull/24011 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* doc: fix optional parameters in n-api.mdLars-Magnus Skog2019-02-281-2/+2
| | | | | | | | | | The thread_finalize_data and thread_finalize_cb parameters in napi_create_threadsafe_function are optional. Backport-PR-URL: https://github.com/nodejs/node/pull/25002 PR-URL: https://github.com/nodejs/node/pull/22998 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
* n-api: clean up thread-safe functionGabriel Schulhof2019-02-281-353/+358
| | | | | | | | | | | | | * Move class `TsFn` to name space `v8impl` and rename it to `ThreadSafeFunction` * Remove `NAPI_EXTERN` from API declarations, because it's only needed in the header file. Backport-PR-URL: https://github.com/nodejs/node/pull/25002 PR-URL: https://github.com/nodejs/node/pull/22259 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* n-api: remove idle_running from TsFnLars-Magnus Skog2019-02-281-12/+6
| | | | | | | | | | | | The idle_running member variable in TsFn is always false and can therefore be removed. Backport-PR-URL: https://github.com/nodejs/node/pull/25002 PR-URL: https://github.com/nodejs/node/pull/22520 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Gus Caplan <me@gus.host>
* src: fix may be uninitialized warning in n-apiMichael Dawson2019-02-281-1/+1
| | | | | | | | | | | Backport-PR-URL: https://github.com/nodejs/node/pull/25002 PR-URL: https://github.com/nodejs/node/pull/21898 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* n-api: guard against cond null dereferenceGabriel Schulhof2019-02-283-29/+104
| | | | | | | | | | | | | | A condition variable is only created by the thread-safe function if the queue size is set to something larger than zero. This adds null-checks around the condition variable and tests for the case where the queue size is zero. Fixes: https://github.com/nodejs/help/issues/1387 PR-URL: https://github.com/nodejs/node/pull/21871 Backport-PR-URL: https://github.com/nodejs/node/pull/25002 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* n-api: fix compiler warningcjihrig2019-02-281-1/+0
| | | | | | | | | | private field 'async_context' is not used [-Wunused-private-field] PR-URL: https://github.com/nodejs/node/pull/21597 Refs: https://github.com/nodejs/node/pull/17887 Backport-PR-URL: https://github.com/nodejs/node/pull/25002 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
* n-api: add API for asynchronous functionsGabriel Schulhof2019-02-288-4/+1330
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bundle a `uv_async_t`, a `uv_idle_t`, a `uv_mutex_t`, a `uv_cond_t`, and a `v8::Persistent<v8::Function>` to make it possible to call into JS from another thread. The API accepts a void data pointer and a callback which will be invoked on the loop thread and which will receive the `napi_value` representing the JavaScript function to call so as to perform the call into JS. The callback is run inside a `node::CallbackScope`. A `std::queue<void*>` is used to store calls from the secondary threads, and an idle loop is started by the `uv_async_t` callback on the loop thread to drain the queue, calling into JS with each item. Items can be added to the queue blockingly or non-blockingly. The thread-safe function can be referenced or unreferenced, with the same semantics as libuv handles. Re: https://github.com/nodejs/help/issues/1035 Re: https://github.com/nodejs/node/issues/20964 Fixes: https://github.com/nodejs/node/issues/13512 Backport-PR-URL: https://github.com/nodejs/node/pull/25002 PR-URL: https://github.com/nodejs/node/pull/17887 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* test: fix test-repl-envvarsAnna Henningsen2019-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In 180f86507d496b11aa35b2df4594629a92cce329, the test was changed so that the `env` argument of `createInternalRepl()` also contained external environment variables, because keeping them can be necessary for spawning processes on some systems. However, this test does not spawn new processes, and relies on the fact that the environment variables it tests are not already set (and fails otherwise); therefore, reverting to the original state should fix this. Fixes: https://github.com/nodejs/node/issues/21451 Fixes: https://github.com/nodejs/build/issues/1377 Refs: https://github.com/nodejs/node/pull/25219 PR-URL: https://github.com/nodejs/node/pull/25226 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* doc: update the http.request.setTimeout docs to be accurateJames Bunton2019-02-281-2/+3
| | | | | | | | Refs: https://github.com/nodejs/node/pull/8895 PR-URL: https://github.com/nodejs/node/pull/25123 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* deps: cherry-pick 525b396 from V8 upstreamPeter Marshall2019-02-282-6/+11
| | | | | | | | | | | | | | | | | | | | | | | Original commit message: [cpu-profiler] Fix a leak caused by re-logging existing functions. Don't re-log all existing functions during StartProcessorIfNotStarted(). They will already be in the CodeMap attached to the ProfileGenerator and re-logging them causes leaks. See the linked bug for more details. Bug: v8:8253 Change-Id: Ibb1a1ab2431c588e8c3a3a9ff714767cdf61a88e Reviewed-on: https://chromium-review.googlesource.com/1256763 Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#56336} Refs: https://github.com/v8/v8/commit/525b39619548b4e7fbf48934acb18d3f209321db PR-URL: https://github.com/nodejs/node/pull/25041 Reviewed-By: Yang Guo <yangguo@chromium.org> Reviewed-By: Rod Vagg <rod@vagg.org>
* Working on v8.15.2Rod Vagg2019-02-281-2/+2
| | | | PR-URL: https://github.com/nodejs-private/node-private/pull/165
* 2019-02-28, Version 8.15.1 'Carbon' (LTS)v8.15.1Rod Vagg2019-02-283-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a security release. All Node.js users should consult the security release summary at: https://nodejs.org/en/blog/vulnerability/february-2019-security-releases/ for details on patched vulnerabilities. Fixes for the following CVEs are included in this release: * Node.js: Slowloris HTTP Denial of Service with keep-alive (CVE-2019-5737) * OpenSSL: 0-byte record padding oracle (CVE-2019-1559) Notable Changes: * deps: OpenSSL has been upgraded to 1.0.2r which contains a fix for CVE-2019-1559 (https://www.openssl.org/news/secadv/20190226.txt). Under certain circumstances, a TLS server can be forced to respond differently to a client if a zero-byte record is received with an invalid padding compared to a zero-byte record with an invalid MAC. This can be used as the basis of a padding oracle attack to decrypt data. * http: Further prevention of "Slowloris" attacks on HTTP and HTTPS connections by consistently applying the receive timeout set by `server.headersTimeout` to connections in keep-alive mode. Reported by Marco Pracucci (https://voxnest.com). (CVE-2019-5737 / Matteo Collina) PR-URL: https://github.com/nodejs-private/node-private/pull/165
* deps: add -no_rand_screen to openssl s_clientShigeki Ohtsu2019-02-282-2/+20
| | | | | | | | | | | | | In openssl s_client on Windows, RAND_screen() is invoked to initialize random state but it takes several seconds in each connection. This added -no_rand_screen to openssl s_client on Windows to skip RAND_screen() and gets a better performance in the unit test of test-tls-server-verify. Do not enable this except to use in the unit test. Fixes: https://github.com/nodejs/io.js/issues/1461 PR-URL: https://github.com/nodejs/io.js/pull/1836 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* openssl: fix keypress requirement in apps on win32Shigeki Ohtsu2019-02-281-7/+13
| | | | | | | | | Reapply b910613792dac946b295855963869933a9089044 . Fixes: https://github.com/iojs/io.js/issues/589 PR-URL: https://github.com/iojs/io.js/pull/1389 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* deps: fix asm build error of openssl in x86_win32Shigeki Ohtsu2019-02-281-6/+6
| | | | | | | | | | | | See https://mta.openssl.org/pipermail/openssl-dev/2015-February/000651.html iojs needs to stop using masm and move to nasm or yasm on Win32. Fixes: https://github.com/iojs/io.js/issues/589 PR-URL: https://github.com/iojs/io.js/pull/1389 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* deps: fix openssl assembly error on ia32 win32Fedor Indutny2019-02-281-1/+1
| | | | | | | | | | | `x86masm.pl` was mistakenly using .486 instruction set, why `cpuid` (and perhaps others) are requiring .686 . Fixes: https://github.com/iojs/io.js/issues/589 PR-URL: https://github.com/iojs/io.js/pull/1389 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
* deps: copy all openssl header files to include dirShigeki Ohtsu2019-02-2876-270/+38597
| | | | | | | All symlink files in `deps/openssl/openssl/include/openssl/` are removed and replaced with real header files to avoid issues on Windows. Two files of opensslconf.h in crypto and include dir are replaced to refer config/opensslconf.h.
* deps: upgrade openssl sources to 1.0.2rShigeki Ohtsu2019-02-28119-40168/+813
| | | | | This replaces all sources of openssl-1.0.2r.tar.gz into deps/openssl/openssl
* http: prevent slowloris with keepalive connectionsMatteo Collina2019-02-272-0/+73
| | | | | | | | Fixes: https://github.com/nodejs-private/security/issues/214 PR-URL: https://github.com/nodejs-private/node-private/pull/162 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* Working on v8.15.1Myles Borins2018-12-261-2/+2
| | | | PR-URL: https://github.com/nodejs/node/pull/25177
* 2018-12-26, Version 8.15.0 'Carbon' (LTS)v8.15.0v8.15.0-proposalMyles Borins2018-12-255-6/+32
| | | | | | | | | | | | | | | | | | The 8.14.0 security release introduced some unexpected breakages on the 8.x release line. This is a special release to fix a regression in the HTTP binary upgrade response body and add a missing CLI flag to adjust the max header size of the http parser. Notable changes: * cli: - add --max-http-header-size flag (cjihrig) https://github.com/nodejs/node/pull/24811 * http: - add maxHeaderSize property (cjihrig) https://github.com/nodejs/node/pull/24860 PR-URL: https://github.com/nodejs/node/pull/25177
* http: add maxHeaderSize propertycjihrig2018-12-253-0/+35
| | | | | | | | | | | | | This commit exposes the value of --max-http-header-size as a property of the http module. Backport-PR-URL: https://github.com/nodejs/node/pull/25218 PR-URL: https://github.com/nodejs/node/pull/24860 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* cli: add --max-http-header-size flagcjihrig2018-12-218-24/+183
| | | | | | | | | | | | | | | | Allow the maximum size of HTTP headers to be overridden from the command line. Backport-PR-URL: https://github.com/nodejs/node/pull/25171 co-authored-by: Matteo Collina <hello@matteocollina.com> PR-URL: https://github.com/nodejs/node/pull/24811 Fixes: https://github.com/nodejs/node/issues/24692 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
* deps: cherry-pick http_parser_set_max_header_sizecjihrig2018-12-212-4/+14
| | | | | | | | | | | | | | | | | | This commit adds http_parser_set_max_header_size() to the http-parser for overriding the compile time maximum HTTP header size. Backport-PR-URL: https://github.com/nodejs/node/pull/25171 PR-URL: https://github.com/nodejs/node/pull/24811 Fixes: https://github.com/nodejs/node/issues/24692 Refs: https://github.com/nodejs/http-parser/pull/453 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
* http: fix regression of binary upgrade response bodyMatteo Collina2018-12-211-3/+3
| | | | | | | See: https://github.com/nodejs/node/issues/24958 PR-URL: https://github.com/nodejs/node/pull/25037 Reviewed-By: Myles Borins <myles.borins@gmail.com>
* test: move test-benchmark-path to sequentialRich Trott2018-12-211-0/+0
| | | | | | | | | | Fixes: https://github.com/nodejs/node/issues/18254 PR-URL: https://github.com/nodejs/node/pull/21393 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
* test: mark test-http2-settings-flood as flaky on WindowsRich Trott2018-12-211-0/+2
| | | | | | Refs: https://github.com/nodejs/node/issues/25043 PR-URL: https://github.com/nodejs/node/pull/25048 Reviewed-By: Myles Borins <myles.borins@gmail.com>
* Working on v8.14.2Myles Borins2018-12-181-2/+2
| | | | PR-URL: https://github.com/nodejs/node/pull/24832
* 2018-12-18, Version 8.14.1 'Carbon' (LTS)v8.14.1v8.14.1-proposalBeth Griggs2018-12-184-4/+106
| | | | | | | | | | | | | Notable changes: * **assert**: - revert breaking change (Ruben Bridgewater) [#24786](https://github.com/nodejs/node/pull/24786) * **http2**: - fix sequence of error/close events (Gerhard Stoebich) [#24789](https://github.com/nodejs/node/pull/24789) PR-URL: https://github.com/nodejs/node/pull/24832
* http2: fix sequence of error/close eventsGerhard Stoebich2018-12-112-7/+5
| | | | | | | | | | | | | Correct sequence of emitting `error` and `close` events for a `Http2Stream`. PR-URL: https://github.com/nodejs/node/pull/24789 Refs: https://github.com/nodejs/node/pull/22850 Refs: https://github.com/nodejs/node/pull/24685 Fixes: https://github.com/nodejs/node/issues/24559 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
* test: verify order of error in h2 server streamMyles Borins2018-12-111-0/+43
| | | | | | | | | | | Currently the order of error / closing of an h2 stream is consistent in 10.x, 11.x, and master. There appears to be an unexpected behavior difference in 8.x. This test will be used to bisect the commit that will fix this behavior change and ensure there are no future regressions. PR-URL: https://github.com/nodejs/node/pull/24685 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* assert: revert breaking changeRuben Bridgewater2018-12-113-3/+3
| | | | | | | | | | It was not intended to change the `assert.doesNotThrow()` message with https://github.com/nodejs/node/pull/23223. This reverts the breaking behavior to the one before. PR-URL: https://github.com/nodejs/node/pull/24786 Refs: https://github.com/nodejs/node/pull/23223 Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
* doc: add description for inspector-only console methods.Benjamin Zaslavsky2018-12-101-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | Description inspired by dev tools reference and inspector err messages Added: * intro * console.debug() * console.dirxml() * console.markTimeline() * console.profile() * console.profileEnd() * console.table() * console.timeStamp() * console.timeline() * console.timelineEnd() PR-URL: https://github.com/nodejs/node/pull/17004 Fixes: https://github.com/nodejs/node/issues/16755 Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* doc: fix api documentation of http.createServerAri Autio2018-12-101-13/+2
| | | | | | | | Fixes: https://github.com/nodejs/node/issues/24105 PR-URL: https://github.com/nodejs/node/pull/24869 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
* test: test process.setuid for bad argument typesDivyanshu Singh2018-12-041-0/+4
| | | | | | | | | | | | Test process.setuid with an object as an argument. An equivalent test exists for process.seteuid. PR-URL: https://github.com/nodejs/node/pull/19703 Fixes: https://github.com/nodejs/node/issues/19591 Reviewed-By: Gireesh Punathil <gpunathi@in.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>
* test: improve assert messagefatahn2018-12-041-2/+2
| | | | | | | | | | Use the default assert.strictEqual() message so that unequal values are shown in the event of an AssertionError. PR-URL: https://github.com/nodejs/node/pull/19629 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
* test: remove third argument from call to assert.strictEqual()Forrest Wolf2018-12-041-2/+3
| | | | | | | | | | | | | | Remove the message argument from call to assert.strictEqual so that the AssertionError will report the value of er.code, and add a comment with the message. PR-URL: https://github.com/nodejs/node/pull/19659 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* doc: update to adding listens on SIGUSR1willhayslett2018-12-041-1/+1
| | | | | | | | | | | | | Updated the doc/api/process.md documentation to reflect that listening on SIGUSR1 could impact the debugger. Fixes: https://github.com/nodejs/node/issues/19619 PR-URL: https://github.com/nodejs/node/pull/19709 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
* test: fix flaky test-cluster-send-handle-twiceRich Trott2018-12-041-4/+3
| | | | | | | | | | | | | | | | | Use `common.mustCall()` to make sure connection callback runs exactly once. Use `connect` event instead of `setTimeout` to avoid test failing if timer runs before client is connected. Remove `cluster.worker.disconnect()` after `assert.fail()`. It is unreachable code that is unnecessary. PR-URL: https://github.com/nodejs/node/pull/19700 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* doc: remove "if provided" for optional argumentsRich Trott2018-12-041-4/+4
| | | | | | | | | | | | | | | Remove "if provided" when discussing arguments that are explicitly indicated to be optional and have default values. PR-URL: https://github.com/nodejs/node/pull/19690 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* doc: do not identify string as "JavaScript string"Rich Trott2018-12-041-4/+4
| | | | | | | | | | | | | | | A parameter that is explicitly identified as a string does not need to be further specified in the text as a "JavaScript string". Remove the type altogether as it is indicated in the argument description. PR-URL: https://github.com/nodejs/node/pull/19689 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* test: rename regression tests more expressivelyUjjwal Sharma2018-12-043-13/+25
| | | | | | | | | | | - Rename test-fs-truncate-GH-6233 to test-fs-truncate-clear-file-zero - Rename test-process-exit-GH-12322 to test-process-exit-handler PR-URL: https://github.com/nodejs/node/pull/19668 Refs: https://github.com/nodejs/node/issues/19105 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* test: remove 3rd argument from assert.strictEqualArian Santrach2018-12-041-1/+2
| | | | | | | | | | | If there is an AssertionError, the string literal is printed and not the value of `r`. For debugging purposes, it is good to know if `r` is false or null or something else. PR-URL: https://github.com/nodejs/node/pull/19707 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>