0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

17901 Commits

Author SHA1 Message Date
Michaël Zasso
7cdcca7623 deps: cherry-pick 866ee63 from upstream V8
Original commit message:

    [string] Re-enable result caching for String.p.split

    Runtime::kStringSplit's result caching is only enabled when limit equals
    kMaxUInt32.

    BUG=v8:6463

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

PR-URL: https://github.com/nodejs/node/pull/13630
Fixes: https://github.com/nodejs/node/issues/13445
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-06-20 15:24:57 +02:00
Michaël Zasso
8f907b6baf deps: update V8 to 5.9.211.37
PR-URL: https://github.com/nodejs/node/pull/13631
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-20 10:50:52 +02:00
Ruben Bridgewater
f40caf7282 net: fix abort on bad address input
PR-URL: https://github.com/nodejs/node/pull/13726
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-19 19:04:44 -04:00
James M Snell
22cf25cf2d buffer: support boxed strings and toPrimitive
Add support for `Buffer.from(new String('...'))` and
`Buffer.from({[Symbol.toPrimitive]() { return '...'; }})`

PR-URL: https://github.com/nodejs/node/pull/13725
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-06-19 15:27:01 -07:00
cjihrig
d3c668cead test: remove node-tap lookalike
This commit removes the small node-tap lookalike from several
of the streams2 tests. It's only used by six tests, and is
inconsistent with all other tests.

PR-URL: https://github.com/nodejs/node/pull/13707
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-19 16:04:00 -04:00
cjihrig
471e88feb4 test: increase util.callbackify() coverage
This commit adds coverage for util.callbackify() type checking.

PR-URL: https://github.com/nodejs/node/pull/13705
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-06-19 14:33:08 -04:00
Rich Trott
fd9a30f10e test: refactor test-fs-watchfile
* use `common.mustNotCall()` to confirm callback is not called
* reorder modules to conform with test-writing guide
* match full error message in `assert.throws()`

PR-URL: https://github.com/nodejs/node/pull/13721
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-19 11:00:33 -07:00
Justin Beckwith
24ecc331e2
doc: document res.connection and res.socket
Adds documentation and samples for the `connection` and
`socket` properties available on the `http.serverResponse`
and `http.clientRequest` objects.

PR-URL: https://github.com/nodejs/node/pull/13617
Fixes: https://github.com/nodejs/node/issues/12617
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
2017-06-19 19:40:51 +02:00
Ruben Bridgewater
c474f88987
lib: fix typos
PR-URL: https://github.com/nodejs/node/pull/13741
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-19 18:18:56 +02:00
Vse Mozhet Byt
878990498a readline,repl,url,util: remove needless capturing
Use non-capturing grouping or remove capturing completely when:

* capturing is useless per se, e.g. in test() check;
* captured groups are not used afterwards at all;
* some of the later captured groups are not used afterwards.

PR-URL: https://github.com/nodejs/node/pull/13718
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-06-19 18:07:52 +03:00
Vse Mozhet Byt
b9457717ca benchmark: remove needless RegExp capturing
Use non-capturing grouping or remove capturing completely when:

* capturing is useless per se, e.g. in test() check;
* captured groups are not used afterwards at all;
* some of the later captured groups are not used afterwards.

PR-URL: https://github.com/nodejs/node/pull/13718
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-06-19 18:06:17 +03:00
jklepatch
bed3579dbe
test: make test-http(s)-set-timeout-server alike
Make test-http(s)-set-timeout-server tests more similar and resolve the
following issues:

* `test-http-set-timeout-server.js` had a `secReceived` check in
  `serverResponseTimeoutWithPipeline()` that was added to prevent
  flakiness, but this did not exist in the https counterpart.

* `test-https-set-timeout-server.js` utilized `common.mustCall()`,
  `common.mustNotCall()`, etc., while the http counterpart utilized the
  old method of checking flags on exit of the process.

Refs: https://github.com/nodejs/node/issues/13588
PR-URL: https://github.com/nodejs/node/pull/13625
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
2017-06-19 12:18:07 +03:00
Daijiro Wachi
4ca3b9cd6a doc: fix api docs style
doc/api/async_hooks.md
  + L198: Missing code-language flag
  + L239: Missing code-language flag
  + L317: Missing code-language flag
  + L347: Missing code-language flag

doc/api/fs.md
  + L2857: Unused definition

PR-URL: https://github.com/nodejs/node/pull/13700
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-19 10:51:37 +02:00
DuanPengfei
6e69421e53 doc: path.relative uses cwd
PR-URL: https://github.com/nodejs/node/pull/13714
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-18 22:17:58 -04:00
Vse Mozhet Byt
aaa80dfd8a test: delete outdated fixtures/stdio-filter.js
PR-URL: https://github.com/nodejs/node/pull/13712
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-06-19 02:29:36 +03:00
Vse Mozhet Byt
0fdb67be9f test: use string instead of RegExp in split()
PR-URL: https://github.com/nodejs/node/pull/13710
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-06-19 02:26:04 +03:00
Vse Mozhet Byt
6b9500bfc2 v8: fix RegExp nits in v8_prof_polyfill.js
* Do not repeat RegExp creation in cycle.
* Use sufficient string instead of RegExp in split().

PR-URL: https://github.com/nodejs/node/pull/13709
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-19 02:21:15 +03:00
Rich Trott
81c0045378 test: refactor test-fs-watch-stop-sync
* format test per project guide
* use listener that emits clear message
* use common.mustNotCall() to confirm different listener is not invoked
* add comment describing the test

PR-URL: https://github.com/nodejs/node/pull/13689
Reviewed-By: David Cai <davidcai1993@yahoo.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-06-18 08:52:12 -07:00
Daniel Bevenius
51898575ae test: check zlib version for createDeflateRaw
We are currenly builing Node with --shared-zlib which happens to be
version 1.2.8. The test for zlib.createDeflateRaw is expected to fail
but does not when using version 1.2.8.

As far as I can tell the fix referred to in the comments was
introduced in version 1.2.9:
- Reject a window size of 256 bytes if not using the zlib wrapper

This commit suggests adding a check for the version and skipping this
assert if the version is less than 1.2.9.

Refs: http://zlib.net/ChangeLog.txt
PR-URL: https://github.com/nodejs/node/pull/13697
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2017-06-18 12:27:34 +02:00
Daniel Bevenius
a8979a6054 test: add hasIntl to failing test
Currently when node is configured --without-intl the tests in this
commit fail. This commit adds checks for internationalization for these
tests

PR-URL: https://github.com/nodejs/node/pull/13699
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-18 11:01:51 +02:00
Daniel Bevenius
282b1edbe7 doc: add hasIntl to test/common/README.md
Commit d7e4ae1eb0
("test: add common.hasIntl") added common.hasIntl but I was not able to
find it in the README.md so this commit adds it.

PR-URL: https://github.com/nodejs/node/pull/13699
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-18 10:59:33 +02:00
Vse Mozhet Byt
d174e44c77 test: remove needless RegExp flags
* /m is needless if ^ and $ are not used
* /g is needless in split()
* /g is needless in test() with one-time RegExp/String

PR-URL: https://github.com/nodejs/node/pull/13690
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-18 03:57:32 +03:00
Rich Trott
3ad90a4ac8 tools: update ESLint to v4.0.0
Update ESLint and configuration to version 4.0.0.

PR-URL: https://github.com/nodejs/node/pull/13645
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-17 12:56:58 -07:00
Rich Trott
22436b055d build: check for linter in bin rather than lib
Make the "can we lint?" check in Makefile and vcbuild.bat depend on
bin/eslint.js rather than lib/eslint.js. In ESLint 4.0.0, lib/eslint.js
is not present. The lint rules call bin/eslint.js so check for that
instead.

PR-URL: https://github.com/nodejs/node/pull/13645
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-17 12:56:50 -07:00
Roman Reiss
ecf6a46d98
src,lib,test,doc: correct misspellings
PR-URL: https://github.com/nodejs/node/pull/13719
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-06-17 19:17:46 +02:00
Daniel Bevenius
7bdb5ca620 test: add crypto check to test-tls-wrap-econnreset
Currently, there are a few test-tls-wrap-econnreset test that fail when
Node is configured --without-ssl:
Error: Node.js is not compiled with openssl crypto support

This commit adds crypto checks and skips these tests if no crypto
support unavailable.

PR-URL: https://github.com/nodejs/node/pull/13691
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-17 18:54:16 +02:00
Brian White
fcd82e7601
test: improve http test reliability
Fake the socket handle to ensure an immediate error is returned
uniformly across all platforms.

PR-URL: https://github.com/nodejs/node/pull/13693
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-17 10:43:57 -04:00
Brian White
460ee75f7e
process: improve nextTick() performance
PR-URL: https://github.com/nodejs/node/pull/13446
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2017-06-17 10:38:24 -04:00
Anna Henningsen
1e2905f46a
buffer: add constants object
Add `buffer.constants`, containing length limits for `Buffer` and
`string` instances.

This could be useful for programmers to tell whether a value can
be turned into a string or not.

Ref: https://github.com/nodejs/node/issues/13465
PR-URL: https://github.com/nodejs/node/pull/13467
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-06-16 19:48:51 +02:00
Anna Henningsen
50d151578d
doc: small makeover for onboarding.md
PR-URL: https://github.com/nodejs/node/pull/13413
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-16 19:44:42 +02:00
Anna Henningsen
af1a551965
async_hooks: proper id stacking for Promises
Until now, the async_hooks PromiseHook did not register the Promise’s
async id and trigger id on the id stack, so inside the `.then()` handler
those ids would be invalid.

To fix this, add push and pop calls to its `before` and `after` parts,
respectively. Some care needs to be taken for the cases that the
Promise hook is being disabled or enabled during the execution
of a Promise handler; in the former case, actually removing the hook
is delayed by adding another task to the microtask queue, in the latter
case popping the id off the async id stack is skipped if the ids don’t
match.

Fixes: https://github.com/nodejs/node/issues/13583
PR-URL: https://github.com/nodejs/node/pull/13585
Reviewed-By: Trevor Norris <trevnorris@gmail.com>
2017-06-16 19:27:29 +02:00
Eugene Ostroukhov
6e2c29bcab inspector: perform DNS lookup for host
PR-URL: https://github.com/nodejs/node/pull/13478
Fixes: https://github.com/nodejs/node/issues/13477
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-06-16 09:46:36 -07:00
Gibson Fahnestock
b7473c2117 build: fail linter if linting not available
PR-URL: https://github.com/nodejs/node/pull/13658
Ref: https://github.com/nodejs/node/pull/13645#issuecomment-308100452
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-06-16 09:34:34 -07:00
Tamás Hódi
83ebb6d898 test: increase coverage for internal/module.js
PR-URL: https://github.com/nodejs/node/pull/13673
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-16 09:31:25 -07:00
Rich Trott
e74907b3cc test: refactor test-fs-read-stream
* alphabetize modules
* replace callback invocation counts with common.mustCall()
* add block-scoping
* remove commented-out code that uses an identifier not in the test
* move exit handlers to relevant blocks to keep tests cohesive
* common.noop -> common.mustNotCall()
* check results from `data` event

PR-URL: https://github.com/nodejs/node/pull/13643
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-06-16 09:11:29 -07:00
Nikolai Vavilov
64812f5728 src: fix decoding base64 with whitespace
`max_i` should also include the characters that were just read by
`base64_decode_group_slow()`.

PR-URL: https://github.com/nodejs/node/pull/13660
Fixes: https://github.com/nodejs/node/issues/13636
Fixes: https://github.com/nodejs/node/issues/13657
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-06-16 19:09:50 +03:00
Michaël Zasso
00aac57df9 util: ignore invalid format specifiers
In util.format, if a percent sign without a known type is encountered,
just print it instead of silently ignoring it and the next character.

PR-URL: https://github.com/nodejs/node/pull/13674
Fixes: https://github.com/nodejs/node/issues/13665
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2017-06-16 08:57:16 -07:00
cjihrig
06ca205719 test: refactor test-cluster-worker-isconnected.js
PR-URL: https://github.com/nodejs/node/pull/13685
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: David Cai <davidcai1993@yahoo.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-16 08:45:32 -07:00
Vse Mozhet Byt
50b35460e3 test: fix nits in test-fs-mkdir-rmdir.js
* Add common.mustCall().
* Add check for error existence, not only for error details.
* Use test(), not match() in a boolean context.
* Properly reverse meanings of assert messages.

PR-URL: https://github.com/nodejs/node/pull/13680
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-16 17:47:55 +03:00
Refael Ackermann
fe2caf6fb5 test: fix test-inspector-port-zero-cluster
* re-implemented test to parse args instead of post binding (exit 12)
* saved failing case as known issue

PR-URL: https://github.com/nodejs/node/pull/13373
Fixes: https://github.com/nodejs/node/issues/13343
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-16 07:14:25 -04:00
Teddy Katz
9f9e3c0653
doc: fix typo in changelog
PR-URL: https://github.com/nodejs/node/pull/13713
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-16 00:07:59 -07:00
Daniel Bevenius
109e84bda7 src: remove void casts for clear_error_on_return
There are a number of void casts of clear_error_on_return which is a
usage of the RAII idiom. The ClearErrorOnReturn struct only has a
destructor and no constructor which I believe was an issue in GCC
prior to version 4.8.0, which lead to a unused variable warning.

I'm wondering if these cast could be removed since GCC 4.8.5 or newer
is required now. An alternative solution would be to add an empty
constructor which should work allowing the compiler to detect that a
variable is used only for its side-effects.

Not sure if this was the sole reason for having these casts but wanted
to bring it up just in case.

Refs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10416
PR-URL: https://github.com/nodejs/node/pull/13669
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-16 07:43:11 +02:00
Michael Dawson
62e940dfa6 doc: fix a few n-api doc issues
- Add doc for napi_create_string_latin1().
- Fix signatures where c string was specified instead of napi_value.
- Fix return type of napi_callback.
- Update to specify that napi_escape_handle() can only be called once
  for a given scope.

PR-URL: https://github.com/nodejs/node/pull/13650
Fixes: https://github.com/nodejs/node/issues/13555
Fixes: https://github.com/nodejs/node/issues/13556
Fixes: https://github.com/nodejs/node/issues/13562
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
Reviewed-By: Ingvar Stepanyan <me@rreverser.com>
2017-06-16 00:45:36 -04:00
cornholio
2777a7e04f inspector,cluster: fix inspect port assignment
* Adding --inspect-port with debug port, instead of parsing `execArgv`

* Export CLI debug options to `process.binding('config').debugOptions`
  (currently used only in tests)

PR-URL: https://github.com/nodejs/node/pull/13619
Refs: https://github.com/nodejs/node/pull/9659
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-06-15 22:50:56 -04:00
Rich Trott
f462ad1f35 test: refactor test-fs-watch-stop-async
* use common.mustNotCall() to confirm callback is not invoked
* blank line after common module per test writing guide

PR-URL: https://github.com/nodejs/node/pull/13661
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-06-15 14:07:25 -07:00
Rich Trott
14f5a9becc test: change deprecated method to recommended
In non-buffer tests, change usage of the Buffer constructor to one of
the recommended alternatives.

PR-URL: https://github.com/nodejs/node/pull/13649
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-06-15 13:59:43 -07:00
Chris Young
386f53f31d doc: fixes a typo in the async_hooks documentation
> Generally it will correspond the name of the resource's constructor.
should read "Generally, it will correspond to the name..."

PR-URL: https://github.com/nodejs/node/pull/13666
Fixes: https://github.com/nodejs/node/issues/13663
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-06-15 21:31:53 +02:00
Ben Noordhuis
d13a65ad68 doc: update minimum g++ version to 4.9.4
The 4.8.x releases don't fully support C++11.  Update the prerequisites
for node.js 8 so that we won't have to work around compiler bugs in the
future.

To be decided if we should also update the minimum clang version.
I believe clang 3.4.2 properly supports C++11 but am not 100% sure.

PR-URL: https://github.com/nodejs/node/pull/13466
Ref: https://github.com/nodejs/node/pull/11840
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
2017-06-15 11:04:17 -07:00
Sebastian Van Sande
de4a749788 internal/util: use internal/errors.js
PR-URL: https://github.com/nodejs/node/pull/11301
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <fhinkel@vt.edu>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-06-15 17:07:45 +02:00
Rod Vagg
c7323af131 2017-06-15, Version 8.1.2 (Current)
Release to fix broken `process.release` properties
Ref: https://github.com/nodejs/node/issues/13667
2017-06-15 22:43:54 +10:00