Anna Henningsen
bf1bacef6b
src: check uv_prepare_stop return value
...
PR-URL: https://github.com/nodejs/node/pull/16268
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-10-19 19:07:20 +02:00
Anna Henningsen
33b4320cf9
lib: refactor wrap_js_stream for ES6/readability
...
PR-URL: https://github.com/nodejs/node/pull/16158
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-10-19 18:06:27 +02:00
Anna Henningsen
542e94cdce
lib: move _stream_wrap into internals
...
This makes a subsequent possible deprecation easier.
PR-URL: https://github.com/nodejs/node/pull/16158
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-10-19 18:06:27 +02:00
Anna Henningsen
5cde451ffd
fs: account for buffer alloc failure in readFile
...
PR-URL: https://github.com/nodejs/node/pull/16219
Refs: https://github.com/nodejs/node/pull/15362
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-10-19 02:39:07 -02:00
Anna Henningsen
d7456ab2eb
deps: cherry-pick 9b21865822243 from V8 upstream
...
Original commit message:
[api] Add optional data pointer to GC callbacks
This can be useful when there may be multiple callbacks attached by
code that's not directly tied to a single isolate, e.g. working
on a per-context basis.
This also allows rephrasing the global non-isolate APIs in terms
of this new API, rather than working around it inside `src/heap`.
TBR=hpayer@chromium.org
Bug:
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I2e490ec40d1a34ea812f25f41ef9741d2116d965
Reviewed-on: https://chromium-review.googlesource.com/647548
Reviewed-by: Yang Guo <yangguo@chromium.org >
Reviewed-by: Adam Klein <adamk@chromium.org >
Commit-Queue: Yang Guo <yangguo@chromium.org >
Cr-Commit-Position: refs/heads/master@{#47923}
PR-URL: https://github.com/nodejs/node/pull/15391
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2017-10-18 17:04:41 -07:00
Anna Henningsen
e6dfd59be0
lib: pass internalBinding more implicitly
...
Modify passing of the `internalBinding` function so that it’s
easier for core modules to adopt, and also not even accessible
through `--expose-internals`.
This also splits the module wrapper into a separate version for
internal bindings and for CJS modules, which seems like a good
idea given the different semantics.
PR-URL: https://github.com/nodejs/node/pull/16218
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-10-18 11:36:28 +02:00
Anna Henningsen
b3f9b38174
n-api: check against invalid handle scope usage
...
Fixes: https://github.com/nodejs/node/issues/16175
PR-URL: https://github.com/nodejs/node/pull/16201
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-10-18 11:29:45 +02:00
Anna Henningsen
1a2f579ba0
test: split up and refactor test-domain
...
Split up test-domain into multiple, more focused test files
and use more modern JS inside of them.
PR-URL: https://github.com/nodejs/node/pull/13614
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-10-16 11:24:35 +02:00
Anna Henningsen
cc443cb447
build: set disable_glibcxx_debug flag
...
This breaks a few tests when Node is built in debug mode, because
V8 is built with `-D_GLIBCXX_DEBUG=1` and Node is built without,
which makes e.g. `std::vector` ABI-incompatible between the two.
PR-URL: https://github.com/nodejs/node/pull/16159
Reviewed-By: James Snell <jasnell@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-10-15 12:30:00 +02:00
Anna Henningsen
80bd2a240b
tools: minor performance improvement
...
PR-URL: https://github.com/nodejs/node/pull/16125
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-10-14 11:33:42 +02:00
Anna Henningsen
23340b9234
doc: add basic C++ style guide
...
Ideally, most of these things would be enforced via linter rules.
This is a first step into having a style guide that goes beyond
what the linter currently enforces.
PR-URL: https://github.com/nodejs/node/pull/16090
Fixes: https://github.com/nodejs/node/issues/12636
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-10-14 11:13:29 +02:00
Anna Henningsen
00fe76d2df
src: rename StreamWrap to LibuvStreamWrap
...
This should help clarify what kind of resource a `StreamWrap`
represents.
PR-URL: https://github.com/nodejs/node/pull/16157
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-10-13 13:05:49 -07:00
Anna Henningsen
a766f6dea5
doc: exempt test/doc only changes from 48-hr rule
...
If a change affects only specific parts of the tests and or
documentation, and in particular not of the runtime code itself,
it should often be okay to land it early.
The primary goal of the 48-hour rule is to ensure that people
who are invested in certain parts of Node have a reasonable chance
to weigh in based on their usage of Node; if the API is not
touched in a change, that is arguably much less of an issue.
In particular, this:
- Should help avoid excessive nitpicking.
- Helps newcomers, since their first PRs often touch only those areas
and a direct success is very motivating.
- Helps with the amount of pull requests created by events such a
Code & Learn.
PR-URL: https://github.com/nodejs/node/pull/16135
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-10-12 06:17:58 -07:00
Anna Henningsen
037d9085f1
src: use more appropriate context-entered check
...
Make the context check in `MakeCallback` match what the comment says
(and what actually makes sense).
PR-URL: https://github.com/nodejs/node/pull/15691
Fixes: https://github.com/nodejs/node/issues/15672
Ref: https://github.com/nodejs/node/pull/15428
Ref: f27b5e4bda
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-10-08 14:16:41 -07:00
Anna Henningsen
50e580df21
deps: cherry-pick 0ef4a0c64b6 from c-ares upstream
...
Original commit message:
gethostbyaddr: fail with `ECANCELLED` for `ares_cancel()`
When `ares_cancel()` was invoked, `ares_gethostbyaddr()`
queries would fail with `ENOTFOUND` instead of `ECANCELLED`.
It seems appropriate to treat `ares_cancel()` like `ares_destroy()`,
but I would appreciate review of the correctness of this change.
Ref: https://github.com/nodejs/node/issues/14814
Fixes: https://github.com/nodejs/node/issues/14814
PR-URL: https://github.com/nodejs/node/pull/15023
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-10-02 01:16:22 -03:00
Anna Henningsen
9a0631dffe
deps: cherry-pick 18ea996 from c-ares upstream
...
Original commit message:
ares_parse_naptr_reply: make buffer length check more accurate
9478908a490a6bf009ba58d81de8c1d06d50a117 introduced a length check
for records parsed by `ares_parse_naptr_reply()`. However, that
function is designed to parse replies which also contain non-NAPTR
records; for A records, the `rr_len > 7` check will fail as there
are only 4 bytes of payload.
In particular, parsing ANY replies for NAPTR records was broken
by that patch.
Fix that by moving the check into the case in which it is already
known that the record is a NAPTR record.
Ref: https://github.com/c-ares/c-ares/commit/18ea99693d63f957ecb670045adbd2c1da8a4641
PR-URL: https://github.com/nodejs/node/pull/13883
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-10-02 01:16:12 -03:00
Anna Henningsen
dcd890a135
src: fixup node_platform blocking task drain
...
https://github.com/nodejs/node/pull/15428 was supposed to account
for upcoming changes in V8 upstream, but while addressing review
comments a bug was introduced; `DrainBackgroundTasks()` should
always at least perform one blocking drain on the background task
queue.
PR-URL: https://github.com/nodejs/node/pull/15639
Refs: https://github.com/nodejs/node/pull/15428
Refs: f27b5e4bda
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-10-01 20:13:02 -03: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
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
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
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
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
Anna Henningsen
dcb24e3be5
src: keep track of env properly in node_perf.cc
...
Currently, measuring GC timing using `node_perf` is somewhat broken,
because Isolates and Node Environments do not necessarily match 1:1;
each environment adds its own hook, so possibly the hook code runs
multiple times, but since it can’t reliably compute its corresponding
event loop based on the Isolate, each run targets the same Environment
right now.
This fixes that problem by using new overloads of the GC tracking
APIs that can pass data to the callback through opaque pointers.
PR-URL: https://github.com/nodejs/node/pull/15391
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2017-09-15 12:42:22 -07:00
Anna Henningsen
8403d6b999
deps: cherry-pick 9b21865822243 from V8 upstream
...
Original commit message:
[api] Add optional data pointer to GC callbacks
This can be useful when there may be multiple callbacks attached by
code that's not directly tied to a single isolate, e.g. working
on a per-context basis.
This also allows rephrasing the global non-isolate APIs in terms
of this new API, rather than working around it inside `src/heap`.
TBR=hpayer@chromium.org
Bug:
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I2e490ec40d1a34ea812f25f41ef9741d2116d965
Reviewed-on: https://chromium-review.googlesource.com/647548
Reviewed-by: Yang Guo <yangguo@chromium.org >
Reviewed-by: Adam Klein <adamk@chromium.org >
Commit-Queue: Yang Guo <yangguo@chromium.org >
Cr-Commit-Position: refs/heads/master@{#47923}
PR-URL: https://github.com/nodejs/node/pull/15391
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2017-09-15 12:42:15 -07:00
Anna Henningsen
01a1812e70
deps: cherry-pick b6158eb6befae from V8 upstream
...
Original commit message:
[heap] Move gc callbacks from List to std::vector
Bug: v8:6333
Change-Id: I4434c6cc59f886f1e37dfd315a3ad5fee28d3f63
Reviewed-on: https://chromium-review.googlesource.com/634907
Reviewed-by: Ulan Degenbaev <ulan@chromium.org >
Commit-Queue: Michael Lippautz <mlippautz@chromium.org >
Cr-Commit-Position: refs/heads/master@{#47601}
PR-URL: https://github.com/nodejs/node/pull/15391
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2017-09-15 12:42:07 -07:00
Anna Henningsen
2509c34782
src: move DomainEnter,DomainExit to node.cc
...
PR-URL: https://github.com/nodejs/node/pull/14697
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2017-09-14 17:39:00 +02:00
Anna Henningsen
bdaa2cb585
test: add regression test for 5691
...
With `CallbackScope`, this has become possible to do properly.
Fixes: https://github.com/nodejs/node/issues/5691
PR-URL: https://github.com/nodejs/node/pull/14697
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-14 17:38:45 +02:00
Anna Henningsen
8c8c90b714
n-api: use AsyncResource for Work tracking
...
Enable combining N-API async work with async-hooks.
PR-URL: https://github.com/nodejs/node/pull/14697
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: Jason Ginchereau <jasongin@microsoft.com >
Reviewed-By: Michael Dawson <mhdawson@ibm.com >
2017-09-14 17:38:45 +02:00
Anna Henningsen
a564c1eb20
src: remove virtually unused ExecScope
...
PR-URL: https://github.com/nodejs/node/pull/14697
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-14 17:38:44 +02:00
Anna Henningsen
64616bb769
src: refactor async callback handling
...
- Merge the two almost-but-not-quite identical `MakeCallback()`
implementations
- Provide a public `CallbackScope` class for embedders in order
to enable `MakeCallback()`-like behaviour without tying that
to calling a JS function
PR-URL: https://github.com/nodejs/node/pull/14697
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-14 17:38:44 +02:00
Anna Henningsen
be6d807bbf
src: make in_makecallback() getter const
...
PR-URL: https://github.com/nodejs/node/pull/14697
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-14 17:38:43 +02:00
Anna Henningsen
290315ace7
src: refactor #include handling
...
`node_internals.h` already includes the most common headers,
so double includes can be avoided in a lot of cases. Also don’t include
`node_internals.h` from `node.h` implicitly anymore, as that is mostly
unnecessary.
PR-URL: https://github.com/nodejs/node/pull/14697
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-14 17:38:38 +02:00
Anna Henningsen
5ee2d3ef0e
test: fix sequential/test-async-wrap-getasyncid
...
Previously, this test would contain a DNS query that timed out
after 60 seconds, thus occupying one of the parallel test slots
for that period.
Fix that by creating a new channel for that request, and cancelling
it immediately.
PR-URL: https://github.com/nodejs/node/pull/15319
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-13 17:08:58 -03:00
Anna Henningsen
1403d28e7d
tls: re-allow falsey option values
...
5723c4c5f0 was an unintentional breaking change in that it changed
the behaviour of `tls.createSecureContext()` to throw on false-y input
rather than ignoring it. This breaks real-world applications like `npm`.
This restores the previous behaviour.
PR-URL: https://github.com/nodejs/node/pull/15131
Ref: https://github.com/nodejs/node/pull/15053
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: MichaëZasso <targos@protonmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-09-05 16:47:55 -04:00
Anna Henningsen
dd52cad044
doc,lib,src,test: strip executable bits off files
...
Remove the executable bits of the file modes of some files that
accidentally received it.
PR-URL: https://github.com/nodejs/node/pull/15132
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-01 10:09:41 -07:00
Anna Henningsen
f91897e741
src: remove unused persistent properties from env
...
PR-URL: https://github.com/nodejs/node/pull/15096
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-09-01 09:03:41 -07:00
Anna Henningsen
5c0d64ea11
test: add regression test for 14814
...
Ref: https://github.com/nodejs/node/issues/14814
PR-URL: https://github.com/nodejs/node/pull/15023
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-29 09:51:52 -07:00
Anna Henningsen
a26be6866b
deps: cherry-pick 0ef4a0c64b6 from c-ares upstream
...
Original commit message:
gethostbyaddr: fail with `ECANCELLED` for `ares_cancel()`
When `ares_cancel()` was invoked, `ares_gethostbyaddr()`
queries would fail with `ENOTFOUND` instead of `ECANCELLED`.
It seems appropriate to treat `ares_cancel()` like `ares_destroy()`,
but I would appreciate review of the correctness of this change.
Ref: https://github.com/nodejs/node/issues/14814
Fixes: https://github.com/nodejs/node/issues/14814
PR-URL: https://github.com/nodejs/node/pull/15023
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-29 09:51:44 -07:00
Anna Henningsen
095c9463dd
perf_hooks: fix presumed typo in node_perf.cc
...
PR-URL: https://github.com/nodejs/node/pull/15019
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-28 22:08:16 -07:00
Anna Henningsen
784c6d40f8
src: use proper errors as coming from StringBytes
...
The previous errors were incorrect here, as the code
only failed in situations where strings exceeded size limits or
an OOM situation was encountered, not for invalid encodings
(which aren’t even detected explicitly).
Unfortunately, these situations are hard to test for.
PR-URL: https://github.com/nodejs/node/pull/14579
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-08-24 21:05:07 +02:00
Anna Henningsen
7e544240d3
test: extend async addon test
...
Test more current behaviour, based on discussions in
https://github.com/nodejs/node/pull/14697 .
PR-URL: https://github.com/nodejs/node/pull/14922
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-24 21:01:36 +02:00
Anna Henningsen
7ce2555896
stream: fix Writable instanceof for subclasses
...
The current custom instanceof for `Writable` subclasses previously
returned false positives for instances of *other* subclasses of
`Writable` because it was inherited by these subclasses.
Fixes: https://github.com/nodejs/node/issues/14943
PR-URL: https://github.com/nodejs/node/pull/14945
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-24 20:58:21 +02:00
Anna Henningsen
86c4655a0f
src: fix build on certain platforms
...
The `double` fields in `performance_state` could previously have
been aligned at 4-byte instead of 8-byte boundaries, which would
have made creating an Float64Array them as a array buffer view
for an ArrayBuffer extending over the entire struct an invalid
operation.
Ref: 67269fd7f3
Comments out related flaky failure
PR-URL: https://github.com/nodejs/node/pull/14996
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-23 19:01:19 -07:00
Anna Henningsen
772145674c
http2: ignore invalid headers explicitly
...
Required in order for `parallel/test-http2-response-splitting` to pass
after upgrading `nghttp2`.
PR-URL: https://github.com/nodejs/node/pull/14955
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-24 01:27:10 +02:00
Anna Henningsen
97d34ddf56
deps: fixup nghttp2 version number
...
PR-URL: https://github.com/nodejs/node/pull/14955
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-24 01:27:06 +02:00
Anna Henningsen
eb680964b4
deps: update nghttp2 to v1.25.0
...
PR-URL: https://github.com/nodejs/node/pull/14955
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-24 01:26:42 +02:00
Anna Henningsen
6a0e3b16f3
src: remove extra copy from Copy() in node_url.cc
...
The was copying the whole array and the strings in it without
any benefit.
PR-URL: https://github.com/nodejs/node/pull/14907
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-21 16:54:38 +02:00
Anna Henningsen
4766fcb96d
http2: minor refactor of passing headers to JS
...
- Make `ExternalString::New` return a `MaybeLocal`. Failing is
left up to the caller.
- Allow creating internalized strings for short header names
to reduce memory consumption and increase performance.
- Use persistent storage for statically allocated header names.
PR-URL: https://github.com/nodejs/node/pull/14808
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
2017-08-17 22:55:01 +02:00
Anna Henningsen
0d9afa0288
deps: cherry-pick eb306f463e from nghttp2 upstream
...
Original commit message:
lib: add nghttp2_rcbuf_is_static()
Add a `nghttp2_rcbuf_is_static()` method to tell whether a rcbuf
is statically allocated.
This can be useful for language bindings that wish to avoid
creating duplicate strings for these buffers; concretely, I am
planning to use this in the Node HTTP/2 module that is being
introduced.
Ref: https://github.com/nghttp2/nghttp2/commit/eb306f463efea645de611de2bff0a8f823deb048
PR-URL: https://github.com/nodejs/node/pull/14808
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
2017-08-17 22:54:28 +02:00
Anna Henningsen
9ecc440642
buffer: fix MAX_LENGTH constant export
...
This was a typo and accidentally returned the wrong value.
Fixes: https://github.com/nodejs/node/issues/14819
Ref: https://github.com/nodejs/node/pull/13467
PR-URL: https://github.com/nodejs/node/pull/14821
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2017-08-17 20:32:26 +02:00
Anna Henningsen
859a228594
util: use proper circular reference checking
...
Circular references are conceptually nothing that should be checked
for objects (or Sets or Maps) only, but applies to recursive structures
in general, so move the `seen` checks into a position where it is part
of the recursion itself.
Fixes: https://github.com/nodejs/node/issues/14758
PR-URL: https://github.com/nodejs/node/pull/14790
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben.bridgewater@fintura.de >
2017-08-17 20:27:00 +02:00
Anna Henningsen
491cc76871
src: use unordered_set instead of custom rb tree
...
Use a standard hash-based container instead of the custom included
red/black tree implementation. There is likely no noticeable
performance difference, and if there is one, it is very likely
to be an improvement.
PR-URL: https://github.com/nodejs/node/pull/14826
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-17 20:26:59 +02:00
Anna Henningsen
1fe0741e50
2017-08-15, Version 8.4.0 (Current)
...
Notable changes
* **HTTP2**
* Experimental support for the built-in `http2` has been added via the
`--expose-http2` flag.
[#14239 ](https://github.com/nodejs/node/pull/14239 )
* **Inspector**
* `require()` is available in the inspector console now.
[#8837 ](https://github.com/nodejs/node/pull/8837 )
* Multiple contexts, as created by the `vm` module, are supported now.
[#14465 ](https://github.com/nodejs/node/pull/14465 )
* **N-API**
* New APIs for creating number values have been introduced.
[#14573 ](https://github.com/nodejs/node/pull/14573 )
* **Stream**
* For `Duplex` streams, the high water mark option can now be set
independently for the readable and the writable side.
[#14636 ](https://github.com/nodejs/node/pull/14636 )
* **Util**
* `util.format` now supports the `%o` and `%O` specifiers for printing
objects.
[#14558 ](https://github.com/nodejs/node/pull/14558 )
PR-URL: https://github.com/nodejs/node/pull/14811
2017-08-15 15:05:22 -05:00
Anna Henningsen
afe68c1868
deps,tools: add missing nghttp2 license
...
Add `COPYING` from `nghttp2` and register it in
`tools/license-builder.sh`.
Also run `tools/license-builder.sh` and commit the
resulting `LICENSE` file.
Ref: https://github.com/nghttp2/nghttp2/blob/master/COPYING
PR-URL: https://github.com/nodejs/node/pull/14806
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-14 17:22:15 +02:00
Anna Henningsen
314217f8fb
doc: add missing changes: metadata for util
...
Ref: https://github.com/nodejs/node/pull/14558
PR-URL: https://github.com/nodejs/node/pull/14810
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2017-08-13 22:21:03 +02:00
Anna Henningsen
7e0c2ea92b
doc: add missing changes: metadata for streams
...
Ref: https://github.com/nodejs/node/pull/14636
PR-URL: https://github.com/nodejs/node/pull/14810
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2017-08-13 22:20:44 +02:00
Anna Henningsen
5ea25d2ebe
http2: name padding buffer fields
...
PR-URL: https://github.com/nodejs/node/pull/14744
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-13 17:21:00 +02:00
Anna Henningsen
e46ae99a2a
http2: use per-environment buffers
...
As discussed in the review for
https://github.com/nodejs/node/pull/14239 , these buffers should
be per-Environment rather than static.
PR-URL: https://github.com/nodejs/node/pull/14744
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-13 17:20:40 +02:00
Anna Henningsen
348dd66337
http2: improve perf of passing headers to C++
...
By passing a single string rather than many small ones and
a single block allocation for passing headers, save expensive
interactions with JS values and memory allocations.
PR-URL: https://github.com/nodejs/node/pull/14723
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-13 16:09:38 +02:00
Anna Henningsen
835c383969
n-api: add napi_get_node_version
...
Add `napi_get_node_version`, to help with feature-detecting
Node.js as an environment.
PR-URL: https://github.com/nodejs/node/pull/14696
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-12 21:28:59 +02:00
Anna Henningsen
a6973a3811
Revert "inspector: rewrite inspector test helper"
...
This reverts commit 2296b677fb .
That commit was landed without a green CI and is failing on Windows.
Ref: https://github.com/nodejs/node/pull/14460
PR-URL: https://github.com/nodejs/node/pull/14777
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-11 22:33:29 +02:00
Anna Henningsen
eb8f574229
src: add comments for cares library init refcount
...
Ref: https://github.com/nodejs/node/pull/14738
PR-URL: https://github.com/nodejs/node/pull/14743
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-11 21:33:37 +02:00
Anna Henningsen
39c67f43a2
src: remove duplicate loop
...
Two identical `while` loops after each other can be folded into
a single one.
PR-URL: https://github.com/nodejs/node/pull/14750
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Khaidi Chu <i@2333.moe >
2017-08-11 21:33:36 +02:00
Anna Henningsen
2421984727
zlib: check cleanup return values
...
PR-URL: https://github.com/nodejs/node/pull/14673
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-10 22:38:46 +02:00
Anna Henningsen
c80d400c01
Revert "test: disable MultipleEnvironmentsPerIsolate"
...
This reverts commit 95ab966a74 .
Ref: https://github.com/nodejs/node/issues/14206
Ref: https://github.com/nodejs/node/pull/14246
PR-URL: https://github.com/nodejs/node/pull/14749
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-08-10 22:09:44 +02:00
Anna Henningsen
ef7da4200d
Revert "test: add DISABLED_ prefix to commented out test"
...
This reverts commit 75bf8a9db9 .
Ref: https://github.com/nodejs/node/issues/14206
Ref: https://github.com/nodejs/node/pull/14317
PR-URL: https://github.com/nodejs/node/pull/14749
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-08-10 22:09:37 +02:00
Anna Henningsen
93f25f4b44
test: properly order freeing resources in cctest
...
The `IsolateData` instance is created before the `Environment` instance,
so free in reverse order.
Fixes: https://github.com/nodejs/node/issues/14206
PR-URL: https://github.com/nodejs/node/pull/14749
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-08-10 22:08:56 +02:00
Anna Henningsen
b559e66252
src: add overlooked handle to cleanup
...
The `Environment::destroy_ids_timer_handle` should be cleaned up
by `Environment::CleanupHandles()`. Fix that by adding it to the list.
This partially fixes a cctest.
Ref: https://github.com/nodejs/node/issues/14206
PR-URL: https://github.com/nodejs/node/pull/14749
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2017-08-10 22:07:09 +02:00
Anna Henningsen
66fd78e39d
async_hooks: CHECK that resource is not empty
...
This condition can be triggered through the public C++ embedder API.
PR-URL: https://github.com/nodejs/node/pull/14694
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-10 17:30:41 +02:00
Anna Henningsen
1419533df9
src: remove unused http2_socket_buffer from env
...
PR-URL: https://github.com/nodejs/node/pull/14740
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-10 17:12:54 +02:00
Anna Henningsen
d98606f968
src,http2: DRY header/trailer handling code up
...
Remove duplicate code through minor refactoring.
PR-URL: https://github.com/nodejs/node/pull/14688
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-08-10 13:47:26 +02:00
Anna Henningsen
b72e702247
2017-08-09, Version 8.3.0 (Current)
...
V8 6.0:
The V8 engine has been upgraded to version 6.0, which has a significantly
changed performance profile.
[#14574 ](https://github.com/nodejs/node/pull/14574 )
More detailed information on performance differences can be found at
https://medium.com/the-node-js-collection/get-ready-a-new-v8-is-coming-node-js-performance-is-changing-46a63d6da4de
Other notable changes:
* **DNS**
* Independent DNS resolver instances are supported now, with support for
cancelling the corresponding requests.
[#14518 ](https://github.com/nodejs/node/pull/14518 )
* **N-API**
* Multiple N-API functions for error handling have been changed to support
assigning error codes.
[#13988 ](https://github.com/nodejs/node/pull/13988 )
* **REPL**
* Autocompletion support for `require()` has been improved.
[#14409 ](https://github.com/nodejs/node/pull/14409 )
* **Utilities**
* The WHATWG Encoding Standard (`TextDecoder` and `TextEncoder`) has
been implemented as an experimental feature.
[#13644 ](https://github.com/nodejs/node/pull/13644 )
* **Added new collaborators**
* [XadillaX](https://github.com/XadillaX ) – Khaidi Chu
* [gabrielschulhof](https://github.com/gabrielschulhof ) – Gabriel Schulhof
Conflicts:
src/node_version.h
2017-08-09 21:56:19 -04:00
Anna Henningsen
1e569f42b6
zlib: fix crash when initializing failed
...
Unset `mode_` when initializing the zlib stream failed, so that
we don’t try to call the zlib end functions (`deflateEnd()` etc.)
when cleaning up in `ZCtx::Close()`.
Fixes: https://github.com/nodejs/node/issues/14178
Ref: https://github.com/nodejs/node/pull/13098
PR-URL: https://github.com/nodejs/node/pull/14666
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
2017-08-09 19:55:57 +02:00
Anna Henningsen
611851daba
child_process: fix handle passing w large payloads
...
Fix situations in which the handle passed along with a message
that has a large payload and can’t be read entirely by a single
`recvmsg()` call isn’t associated with the message to which it
belongs.
PR-URL: https://github.com/nodejs/node/pull/14588
Fixes: https://github.com/nodejs/node/issues/13778
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2017-08-08 16:00:30 -07:00
Anna Henningsen
efea3fcd35
src: use existing strings over creating new ones
...
This is a very very minor change.
PR-URL: https://github.com/nodejs/node/pull/14587
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-07 14:54:28 +02:00
Anna Henningsen
41a0dfcd97
src: properly manage timer in cares ChannelWrap
...
This fixes a bug introduced in 727b2911ec
where code managing the `uv_timer_t` for a `ChannelWrap` instance was
left unchanged, when it should have changed the lifetime of the handle
to being tied to the `ChannelWrap` instance’s lifetime.
Fixes: https://github.com/nodejs/node/issues/14599
Ref: https://github.com/nodejs/node/pull/14518
PR-URL: https://github.com/nodejs/node/pull/14634
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-07 13:48:49 +02:00
Anna Henningsen
fb3d0e25cb
console,test: make message test more accurate
...
Make a message test more accurate in what it’s testing for.
This requires not swallowing stack overflow RangeErrors in
`console.log` and similar methods, which I would consider a
bugfix in itself.
PR-URL: https://github.com/nodejs/node/pull/14580
Fixes: https://github.com/nodejs/node-v8/issues/5
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-08-03 15:41:14 +02:00
Anna Henningsen
8a8a6865c0
doc,net: assign deprecation code
...
Missed while landing 75a19fb379 .
Ref: https://github.com/nodejs/node/pull/14449
PR-URL: https://github.com/nodejs/node/pull/14576
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-02 00:35:21 +02:00
Anna Henningsen
0f5dabe4ed
dns: name generated functions
...
PR-URL: https://github.com/nodejs/node/pull/14518
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-01 19:57:24 +02:00
Anna Henningsen
732658e4cf
dns: add channel.cancel()
...
This can be used to implement custom timeouts.
Fixes: https://github.com/nodejs/node/issues/7231
PR-URL: https://github.com/nodejs/node/pull/14518
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-01 19:57:24 +02:00
Anna Henningsen
6e05970494
dns: enable usage of independent cares resolvers
...
Ref: https://github.com/nodejs/node/issues/7231
PR-URL: https://github.com/nodejs/node/pull/14518
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-01 19:57:23 +02:00
Anna Henningsen
727b2911ec
src,dns: refactor cares_wrap to avoid global state
...
PR-URL: https://github.com/nodejs/node/pull/14518
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-08-01 19:57:23 +02:00
Anna Henningsen
717a138b4a
zlib: fix interaction of flushing and needDrain
...
Fixes: https://github.com/nodejs/node/issues/14523
PR-URL: https://github.com/nodejs/node/pull/14527
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-07-31 22:44:05 +02:00
Anna Henningsen
d731369b1d
async_hooks: remove deprecated APIs
...
These APIs were introduced during the lifetime of Node 8 in an
experimental API and should safely be removable in Node 9+.
PR-URL: https://github.com/nodejs/node/pull/14414
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
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: Rich Trott <rtrott@gmail.com >
2017-07-27 20:02:01 +02:00
Anna Henningsen
29353e5a99
http: reset stream to unconsumed in unconsume()
...
Reset the underlying socket of an HTTP stream to be marked as
unconsume after the HTTP parser no longer owns it.
Fixes: https://github.com/nodejs/node/issues/14407
PR-URL: https://github.com/nodejs/node/pull/14410
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-07-26 20:06:09 +02:00
Anna Henningsen
75a19fb379
net,child_process: improve naming in internal code
...
All of this code is internal-only, and the changed variables/methods
are not generally useful to userland code.
When backporting this to release branches, it might be appropriate to
add non-enumerable aliases to be 100 % sure.
PR-URL: https://github.com/nodejs/node/pull/14449
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-26 20:03:51 +02:00
Anna Henningsen
57a4cebbd5
n-api: add fast paths for integer getters
...
Ref: https://github.com/nodejs/node/issues/14379
PR-URL: https://github.com/nodejs/node/pull/14393
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com >
2017-07-24 17:33:40 +02:00
Anna Henningsen
69f653dff9
test: add non-internet resolveAny tests
...
This is a bit of a check to see how people feel about having this kind
of test.
Ref: https://github.com/nodejs/node/pull/13137
PR-URL: https://github.com/nodejs/node/pull/13883
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-07-23 16:20:58 +02:00
Anna Henningsen
e76c49de33
deps: cherry-pick 18ea996 from c-ares upstream
...
Original commit message:
ares_parse_naptr_reply: make buffer length check more accurate
9478908a490a6bf009ba58d81de8c1d06d50a117 introduced a length check
for records parsed by `ares_parse_naptr_reply()`. However, that
function is designed to parse replies which also contain non-NAPTR
records; for A records, the `rr_len > 7` check will fail as there
are only 4 bytes of payload.
In particular, parsing ANY replies for NAPTR records was broken
by that patch.
Fix that by moving the check into the case in which it is already
known that the record is a NAPTR record.
Ref: https://github.com/c-ares/c-ares/commit/18ea99693d63f957ecb670045adbd2c1da8a4641
PR-URL: https://github.com/nodejs/node/pull/13883
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-23 16:20:58 +02:00
Anna Henningsen
b440e8e4e4
doc: describe labelling process for backports
...
Based on discussion from the first backporting team meeting.
PR-URL: https://github.com/nodejs/node/pull/12431
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2017-07-23 16:05:27 +02:00
Anna Henningsen
a3365c6ae9
doc: fix inspectPort documentation in cluster.md
...
- Add missing `changes:` entry
- Use full sentences
- Use proper indentation
Ref: https://github.com/nodejs/node/pull/14140
PR-URL: https://github.com/nodejs/node/pull/14349
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-07-18 20:42:42 +02:00
Anna Henningsen
4dff05f4a7
src: fix process.abort() interaction with V8
...
Since V8 5.9 V8 installs a default signal handler for some signals
when creating a default platform instance that prints a stack trace.
However, Node already does the same thing, so it would seem like the
two different stack traces would be printed; also, the V8 handler
would lead to a `SIGSEGV` under some circumstances, rather than
letting the abort continue normally.
Resolve this by disabling V8’s signal handler by default.
PR-URL: https://github.com/nodejs/node/pull/13985
Fixes: https://github.com/nodejs/node/issues/13865
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-02 15:42:22 -07:00
Anna Henningsen
a84c3be075
src: unset NODE_VERSION_IS_RELEASE
...
When 53b8c51e7c was cherry-picked into
`master`, `NODE_VERSION_IS_RELEASE` was accidentally set to `1` as well.
PR-URL: https://github.com/nodejs/node/pull/14005
Reviewed-By: Rod Vagg <rod@vagg.org >
2017-06-30 14:35:42 +02:00
Anna Henningsen
9a655e98a4
stream: fix undefined in Readable object mode
...
Fixes `this.push(undefined)`.
Fixes: https://github.com/nodejs/node/issues/13753
PR-URL: https://github.com/nodejs/node/pull/13760
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-06-21 22:24:38 +02:00
Anna Henningsen
d1027695b8
doc: mention rebasing of v?.x-staging post release
...
Mention that the staging branch should be rebased on top of the release
branch after merging a release proposal.
PR-URL: https://github.com/nodejs/node/pull/13742
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: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-06-21 22:22:49 +02: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
Anna Henningsen
9dc3f936c7
2017-06-13, Version 8.1.1 (Current)
...
* **Child processes**
* `stdout` and `stderr` are now available on the error output of a
failed call to the `util.promisify()`ed version of
`child_process.exec`.
[[`d66d4fc94c`](https://github.com/nodejs/node/commit/d66d4fc94c )]
[#13388 ](https://github.com/nodejs/node/pull/13388 )
* **HTTP**
* A regression that broke certain scenarios in which HTTP is used together
with the `cluster` module has been fixed.
[[`fff8a56d6f`](https://github.com/nodejs/node/commit/fff8a56d6f )]
[#13578 ](https://github.com/nodejs/node/pull/13578 )
* **HTTPS**
* The `rejectUnauthorized` option now works properly for unix sockets.
[[`c4cbd99d37`](https://github.com/nodejs/node/commit/c4cbd99d37 )]
[#13505 ](https://github.com/nodejs/node/pull/13505 )
* **Readline**
* A change that broke `npm init` and other code which uses `readline`
multiple times on the same input stream is reverted.
[[`0df6c0b5f0`](https://github.com/nodejs/node/commit/0df6c0b5f0 )]
[#13560 ](https://github.com/nodejs/node/pull/13560 )
PR-URL: https://github.com/nodejs/node/pull/13598
2017-06-13 15:32:26 -07:00