Commit Graph
17554 Commits
Author SHA1 Message Date
Rod Vagg 77dfa2b1da 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-28 07:00:35 -07:00
Anna Henningsen 6d5ca4feb0 v8: backport pieces of dab18fb0bbcdd
Backport ABI-incompatible changes from
dab18fb0bbcdd (“Make idle tasks optional in the default platform.”).

Ref: https://codereview.chromium.org/2737743002
Ref: https://github.com/v8/v8/commit/dab18fb0bbcdd

PR-URL: https://github.com/nodejs/node/pull/12875
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-28 07:00:35 -07:00
Anna Henningsen 62eaa2a186 v8: do not test v8 with -Werror
PR-URL: https://github.com/nodejs/node/pull/12875
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-28 07:00:35 -07:00
Jochen Eisinger 6e1407c3b3 deps: backport 4fdf9fd4813 from upstream v8
Original commit message:

    Add documentation for FunctionCallbackInfo

    R=verwaest@chromium.org,haraken@chromium.org,yukishiino@chromium.org
    BUG=

    Change-Id: I273f5ce305f80b2aa5e9c8c42a6e8e5afc51a0a7
    Reviewed-on: https://chromium-review.googlesource.com/484422
    Reviewed-by: Kentaro Hara <haraken@chromium.org>
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Commit-Queue: Jochen Eisinger <jochen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#44927}

Ref: https://github.com/v8/v8/commit/4fdf9fd4813

PR-URL: https://github.com/nodejs/node/pull/12875
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-28 07:00:35 -07:00
Anna Henningsen f118f7ae90 v8: backport header diff from 2e4a68733803
Backport API-incompatible changes from
2e4a68733803 (“[v8] v8::StackTrace::AsArray returns correct array”).

Ref: https://codereview.chromium.org/2806373005
Ref: https://github.com/v8/v8/2e4a68733803

PR-URL: https://github.com/nodejs/node/pull/12875
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-28 07:00:34 -07:00
Anna Henningsen a947cf9a03 v8: backport header diff from 94283dcf4459f
Backport ABI-incompatible changes from
94283dcf4459f (“[ESNext] Implement DynamicImportCall”).

Ref: https://codereview.chromium.org/2703563002
Ref: https://github.com/v8/v8/commit/94283dcf4459f

PR-URL: https://github.com/nodejs/node/pull/12875
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-28 07:00:34 -07:00
Anna Henningsen 1bb880b595 v8: backport pieces of bf463c4dc0 and dc662e5b74
Backport ABI-incompatible changes from
bf463c4dc080 (“[async-iteration] implement AsyncGenerator”) and
dc662e5b740c (“[inspector] move console to builtins”).

This also requires relaxing one of the V8 unit tests.

Ref: https://chromium-review.googlesource.com/446961
Ref: https://github.com/v8/v8/commit/bf463c4dc080
Ref: https://codereview.chromium.org/2785293002
Ref: https://github.com/v8/v8/commit/dc662e5b740c

PR-URL: https://github.com/nodejs/node/pull/12875
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-28 07:00:34 -07:00
Anna Henningsen 04e646be52 v8: backport header diff from da5b745dba387
Backport deprecation of `Context::EstimatedSize()` from
da5b745dba387 (“[api] deprecate unused context size estimate”).

Ref: https://github.com/v8/v8/commit/da5b745dba387d0afdb99cd385ba1467a3ca2831

PR-URL: https://github.com/nodejs/node/pull/12875
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-28 07:00:34 -07:00
Anna Henningsen 39834bc441 v8: backport pieces of 6226576efa82ee
Backport removed methods from 6226576efa82ee (“[wasm] Deleted old way
of checking embedder limits on wasm size.”).

Ref: https://codereview.chromium.org/2772203005
Ref: https://github.com/v8/v8/commit/6226576efa82ee

PR-URL: https://github.com/nodejs/node/pull/12875
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-28 07:00:33 -07:00
Anna Henningsen 25430fd247 v8: backport pieces from 99743ad460e
Backport new virtual methods from
99743ad460e (“[wasm] Transferrable modules”).

Ref: https://codereview.chromium.org/2748473004
Ref: https://github.com/v8/v8/commit/99743ad460e

PR-URL: https://github.com/nodejs/node/pull/12875
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-28 07:00:33 -07:00
jbroman 385499ccf8 deps: backport 4acdb5eec2c from upstream v8
Original commit message:

    Give v8::Eternal a direct reference to the handle.

    This makes it more similar to other handle types (like PersistentBase),
    by simply storing an i::Object** cast to T*. This means that it is not
    necessary to look up the handle in the eternal handles table to access
    the underlying value.

    Like the built-in roots (null, etc.), an eternal handle can never be
    destroyed, so we don't even need to allocate a separate local handle.
    Instead, the Local<T> can point directly at the eternal reference.
    This makes Eternal<T>::Get trivial.

    Review-Url: https://codereview.chromium.org/2751263003
    Cr-Commit-Position: refs/heads/master@{#43912}

Ref: https://github.com/v8/v8/commit/4acdb5eec2c

PR-URL: https://github.com/nodejs/node/pull/12875
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-28 07:00:33 -07:00
jbroman 69161b5f94 deps: backport 3700a01c82 from upstream v8
Original commit message:

    Make v8::Eternal::Get and IsEmpty const.

    They do not modify the state of the handle.

    Review-Url: https://codereview.chromium.org/2753973002
    Cr-Commit-Position: refs/heads/master@{#43907}

Ref: https://github.com/v8/v8/commit/3700a01c82

PR-URL: https://github.com/nodejs/node/pull/12875
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-28 07:00:33 -07:00
Jochen Eisinger 9edd6d8ddb deps: backport 2cd2f5feff3 from upstream v8
Original commit message:

    Remove experimental fast accessor builder API

    As the code isn't used, but would have to be ported from hand-written
    assembly to CodeStubAssembler anyways, I propose to remove it and
    restore it if we decide that we actually need it.

    R=vogelheim@chromium.org
    BUG=

    Change-Id: Iffd7fc6ec534b1dd7a9144da900424355c8a7a02
    Reviewed-on: https://chromium-review.googlesource.com/453461
    Commit-Queue: Jochen Eisinger <jochen@chromium.org>
    Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
    Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#43763}

Ref: https://github.com/v8/v8/commit/2cd2f5feff3

PR-URL: https://github.com/nodejs/node/pull/12875
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-28 07:00:32 -07:00
addaleax 19c0c07446 deps: backport de1461b7efd from upstream v8
Original commit message:

    Drop UniqueId from include/v8.h

    It's unused since March 2 2017 (https://chromium-review.googlesource.com/448539).
    This removes it assuming that leaving it in the header was an oversight.

    BUG=v8:5828

    Review-Url: https://codereview.chromium.org/2732803002
    Cr-Commit-Position: refs/heads/master@{#43605}

Ref: https://github.com/v8/v8/commit/de1461b7efd

PR-URL: https://github.com/nodejs/node/pull/12875
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-28 07:00:32 -07:00
Michael Lippautz 95c4b0d8f6 deps: backport 78867ad8707a016 from v8 upstream
Original commit message:

    Remove object grouping

    Enbedders should switch to EmbedderHeapTracer API.

    BUG=v8:5828

    Change-Id: I82f2bc583d246617865a17f5904e02cd35f92fec
    Reviewed-on: https://chromium-review.googlesource.com/448539
    Reviewed-by: Hannes Payer <hpayer@chromium.org>
    Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
    Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#43551}

Ref: https://chromium-review.googlesource.com/448539
Ref: https://github.com/v8/v8/commit/78867ad8707a016

PR-URL: https://github.com/nodejs/node/pull/12875
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-28 07:00:32 -07:00
Daniel Bevenius f06f8365e4 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-28 07:00:31 -07:00
Evan Lucas 6cfb876d54 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-28 07:00:31 -07:00
Evan Lucas 4fabcfc5a2 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-28 07:00:31 -07:00
Eugene Ostroukhov c7182b9d9c 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-28 07:00:31 -07:00
Kat Marchán 3c3b36af0f 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-28 07:00:30 -07:00
Kat Marchán e03a929648 tools: update test-npm.sh paths
PR-URL: https://github.com/nodejs/node/pull/12936
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-05-28 07:00:30 -07:00
Faiz Halde 50af2b95e0 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-28 07:00:29 -07:00
Daniel Bevenius 268a39ac2a 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 11:39:14 -07:00
Brian White 414f93ecb3 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-23 11:39:13 -07:00
Brian White 69f3db4571 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-23 11:39:13 -07:00
Brian White 85e2d56df1 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-23 11:39:13 -07:00
Brian White 1263b70e9e 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-23 11:39:13 -07:00
Chris Young 1aa68f9a8d 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-23 11:39:13 -07:00
Eugene Ostroukhov 77d5e6f8da 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-23 11:39:12 -07:00
Sebastian Plesciuc e6c03c78f7 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-23 11:39:12 -07:00
cjihrig 1acd4d2cc4 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-23 11:39:12 -07:00
cjihrig f36c970cf3 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-23 11:39:12 -07:00
Artur Vieira 511ee24310 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-23 11:39:12 -07:00
Artur Vieira 8a4f3b7dfc 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-23 11:39:11 -07:00
Artur Vieira 9fc47de8e6 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-23 11:39:11 -07:00
Artur Vieira 8ef4fe0af2 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-23 11:39:11 -07:00
Artur Vieira 96925e1b93 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-23 11:39:11 -07:00
Daniel Bevenius f81281737c 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-23 11:39:10 -07:00
Daniel Bevenius 60132e83c3 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-23 11:39:10 -07:00
Daniel Bevenius 57b9b9d7d6 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-23 11:39:10 -07:00
Daniel Bevenius 94eca79d5d 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-23 11:39:10 -07:00
Rich Trott 1af8b70c57 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-23 11:39:10 -07:00
Rich Trott 72429b3981 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-23 11:39:09 -07:00
Rich Trott e29477ab25 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-23 11:39:09 -07: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