Alexey Orlenko
ef56d47f50
doc: fix incorrect keyboard shortcut
...
This commit fixes an incorrect keyboard shortcut in
`doc/STYLE_GUIDE.md`: entering em-dashes is done via Alt+Shift+"-" on
macOS, not via Ctrl+Alt+"-". Besides that, Option is more canonical name
of Alt on Macs.
PR-URL: https://github.com/nodejs/node/pull/13134
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <mhdawson@ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-23 21:12:23 +02:00
Rich Trott
7c12d12ecf
test: confirm callback is invoked in fs test
...
Use common.mustCall() in test-fs-makeStatsCallback to confirm that the
callback is invoked.
PR-URL: https://github.com/nodejs/node/pull/13132
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <mhdawson@ibm.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-05-23 21:10:02 +02:00
Rich Trott
b5b6f5d6a9
test: check number of message events
...
When a no-op message event handler is used in a test, make it clear what
is expected by using `common.mustCall()` and `common.mustNotCall()`.
PR-URL: https://github.com/nodejs/node/pull/13125
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <mhdawson@ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-05-23 21:08:22 +02:00
Michael Dawson
47919b3b6f
test: increase n-api constructor coverage
...
Add tests to validate that properties marked as static
are available through the class as opposed to instances
PR-URL: https://github.com/nodejs/node/pull/13124
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Hitesh Kanwathirtha <digitalinfinity@gmail.com >
2017-05-23 21:05:30 +02:00
Michael Dawson
f3ef9719b5
doc: fix title/function name mismatch
...
Fix mismatch in title for napi_get_value_string_utf16
Fixes: https://github.com/nodejs/abi-stable-node/issues/243
PR-URL: https://github.com/nodejs/node/pull/13123
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-23 21:04:11 +02:00
Marcel Laverdet
e018c33111
vm: fix race condition with timeout param
...
This fixes a race condition in the watchdog timer used for vm timeouts.
The condition would terminate the main stack's execution instead of the
code running under the sandbox.
PR-URL: https://github.com/nodejs/node/pull/13074
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-05-23 21:00:40 +02:00
Marcel Laverdet
3c5bfba28b
vm: fix displayErrors in runIn.. functions
...
This option has been broken for almost a year when used with any of the
vm.runIn.. family of functions, except for syntax errors.
PR-URL: https://github.com/nodejs/node/pull/13074
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-05-23 20:59:24 +02:00
Sam Roberts
a886b17bfb
src: redirect-warnings to file, not path
...
Use `file` as name of the argument, as the CLI documentation does.
PR-URL: https://github.com/nodejs/node/pull/13120
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-05-23 20:55:03 +02:00
Anna Henningsen
02bf16e5ae
doc: link to common docs in test writing guide
...
PR-URL: https://github.com/nodejs/node/pull/13118
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Michael Dawson <mhdawson@ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-05-23 20:53:50 +02:00
Brian White
359ea2a0bd
stream: improve readable push performance
...
PR-URL: https://github.com/nodejs/node/pull/13113
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-05-23 20:50:22 +02:00
Ebrahim Byagowi
594b5d7b89
cmd: support dash as stdin alias
...
PR-URL: https://github.com/nodejs/node/pull/13012
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-23 20:41:13 +02:00
Rod Vagg
7a1dc1fba3
build: avoid /docs/api and /docs/doc/api upload
...
Fixes: https://github.com/nodejs/node/issues/12833
PR-URL: https://github.com/nodejs/node/pull/12957
Reviewed-By: João Reis <reis@janeasystems.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Michael Dawson <mhdawson@ibm.com >
2017-05-23 20:37:13 +02:00
Daniel Bevenius
4f4184c10b
crypto: remove unnecessary template class
...
I came across this template class but I don't understand why it is
there. It is not used in the template specialization following it.
I just wanted to bring it up just in case this is something that
has been overlooked.
PR-URL: https://github.com/nodejs/node/pull/12993
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-23 20:23:34 +02:00
Evan Lucas
2cf4882136
test: add regression test for immediate socket errors
...
This test ensures that a http client request with the default agent
that has a socket that is immediately destroyed can still be caught by
adding an error event listener to the request object.
PR-URL: https://github.com/nodejs/node/pull/12854
Fixes: https://github.com/nodejs/node/issues/12841
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-05-23 13:20:03 -05:00
Evan Lucas
ba0dbaa193
Revert "net: remove unnecessary process.nextTick()"
...
This reverts commit 571882c5a4 .
Removing the process.nextTick() call can prevent the consumer
from being able to catch error events.
PR-URL: https://github.com/nodejs/node/pull/12854
Fixes: https://github.com/nodejs/node/issues/12841
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-05-23 13:20:03 -05:00
Eugene Ostroukhov
60390cd7fb
inspector: JavaScript bindings for the inspector
...
PR-URL: https://github.com/nodejs/node/pull/12263
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Josh Gavant <josh.gavant@outlook.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-05-23 19:45:48 +02:00
Kat Marchán
c0d858f8bb
deps: upgrade npm beta to 5.0.0-beta.56
...
PR-URL: https://github.com/nodejs/node/pull/12936
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-05-23 19:39:43 +02:00
Kat Marchán
994617370e
tools: update test-npm.sh paths
...
PR-URL: https://github.com/nodejs/node/pull/12936
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-05-23 19:39:09 +02:00
Faiz Halde
425aba4f36
errors: AssertionError moved to internal/error
...
AssertionError class is moved to interna/error
in reference to the TODO in assert.js. This was
suggested to get rid of the cyclic dependency
between assert.js and internal/error.js
PR-URL: https://github.com/nodejs/node/pull/12906
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-23 07:43:53 -07:00
Daniel Pihlstrom
9836cf5717
lib: lazy instantiation of fs.Stats dates
...
The method used has code duplication but is the most performant
PR-URL: https://github.com/nodejs/node/pull/12818
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-05-23 09:51:38 -04:00
Daniel Bevenius
485be99e68
test: add hasCrypto check to async-wrap-GH13045
...
This test currently fails if node was configured --without-ssl. This
commit adds crypto check and skips this test if crypto support is
not available.
PR-URL: https://github.com/nodejs/node/pull/13141
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-23 08:36:19 +02:00
Brian White
3774c99f66
http: fix IPv6 Host header check
...
PR-URL: https://github.com/nodejs/node/pull/13122
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-05-22 23:04:33 -04:00
Brian White
ed365653f6
http,https: avoid instanceof for WHATWG URL
...
PR-URL: https://github.com/nodejs/node/pull/12983
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-05-22 18:07:27 -04:00
Brian White
dcc59f91c6
src: fix typo
...
PR-URL: https://github.com/nodejs/node/pull/13085
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ron Korving <ron@ronkorving.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-05-22 16:09:34 -04:00
Brian White
f529706eb0
src: remove unused parameters
...
PR-URL: https://github.com/nodejs/node/pull/13085
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ron Korving <ron@ronkorving.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-05-22 16:09:27 -04:00
Chris Young
c470f04f22
doc: list macOS as supporting filename argument
...
also added regression tests
PR-URL: https://github.com/nodejs/node/pull/13111
Fixes: https://github.com/nodejs/node/issues/13108
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
2017-05-22 15:55:08 -04:00
Eugene Ostroukhov
5c26378cb7
inspector: fix process._debugEnd() for inspector
...
This change ensures that the WebSocket server can be stopped
(and restarted if needed) buy calling process._debugEnd.
PR-URL: https://github.com/nodejs/node/pull/12777
Fixes: https://github.com/nodejs/node/issues/12559
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-05-22 11:18:31 -07:00
Sebastian Plesciuc
3429c90f42
test: fix sequential test-net-connect-local-error
...
Fixed sequential test-net-connect-local-error by swapping port
and localPort in net.connect options.
PR-URL: https://github.com/nodejs/node/pull/13064
Fixes: https://github.com/nodejs/node/issues/13055
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2017-05-22 14:11:57 -04:00
cjihrig
06f62eb384
src: assert that uv_async_init() succeeds
...
This commit fixes two coverity warnings for unchecked
return values.
Refs: https://github.com/nodejs/node/pull/13050
PR-URL: https://github.com/nodejs/node/pull/13116
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-22 12:00:16 -04:00
cjihrig
f8c617dbe2
stream: improve multiple callback error message
...
When a transform stream's callback is called more than once,
an error is emitted with a somewhat confusing message. This
commit hopes to improve the quality of the error message.
Fixes: https://github.com/nodejs/node/issues/12513
PR-URL: https://github.com/nodejs/node/pull/12520
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-05-22 11:54:53 -04:00
Artur Vieira
ad4765a326
test: remove common.PORT from dgram test
...
Remove common.PORT from
test-dgram-send-callback-buffer-length-empty-address to eliminate
possibility that a dynamic port used in another test will collide
with common.PORT.
PR-URL: https://github.com/nodejs/node/pull/12944
Refs: https://github.com/nodejs/node/issues/12376
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <mhdawson@ibm.com >
2017-05-22 12:48:26 +02:00
Artur Vieira
dd3c227796
test: bind to 0 in dgram-send-callback-buffer-length
...
Remove common.PORT from test-dgram-send-callback-buffer-length to
eliminate possibility that a dynamic port used in another test will
collide with common.PORT.
PR-URL: https://github.com/nodejs/node/pull/12943
Refs: https://github.com/nodejs/node/issues/12376
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <mhdawson@ibm.com >
2017-05-22 12:26:34 +02:00
Artur Vieira
281de19a8c
test: use dynamic port in test-dgram-send-address-types
...
Remove common.PORT from test-dgram-send-address-types to eliminate
possibility that a dynamic port used in another test will collide
with common.PORT.
PR-URL: https://github.com/nodejs/node/pull/13007
Refs: https://github.com/nodejs/node/issues/12376
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-22 09:52:56 +02:00
Artur Vieira
e00116d2c4
test: use dynamic port in test-dgram-send-callback-buffer
...
Replace common.PORT with available port assigned by the operating
system in test-dgram-send-callback-buffer.
PR-URL: https://github.com/nodejs/node/pull/12942
Refs: https://github.com/nodejs/node/issues/12376
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <mhdawson@ibm.com >
2017-05-22 08:53:45 +02:00
Artur Vieira
4c847347c3
test: replace common.PORT in dgram test
...
Replace common.PORT with available port assigned by the operating
system in test-dgram-send-callback-buffer-empty-address.
PR-URL: https://github.com/nodejs/node/pull/12929
Refs: https://github.com/nodejs/node/issues/12376
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-05-22 08:38:57 +02:00
Matteo Collina
330c8d743e
stream: add destroy and _destroy methods.
...
Adds destroy() and _destroy() methods to Readable, Writable, Duplex
and Transform. It also standardizes the behavior and the implementation
of destroy(), which has been inconsistent in userland and core.
This PR also updates all the subsystems of core to use the new
destroy().
PR-URL: https://github.com/nodejs/node/pull/12925
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-22 08:34:14 +02:00
Daniel Bevenius
d54ec726cc
src: remove unnecessary forward declaration
...
I can't see that the forward declaration of class Connection is needed
and wanted to raise this in case it was overlooked after a previous
change.
PR-URL: https://github.com/nodejs/node/pull/13081
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-22 07:41:30 +02:00
Daniel Bevenius
57f38c6732
src: check IsConstructCall in TLSWrap constructor
...
Currently it is possible to call TLSWrap() without using new and the
following error message:
FATAL ERROR: v8::Object::SetAlignedPointerInInternalField() Internal
field out of bounds
1: node::Abort()
[/Users/danielbevenius/work/nodejs/node/out/Debug/node]
2: node::OnFatalError(char const*, char const*)
[/Users/danielbevenius/work/nodejs/node/out/Debug/node]
3: v8::Utils::ReportApiFailure(char const*, char const*)
[/Users/danielbevenius/work/nodejs/node/out/Debug/node]
4: v8::Utils::ApiCheck(bool, char const*, char const*)
[/Users/danielbevenius/work/nodejs/node/out/Debug/node]
5: v8::InternalFieldOK(v8::internal::Handle<v8::internal::JSReceiver>,
int, char const*)
[/Users/danielbevenius/work/nodejs/node/out/Debug/node]
6: v8::Object::SetAlignedPointerInInternalField(int, void*)
[/Users/danielbevenius/work/nodejs/node/out/Debug/node]
7: node::TLSWrap::Initialize(v8::Local<v8::Object>,
v8::Local<v8::Value>,
v8::Local<v8::Context>)::$_0::operator()(v8::FunctionCallbackInfo<v8::Value>
const&) const [/Users/danielbevenius/work/nodejs/node/out/Debug/node]
This commit adds a IsConstructCall check which will produce the
following error message:
/Users/danielbevenius/work/nodejs/node/out/Debug/node[2212]:
../src/tls_wrap.cc:936:auto node::TLSWrap::Initialize(Local<v8::Object>,
Local<v8::Value>, Local<v8::Context>)::(anonymous
class)::operator()(const FunctionCallbackInfo<v8::Value> &) const:
Assertion `args.IsConstructCall()' failed.
1: node::Abort()
[/Users/danielbevenius/work/nodejs/node/out/Debug/node]
2: node::Assert(char const* const (*) [4])
[/Users/danielbevenius/work/nodejs/node/out/Debug/node]
3: node::TLSWrap::Initialize(v8::Local<v8::Object>,
v8::Local<v8::Value>,
v8::Local<v8::Context>)::$_0::operator()(v8::FunctionCallbackInfo<v8::Value>
const&) const [/Users/danielbevenius/work/nodejs/node/out/Debug/node]
PR-URL: https://github.com/nodejs/node/pull/13097
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-22 07:31:04 +02:00
Daniel Bevenius
762b0358b3
src: remove unnecessary return statement
...
I think the code would be a little clearer if the return statement
was removed here since End() does not return any value and neither
does ParseHeader.
PR-URL: https://github.com/nodejs/node/pull/13094
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-22 07:22:51 +02:00
Daniel Bevenius
7a15eefbba
src: remove unused node_buffer.h include
...
I can't find any usage of Buffer in this file and think the include
can be removed.
PR-URL: https://github.com/nodejs/node/pull/13095
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-22 05:45:45 +02:00
Rich Trott
8e47600aab
test: allow for absent nobody user in setuid test
...
Some isolated build or test VMs don't have a "nobody" user, causing the
parallel/test-process-setuid-setgid test to fail. Add logic to allow for
that situation.
PR-URL: https://github.com/nodejs/node/pull/13112
Fixes: https://github.com/nodejs/node/issues/13071
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-05-21 20:09:10 -07:00
Rich Trott
c3067b5640
benchmark: allow no duration in benchmark tests
...
Imprecision in process.hrtime() in some situations can result in a zero
duration being used as a denominator in benchmark tests. This would
almost certainly never happen in real benchmarks. It is only likely in
very short benchmarks like the type we run in our test suite to just
make sure that the benchmark code is runnable.
So, if the environment variable that we use in tests to indicate "allow
ludicrously short benchmarks" is set, convert a zero duration for
a benchmark to 1 nano-second.
PR-URL: https://github.com/nodejs/node/pull/13110
Fixes: https://github.com/nodejs/node/issues/13102
Fixes: https://github.com/nodejs/node/issues/12433
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-05-21 20:05:13 -07:00
Rich Trott
171a43a986
test: shorten test-benchmark-http
...
Add `--set key=""` to cut down the time it takes to run
test-benchmark-http by about a third.
Alphabetize options in `--set` list.
PR-URL: https://github.com/nodejs/node/pull/13109
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-05-21 19:59:34 -07:00
Alexey Orlenko
9e4660b518
zlib: fix node crashing on invalid options
...
This commit fixes the Node process crashing when constructors of classes
of the zlib module are given invalid options.
* Throw an Error when the zlib library rejects the value of windowBits,
instead of crashing with an assertion.
* Treat windowBits and memLevel options consistently with other ones and
don't crash when non-numeric values are given.
* Fix bugs in the validation logic:
- Don't conflate 0 and undefined when checking if a field of an
options object exists.
- Treat NaN and Infinity values the same way as values of invalid
types instead of allowing to actually set zlib options to NaN or
Infinity.
PR-URL: https://github.com/nodejs/node/pull/13098
Fixes: https://github.com/nodejs/node/issues/13082
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2017-05-22 01:10:44 +03:00
Shadowbeetle
6fb27af70a
async_hooks: add constructor check to async-hooks
...
This fixes the async_hooks.AsyncHook constructor such that it throws an
error when provided with falsy values other than undefined.
PR-URL: https://github.com/nodejs/node/pull/13096
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
2017-05-21 22:04:15 +02:00
Artur Vieira
ef71824740
doc: edit Error.captureStackTrace html comment
...
Edit to the comment in the stack trace capture, highlighting the use of
the constructorOpt argument in errors.md
Fixes: https://github.com/nodejs/node/issues/12289
PR-URL: https://github.com/nodejs/node/pull/12962
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben.bridgewater@fintura.de >
2017-05-21 21:36:07 +02:00
XadillaX
2b541471db
dns: fix resolve failed starts without network
...
Fix the bug that you start process without network at first, but it
connected lately, `dns.resolve` will stay failed with ECONNREFUSED
because c-ares servers fallback to 127.0.0.1 at the very beginning.
If c-ares servers "127.0.0.1" is detected and its not set by user self,
and last query is not OK, recreating `ares_channel` operation will be
triggered to reload servers.
Fixes: https://github.com/nodejs/node/issues/1644
PR-URL: https://github.com/nodejs/node/pull/13076
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-05-21 15:48:35 +02:00
Rich Trott
595e5e3b23
test: port disabled readline test
...
Port the disabled readline test to make it runnable in our usual test
suite.
PR-URL: https://github.com/nodejs/node/pull/13091
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-20 22:11:29 -07:00
Daijiro Wachi
bfade5aacd
doc: remove unused/duplicated reference links
...
PR-URL: https://github.com/nodejs/node/pull/13066
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-05-21 00:10:47 +02:00
Myles Borins
8250bfd1e5
fs: Revert throw on invalid callbacks
...
This reverts 4cb5f3daa3
Based on community feedback I think we should consider reverting this
change. We should explore how this could be solved via linting rules.
Refs: https://github.com/nodejs/node/pull/12562
PR-URL: https://github.com/nodejs/node/pull/12976
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-05-20 10:21:34 -04:00