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

18914 Commits

Author SHA1 Message Date
Bryan English
882e811c88 doc: ctc -> tsc in collab guide
PR-URL: https://github.com/nodejs/node/pull/15590
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-25 16:46:19 -07:00
Łukasz Szewczak
7e382c1540 docs: clarify usage cli options -e,-p on windows
PR-URL: https://github.com/nodejs/node/pull/15568
Fixes: https://github.com/nodejs/node/issues/15522
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-25 13:51:47 -07:00
Anatoli Papirovski
c705f1067c http2: fix compat stream read handling, add tests
Handle edge case where stream pause is called between resume being
called and actually evaluated. Other minor adjustments to avoid
various edge cases around stream events. Add new tests that cover
all changes.

Fixes: https://github.com/nodejs/node/issues/15491
PR-URL: https://github.com/nodejs/node/pull/15503
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-25 13:25:35 -07:00
Vse Mozhet Byt
ebc58d7a22 doc: remove invalid hash in link
Sections in the https://tools.ietf.org/html/rfc1122 are not linkable
anymore. Replace the possibly confusing hash with the explicit
section number in the text.

PR-URL: https://github.com/nodejs/node/pull/15542
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-25 23:08:14 +03:00
Daniel Bevenius
4f4d55d10e src: correct typo in trace_event header
PR-URL: https://github.com/nodejs/node/pull/15583
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-25 20:00:16 +02:00
Benjamin Coe
456d8e21ea
url: fix windows drive letter handling
Address issue with Windows drive letter handling that was
causing es-module test suite to fail.

PR-URL: https://github.com/nodejs/node/pull/15490
Ref: https://github.com/whatwg/url/pull/343
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 14:12:56 -03:00
Anatoli Papirovski
d8a226673b
test: expand http2 util test coverage for headers
Expand existing test cases to hit some additional branches of
toHeaderObject and mapToHeaders.

PR-URL: https://github.com/nodejs/node/pull/15493
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 14:10:44 -03:00
atvoicu
d9cc105102
test: update test-fs-fsync to run from temp
We copy the "a.js" file fixture to a temp directory and then we open
it with write access. This makes sure we are only writing to the
provided temp-dir and not in the fixture dir.

PR-URL: https://github.com/nodejs/node/pull/15537
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 13:41:21 -03:00
Mike Kaufman
6faede7eb4
test: fixing AliasedBuffer tests to enter Isolate
AliasedBuffer tests weren't creating an v8::Isolate::Scope, and this
had negative impact on the node-chakracore branch, where expectation
is an Isoalte has been Enter()'d before being used.

PR-URL: https://github.com/nodejs/node/pull/15536
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-09-24 13:35:58 -03:00
Thomas Corbière
3d7f7b2a0c
src: add --pending-deprecation to NODE_OPTIONS
PR-URL: https://github.com/nodejs/node/pull/15494
Fixes: https://github.com/nodejs/node/issues/15484
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 13:33:35 -03:00
Rich Trott
55d49eb3cc
errors: replace .split() with .replace()
Replace a somewhat idiosyncratic use of `split()` to remove a prefix
with `replace()`. (A case could be made for `slice()` as well but I
think this is more readable.)

PR-URL: https://github.com/nodejs/node/pull/15545
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 13:02:47 -03:00
Rich Trott
cef6e1c55f
errors: refactor invalidArgType()
`invalidArgType()` uses `includes()` in two places where `startsWith()`
and `endsWith()` are more appropriate (at least in my opinion). Switch
to those more specific functions.

PR-URL: https://github.com/nodejs/node/pull/15544
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 13:00:14 -03:00
Anatoli Papirovski
33760ccc18
http2: remove unused onTimeout, add timeout tests
Remove unused onTimeout on Http2Session and Http2Stream because
the correct _onTimeout is already declared and in use. Expand
timeout tests to handle edge cases and additional arguments.

PR-URL: https://github.com/nodejs/node/pull/15539
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 12:57:35 -03:00
Nikolai Vavilov
b2eb98721e
build: use generic names for linting tasks
"jslint" is the name of a tool that actually is not used, which can
cause confusion.

PR-URL: https://github.com/nodejs/node/pull/15272
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
2017-09-24 12:31:52 -03:00
Ben Noordhuis
3c777bb37f
deps: define BUILDING_NGHTTP2 during nghttp2 build
Define BUILDING_NGHTTP2 in order that NGHTTP2_EXTERN is properly defined
when building the nghttp2 static library.

Move NGHTTP2_STATICLIB out of node.gyp because it is a property of the
nghttp2 static library, not the node executable.

PR-URL: https://github.com/nodejs/node/pull/15487
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-24 12:17:03 -03:00
Sampson Gao
a406a32ee9 n-api: fix warning about size_t compare with int
PR-URL: https://github.com/nodejs/node/pull/15508
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-09-24 10:47:27 -04:00
Anna Henningsen
3f071fa28a
src: remove unused constant from node_perf.h
PR-URL: https://github.com/nodejs/node/pull/15548
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-24 11:36:58 -03:00
Ali Ijaz Sheikh
322fdc72c3
deps: v8: fix potential segfault in profiler
This change fixes a potential segfault in the sampling heap profiler.
This landed as part of a larger change upstream [1]. This is the minimal
backport that avoids the segfault.

[1]: https://git.io/vdTYL

PR-URL: https://github.com/nodejs/node/pull/15498
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-24 11:30:19 -03:00
James M Snell
193926ecab
tls,doc: fix unallocated deprecation code
Deprecation was landed using `DEP00XX` instead of a properly
allocated deprecation code.

PR-URL: https://github.com/nodejs/node/pull/15534
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-09-24 11:28:17 -03:00
Anna Henningsen
150b8f7fda
src: minor c++ refactors to module_wrap
- Move `module_map` to `Environment` instead of having it be global
  state
- `std::map` → `std::unordered_map`
- Remove one level of indirection for the map values
- Clean up empty vectors in `module_map`
- Call `Reset()` on all persistent handles in `resolve_cache_`
- Add a missing `HandleScope` to `ModuleWrap::~ModuleWrap()`

PR-URL: https://github.com/nodejs/node/pull/15515
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-09-23 16:57:35 +02:00
Anna Henningsen
b605b15346
async_hooks: support promise resolve hook
Add a `promiseResolve()` hook.

PR-URL: https://github.com/nodejs/node/pull/15296
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-23 15:52:03 +02:00
Claudio Rodriguez
7a953929fe
test: improve readline test coverage for tty
Adds the following tests for tty readline:
- go to beginning and end of line
- wordLeft
- wordRight
- deleteWordLeft
- deleteWordRight

PR-URL: https://github.com/nodejs/node/pull/12064
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-22 21:48:44 -03:00
Jackson Tian
9d7574eef5
module: deprecate Module._debug
The _debug of Module is undocumented and it useless here.

PR-URL: https://github.com/nodejs/node/pull/13948
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-22 21:03:29 -03:00
Bryan English
6f1caadb85 tls: prefer path over port in connect
Makes tls.connect() behave as documented, preferring options.path over
options.port. This makes it consistent with net.connect(), so the
included test demonstrates that both behave in this way.

Also, for consistency, noting the precedence of options.path in net
doc.

PR-URL: https://github.com/nodejs/node/pull/14564
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-22 16:30:24 -07:00
Joyee Cheung
ba5a668c39
doc: note caveats in process message serialization
The message sent using process.send() goes through JSON
serialization and parsing, which could lead to surprising behaviors.
This commit elaborate a bit more on this and add a link to
the notes about these caveats in the ECMAScript specification.

PR-URL: https://github.com/nodejs/node/pull/12963
Refs: https://github.com/nodejs/node/issues/12497
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-22 20:24:16 -03:00
Luigi Pinca
10bea3c431
doc: fix 'aborted' event documentation
The `'aborted'` event is only emitted on `http.IncomingMessage`
instances.

PR-URL: https://github.com/nodejs/node/pull/15471
Fixes: https://github.com/nodejs/node/issues/15259
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-22 19:11:51 -03:00
cjihrig
20259f9092
net: support passing null to listen()
This commit fixes a regression around the handling of null
as the port passed to Server#listen(). With this commit,
null, undefined, and 0 have the same behavior, which was the
case in Node 4.

Fixes: https://github.com/nodejs/node/issues/14205
PR-URL: https://github.com/nodejs/node/pull/14221
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-22 12:16:09 -04:00
Anna Henningsen
84063a7314
src: do not include internals from node_buffer.h
`node_buffer.h` is a public header, so it should not be using
the `node_internals.h` internal header.

Ref: 290315ace7
Fixes: https://github.com/nodejs/node/issues/15552
PR-URL: https://github.com/nodejs/node/pull/15554
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-09-22 16:28:52 +02:00
cjihrig
6983157adf
dgram: refactor SO_RCVBUF and SO_SNDBUF methods
This commit refactors the get/set send/receive buffer size
methods in the following ways:

- Use booleans instead of strings and numbers to differentiate
between the send and receive buffers.
- Reduce the amount of branching and complexity in the C++ code.

Refs: https://github.com/nodejs/node/pull/13623
PR-URL: https://github.com/nodejs/node/pull/15483
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-09-22 09:35:50 -04:00
Daniel Bevenius
f4899ac4c0 src: use UV_EINVAL instead of EINVAL in udp_wrap
Currently if the buffer size exceeds the maximum int size the following
error will be thrown:
dgram.js:180
    throw new errors.Error('ERR_SOCKET_BUFFER_SIZE', e);
    ^

Error [ERR_SOCKET_BUFFER_SIZE]: Could not get or set buffer size: Error:
Unknown system error 22: Unknown system error 22, uv_recv_buffer_size
    at bufferSize (dgram.js:180:11)

It looks like perhaps UV_EINVAL was intended to give the following error
message instead:
dgram.js:180
    throw new errors.Error('ERR_SOCKET_BUFFER_SIZE', e);
    ^

Error [ERR_SOCKET_BUFFER_SIZE]: Could not get or set buffer size: Error:
EINVAL: invalid argument, uv_recv_buffer_size
    at bufferSize (dgram.js:180:11)

This commit changes EINVAL to use UV_EINVAL.

PR-URL: https://github.com/nodejs/node/pull/15444
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@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-09-22 07:12:00 +01:00
Tobias Nießen
3888a576ac
doc: fix types and description for dns.resolveTxt
PR-URL: https://github.com/nodejs/node/pull/15472
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-09-22 02:54:00 +02:00
Jussi Räsänen
60460bf80d
fs: add O_DSYNC
PR-URL: https://github.com/nodejs/node/pull/15451
Fixes: https://github.com/nodejs/node/issues/15425
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-09-22 02:47:45 +02:00
Gibson Fahnestock
66e45b821a
build: don't fail make test on source tarballs
Tries to achieve the same effect as
https://github.com/nodejs/node/pull/13658 without breaking source
tarballs. Presumably if `tools/eslint` wasn't there at all, people
would notice in the PR review!

PR-URL: https://github.com/nodejs/node/pull/15441
Fixes: https://github.com/nodejs/node/issues/14513
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-21 19:23:36 -03:00
Ben Noordhuis
78339e2511
src: constify PerformanceEntry data members
PR-URL: https://github.com/nodejs/node/pull/15458
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-09-21 19:19:01 -03:00
Ben Noordhuis
3869dd2a13
src: return references from getters, not copies
PR-URL: https://github.com/nodejs/node/pull/15458
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-09-21 19:18:56 -03:00
Ben Noordhuis
dce2738a91
src: handle uv_async_init() failure
Fix CHECKED_RETURN, RESOURCE_LEAK) and UNINIT Coverity warnings in
MarkGarbageCollectionEnd().

PR-URL: https://github.com/nodejs/node/pull/15458
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-09-21 19:18:51 -03:00
Ben Noordhuis
b210d61869
src: remove unused static variable
PR-URL: https://github.com/nodejs/node/pull/15458
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-09-21 19:18:46 -03:00
Vse Mozhet Byt
cd1b55a942 doc: delete link to removed doc part
PR-URL: https://github.com/nodejs/node/pull/15510
Refs: https://github.com/nodejs/node/pull/15412
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-21 20:00:00 +03:00
Anatoli Papirovski
bc23681aa2 http2: small fixes to compatibility layer
Expand argument validation through compat API, adjust behaviour
of response.end to not throw if stream already closed to match
http1, adjust behaviour of writeContinue to not throw if stream
already closed and other very small tweaks. Add tests for added
and fixed behaviour. Add tests for edge case behaviours of
setTimeout, createPushResponse, destroy, end and trailers.

PR-URL: https://github.com/nodejs/node/pull/15473
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2017-09-21 09:21:53 +02:00
Matteo Collina
e5c290bed9 fs: refactor close to use destroy
Refactor close() to use destroy() and not vice versa in ReadStream.
Avoid races between WriteStream.close and WriteStream.write, by aliasing
close to end().

Fixes: https://github.com/nodejs/node/issues/2006
PR-URL: https://github.com/nodejs/node/pull/15407
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-09-21 09:09:05 +02:00
Anna Henningsen
f27b5e4bda
src: prepare platform for upstream V8 changes
V8 platform tasks may schedule other tasks (both background and
foreground), and may perform asynchronous operations like
resolving Promises.

To address that:

- Run the task queue drain call inside a callback scope.
  This makes sure asynchronous operations inside it, like
  resolving promises, lead to the microtask queue and any
  subsequent operations not being silently forgotten.
- Move the task queue drain call before `EmitBeforeExit()`
  and only run `EmitBeforeExit()` if there is no new event
  loop work.
- Account for possible new foreground tasks scheduled by
  background tasks in `DrainBackgroundTasks()`.

PR-URL: https://github.com/nodejs/node/pull/15428
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Matthew Loring <mattloring@google.com>
2017-09-21 02:03:02 +02:00
Refael Ackermann
01c680b92a
test: refactor test for readability
PR-URL: https://github.com/nodejs/node/pull/13003
Fixes: https://github.com/nodejs/node/issues/12951
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-09-20 16:41:31 -04:00
Vse Mozhet Byt
6763fb2f0e doc: fix some links in http2.md
PR-URL: https://github.com/nodejs/node/pull/15481
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-20 22:43:56 +03:00
Vse Mozhet Byt
ee46c73023 doc: fix external links with 404 status
PR-URL: https://github.com/nodejs/node/pull/15463
Fixes: https://github.com/nodejs/node/issues/15462
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-20 22:39:13 +03:00
Eugene Ostroukhov
75606c4f69 inspector: break in eval script
Fixes: https://github.com/nodejs/node/issues/14577
PR-URL: https://github.com/nodejs/node/pull/14581
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-20 09:18:16 -07:00
Simon Brewster
6c38ab34a3 http2: improved coverage of Http2Stream destroy
Refs: https://github.com/nodejs/node/issues/14985
PR-URL: https://github.com/nodejs/node/pull/15461
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-20 16:43:25 +02:00
Jeremiah Senkpiel
11f7dcf91e
timers: do not expose .unref()._handle._list
The list is defunct at this point.
I believe this to be in effect a minor defect from
3eecdf9f14

PR-URL: https://github.com/nodejs/node/pull/8422
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Julien Gilli <jgilli@nodejs.org>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-20 11:12:41 -03:00
Daniel Bevenius
87bdddaf41 src: fix compiler warning in udp_wrap.cc
Currently the following compiler warning is generated:
1 warning generated.
../src/udp_wrap.cc:238:12: warning: comparison of integers of different
signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
  if (size != args[0].As<Uint32>()->Value()) {
      ~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

This commit changes the check to see that the Uint32 value does not
exceed the max int size instead of first casting and then comparing.

PR-URL: https://github.com/nodejs/node/pull/15402
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-09-20 14:52:14 +01:00
Anna Henningsen
602fd36d95
domain: remove .dispose()
`domain.dispose()` is generally considered an anti-pattern, has been
runtime-deprecated for over 4 years, and is a part of the `domain`
module that can not be emulated by `async_hooks`; so remove it.

Ref: https://nodejs.org/en/docs/guides/domain-postmortem/
Ref: 4a74fc9776

PR-URL: https://github.com/nodejs/node/pull/15412
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-09-20 10:45:33 -03:00
Gergely Nemeth
750c0802f5
test: backward compatible api for tty
PR-URL: https://github.com/nodejs/node/pull/15235
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-09-20 10:42:56 -03:00