Shelley Vohr
297c9d1aa9
2019-01-29, Version 10.15.1 'Dubnium' (LTS)
...
* doc:
* add oyyd to collaborators (Ouyang Yadong) [#24300 ](https://github.com/nodejs/node/pull/24300 )
* tls:
* throw if protocol too long (Andre Jodat-Danbrani) [#23606 ](https://github.com/nodejs/node/pull/23606 )
PR-URL: https://github.com/nodejs/node/pull/25346
2019-01-29 09:46:10 -08:00
Sarath Govind K K
b7876ba6e1
src: elevate namespaces for repeated entities
...
PR-URL: https://github.com/nodejs/node/pull/24475
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-01-28 21:54:52 -08:00
Maya Anilson
4b82aa80fe
src: elevate namespaces of repeated artifacts
...
PR-URL: https://github.com/nodejs/node/pull/24429
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2019-01-28 21:54:52 -08:00
Shubham Urkade
bfde244576
src: elevate repeated use of v8 namespaced type
...
PR-URL: https://github.com/nodejs/node/pull/24427
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-01-28 21:54:52 -08:00
Daniel Bevenius
be14283bcd
src: use smart pointers in cares_wrap.cc
...
PR-URL: https://github.com/nodejs/node/pull/23813
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-01-28 21:54:52 -08:00
Gagandeep Singh
5e3c6799cb
http2: elevate v8 namespaces of repeated references
...
PR-URL: https://github.com/nodejs/node/pull/24453
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2019-01-28 21:54:52 -08:00
Kanika Singhal
fa52ba621b
src: elevate v8 namespaces of referenced artifacts
...
PR-URL: https://github.com/nodejs/node/pull/24424
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-01-28 21:54:52 -08:00
Anna Henningsen
fbf5321dcf
async_hooks: add HandleScopes to C++ embedder/addon API
...
Add `HandleScope`s to the public C++ API for embedders/addons,
since these methods create V8 handles that should not leak into
the outer scopes.
In particular, for some of the methods it was not clear from
the function signatures that these functions previously
needed to be invoked with a `HandleScope`.
PR-URL: https://github.com/nodejs/node/pull/24285
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2019-01-12 13:37:46 -08:00
Anna Henningsen
a1d7ed7de6
tracing: fix static destruction order issue
...
Sometimes, the `parallel/test-tracing-no-crash` would not work as
expected, at least on Windows, because there is a static destruction
race between tearing down the `NodeTraceWriter` instance and the
per-process options struct. If the per-process options were destroyed
before the `NodeTraceWriter`, the reference to the tracing filename
would be gone before opening the file was attempted.
This can be solved by creating a copy of the string when creating the
`NodeTraceWriter` instance rather than taking a reference.
Fixes: https://github.com/nodejs/node/issues/22523
PR-URL: https://github.com/nodejs/node/pull/24123
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-12-26 11:18:52 -05:00
alyssaq
9a69d030ce
src: reuse std::make_unique
...
Ref: https://github.com/nodejs/node/commit/283a967e356311a467113eea450a81827d43c969
PR-URL: https://github.com/nodejs/node/pull/24132
Refs: https://github.com/nodejs/node/commit/283a967e356311a467113eea450a81827d43c969
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
2018-12-26 11:18:51 -05:00
Anna Henningsen
44a1993e9d
src: avoid extra Persistent in DefaultTriggerAsyncIdScope
...
Instead of getting a reference to the main `AliasedBuffer`, which
would always unnecesarily allocate and destroy a `Persistent`
handle, store and use a reference to the owning object.
PR-URL: https://github.com/nodejs/node/pull/23844
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2018-12-26 11:18:46 -05:00
Anna Henningsen
15d05bbf02
src: simplify TimerFunctionCall() in node_perf.cc
...
Picking a path according to a boolean is essentially free,
compared to the cost of a function call. Also, remove an
unnecessary `TryCatch`.
PR-URL: https://github.com/nodejs/node/pull/23782
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-26 11:18:45 -05:00
Uttam Pawar
383d512ed7
src: memory management using smart pointer
...
Introduced use of smart pointers instead of MallocedBuffer to manage
memory allocated in the cares library.
PR-URL: https://github.com/nodejs/node/pull/23628
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-12-26 11:18:45 -05:00
Tobias Nießen
4749640b2e
crypto: reduce memory usage of SignFinal
...
The fixed-size buffer on the stack is unnecessary and way too large
for most applications. This change removes it and allocates the
required memory directly instead of copying into heap later.
PR-URL: https://github.com/nodejs/node/pull/23427
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-12-26 11:18:44 -05:00
Myles Borins
b3e1205008
Working on v10.15.1
...
PR-URL: https://github.com/nodejs/node/pull/25176
2018-12-26 11:14:42 -05:00
Myles Borins
1ae0511b94
2018-12-26, Version 10.15.0 'Dubnium' (LTS)
...
The 10.14.0 security release introduced some unexpected breakages on
the 10.x release line. This is a special release to fix a regression
in the HTTP binary upgrade response body and add a missing CLI flag
to adjust the max header size of the http parser.
Notable Changes:
* cli:
- add --max-http-header-size flag (cjihrig)
https://github.com/nodejs/node/pull/24811
* http:
- add maxHeaderSize property (cjihrig)
https://github.com/nodejs/node/pull/24860
PR-URL: https://github.com/nodejs/node/pull/25176
2018-12-25 10:09:17 -05:00
cjihrig and Matteo Collina
9b2ffc81c0
cli: add --max-http-header-size flag
...
Allow the maximum size of HTTP headers to be overridden from
the command line.
Backport-PR-URL: https://github.com/nodejs/node/pull/25168
co-authored-by: Matteo Collina <hello@matteocollina.com >
PR-URL: https://github.com/nodejs/node/pull/24811
Fixes: https://github.com/nodejs/node/issues/24692
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2018-12-25 02:17:24 -05:00
Matteo Collina
a57aed144a
src: add kUInteger parsing
...
This commit adds support for uint64_t option parsing.
Backport-PR-URL: https://github.com/nodejs/node/pull/25168
PR-URL: https://github.com/nodejs/node/pull/24811
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2018-12-25 02:17:24 -05:00
Matteo Collina
1aea1e3634
http: fix regression of binary upgrade response body
...
PR-URL: https://github.com/nodejs/node/pull/25039
Fixes: https://github.com/nodejs/node/issues/24958
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2018-12-25 02:17:24 -05:00
Joyee Cheung
527407c49f
src: cache the result of GetOptions() in JS land
...
Instead of calling into C++ each time we need to check the value
of a command line option, cache the option map in a new
`internal/options` module for faster access to the values in JS land.
PR-URL: https://github.com/nodejs/node/pull/24091
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-12-25 02:17:24 -05:00
Myles Borins
4a858b27c0
Working on v10.14.3
...
PR-URL: https://github.com/nodejs/node/pull/24727
2018-12-11 15:36:29 -05:00
Shelley Vohr
4128793a15
2018-12-11, Version 10.14.2 'Dubnium' (LTS)
...
Notable changes:
* deps:
* upgrade to c-ares v1.15.0 (Ben Noordhuis)
https://github.com/nodejs/node/pull/23854
* Windows:
* A crashing process will now show the names of stack frames if the node.pdb
file is available. (Refael Ackermann)
https://github.com/nodejs/node/pull/23822
* Added new collaborators:
* Peter Marshall. https://github.com/nodejs/node/pull/24170
* Masashi Hirano. https://github.com/nodejs/node/pull/24136
PR-URL: https://github.com/nodejs/node/pull/24727
2018-12-06 11:37:18 -05:00
Daniel Bevenius
9f8349c49c
n-api: add missing handle scopes
...
Currently when building with --debug
test/addons-napi/test_threadsafe_function will error:
$ out/Debug/node test/addons-napi/test_threadsafe_function/test.js
FATAL ERROR: v8::HandleScope::CreateHandle()
Cannot create a handle without a HandleScope
1: 0x10004e287 node::DumpBacktrace(__sFILE*) [node/out/Debug/node]
2: 0x1000cd37b node::Abort() [/node/out/Debug/node]
3: 0x1000cd69f node::OnFatalError(char const*, char const*)
[/node/out/Debug/node]
4: 0x1004df0b1 v8::Utils::ReportApiFailure(char const*, char const*)
[/nodejs/node/out/Debug/node]
5: 0x100a8c0a9 v8::internal::HandleScope::Extend(
v8::internal::Isolate*)
[/node/out/Debug/node]
6: 0x1004e4229 v8::EmbedderDataFor(v8::Context*,
int, bool,
char const*)
[/node/out/Debug/node]
7: 0x1004e43fa v8::Context::SlowGetAlignedPointerFromEmbedderData(int)
[/node/out/Debug/node]
8: 0x10001c26b v8::Context::GetAlignedPointerFromEmbedderData(int)
[/node/out/Debug/node]
9: 0x1000144ea node::Environment::GetCurrent(v8::Local<v8::Context>)
[/node/out/Debug/node]
10: 0x1000f49e2 napi_env__::node_env() const
[/node/out/Debug/node]
11: 0x1000f9885
(anonymous namespace)::v8impl::ThreadSafeFunction::
CloseHandlesAndMaybeDelete(bool)
[/node/out/Debug/node]
12: 0x1000fb34f (anonymous namespace)::v8impl::ThreadSafeFunction::
DispatchOne()
[/node/out/Debug/node]
13: 0x1000fb129
(anonymous namespace)::v8impl::ThreadSafeFunction::
IdleCb(uv_idle_s*)
[/node/out/Debug/node]
14: 0x1011a1b69 uv__run_idle
[/node/out/Debug/node]
15: 0x101198179 uv_run
[/node/out/Debug/node]
16: 0x1000dfca1
node::Start(...)
[/node/out/Debug/node]
17: 0x1000dae50 node::Start(...)
[/node/out/Debug/node]
18: 0x1000da56f node::Start(int, char**)
[/node/out/Debug/node]
19: 0x10141112e main
[/node/out/Debug/node]
20: 0x100001034 start
[/node/out/Debug/node]
Abort trap: 6
This commit adds two HandleScope's, one to CloseHandlesAndMaybeDelete
and one to the lambda.
SlowGetAlignedPointerFromEmbedderData will only be called for debug
builds:
https://github.com/v8/v8/blob/2ef0aa662fe907a1b36ac1abe7d77ad2bcd27733
/include/v8.h#L10440-L10447
PR-URL: https://github.com/nodejs/node/pull/24011
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-12-03 13:32:51 -05:00
Suresh Srinivas
c6ad469ae4
src: fix fully-static & large-pages combination
...
Fixes: https://github.com/nodejs/node/issues/23906
Refs: https://github.com/nodejs/node/pull/22079
This change to ld.implicit.script moves libc static code to
.lpstub area and avoids the issue detailed in 23906
Quick performance comparision on web-tooling shows 3%
improvement for the combination over fully-static
cycles 376,235,487,455 390,007,877,315
instructions 700,341,146,973 714,773,201,182
itlb_misses_walk_completed 20,654,246 28,908,381
itlb_misses_walk_completed_4k 19,884,666 28,865,118
itlb_misses_walk_completed_2m_4m 769,391 43,251
Score 9.13 8.86
PR-URL: https://github.com/nodejs/node/pull/23964
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-12-03 13:31:55 -05:00
Ouyang Yadong
d82e818848
src: use "constants" string instead of creating new one
...
Using the same "constants" string in c++.
PR-URL: https://github.com/nodejs/node/pull/23894
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2018-11-29 11:39:20 -05:00
Refael Ackermann
b4cdd478b9
src,win: informative stack traces
...
Refresh `Win32SymbolDebuggingContext::LookupSymbol` to use more APIs
PR-URL: https://github.com/nodejs/node/pull/23822
Refs: https://docs.microsoft.com/en-us/windows/desktop/Debug/retrieving-symbol-information-by-address
Refs: https://docs.microsoft.com/en-us/windows/desktop/Debug/retrieving-undecorated-symbol-names
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-11-29 11:39:20 -05:00
Anna Henningsen
4a79bef6c6
os: fix memory leak in userInfo()
...
This previously leaked memory in the ‘success’ case.
PR-URL: https://github.com/nodejs/node/pull/23893
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-11-29 11:39:18 -05:00
Anna Henningsen
d1c6238e1d
test: verify performance.timerify() works w/ non-Node Contexts
...
PR-URL: https://github.com/nodejs/node/pull/23784
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-11-29 11:39:14 -05:00
Anna Henningsen
02a54ed1fa
n-api: make per-Context-ness of napi_env explicit
...
Because instances of `napi_env` are created on a per-global-object
basis and because since most N-API functions refer to builtin JS
objects, `napi_env` is essentially in 1:1 correspondence with
`v8::Context`.
This was not clear from the implementation by itself, but has
emerged from conversations with the N-API team.
This patch changes the `napi_env` implementation to:
- Actually store the `v8::Context` it represents.
- Provide more direct access to the `node::Environment`
to which the `Context` belongs.
- Do not store the `uv_loop_t*` explicitly, since it can be
inferred from the `node::Environment` and we actually
have an N-API method for that.
- Replace calls to `isolate->GetCurrentContext()` with
the more appropriate `napi_env` `Context`.
- Implement a better (although not perfect) way of cleaning
up `napi_env` instances.
PR-URL: https://github.com/nodejs/node/pull/23689
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-11-29 11:39:13 -05:00
Daniel Bevenius
bb05aa3206
src: reduce duplication in tcp_wrap Connect
...
This commit extracts identical code from Connect and Connect6 into a
separate function to avoid some code duplication.
PR-URL: https://github.com/nodejs/node/pull/23753
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
2018-11-29 11:39:13 -05:00
Romain Lanz
b53b0d1475
src: refactor deprecated v8::String::NewFromTwoByte call
...
PR-URL: https://github.com/nodejs/node/pull/23803
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-11-29 11:39:10 -05:00
Daniel Bevenius
a97e79ce12
crypto: add SET_INTEGER_CONSANT macro
...
This commit introduces a SET_INTEGER_CONSANT macro to reduce some code
duplication in SecureContext::Initialize.
PR-URL: https://github.com/nodejs/node/pull/23687
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2018-11-29 11:39:09 -05:00
Romain Lanz
17db407ba2
src: refactor deprecated v8::Function::Call call
...
Refs: https://github.com/nodejs/node/pull/23414#issuecomment-428815506
PR-URL: https://github.com/nodejs/node/pull/23804
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-11-29 11:39:08 -05:00
Sam Roberts
90ac77440b
crypto: strip unwanted space from openssl version
...
Remove trailing " \n" from `process.versions.openssl`.
d3d6cd3eca was incorrectly printing this trailer, but because the
target buffer size was claimed to be the length of the version string,
the trailer was truncated off.
9ed4646df0 corrected the target buffer size, but then the trailer
started to appear in process.versions.
Added a test to check for regressions.
PR-URL: https://github.com/nodejs/node/pull/23678
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-11-29 11:39:07 -05:00
Shelley Vohr
6bc66bf756
src: fix CreatePlatform header param mismatch
...
Backport-PR-URL: https://github.com/nodejs/node/pull/23700
PR-URL: https://github.com/nodejs/node/pull/23947
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
2018-11-29 11:39:02 -05:00
Ali Ijaz Sheikh
511fa20983
src: trace_event: secondary storage for metadata
...
Metadata trace-events should be held in secondary storage so that they
can be periodically reemitted. This change establishes the secondary
storage and ensures that events are reemitted on each flush.
Backport-PR-URL: https://github.com/nodejs/node/pull/23700
PR-URL: https://github.com/nodejs/node/pull/20900
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Backport-PR-URL: https://github.com/nodejs/node/pull/23700
2018-11-29 11:39:02 -05:00
Suresh Srinivas
71557d3f70
src: initial large page (2M) support
...
Backport-PR-URL: https://github.com/nodejs/node/pull/23861
PR-URL: https://github.com/nodejs/node/pull/22079
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-11-29 11:39:01 -05:00
Bastian Krol
6a21d3e72f
async_hooks: add missing async_hooks destroys in AsyncReset
...
This adds missing async_hooks destroy calls for sockets (in
_http_agent.js) and HTTP parsers. We need to emit a destroy in
AsyncWrap#AsyncReset before assigning a new async_id when the instance
has already been in use and is being recycled, because in that case, we
have already emitted an init for the "old" async_id.
This also removes a duplicated init call for HTTP parser: Each time a
new parser was created, AsyncReset was being called via the C++ Parser
class constructor (super constructor AsyncWrap) and also via
Parser::Reinitialize.
Backport-PR-URL: https://github.com/nodejs/node/pull/23404
PR-URL: https://github.com/nodejs/node/pull/23272
Fixes: https://github.com/nodejs/node/issues/19859
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-11-29 11:39:01 -05:00
Tobias Nießen
806242bf40
crypto: remove DiffieHellman.initialised_
...
As pointed out by Ben Noordhuis, this internal field can be removed
since all instances are initialized when exposed to users.
PR-URL: https://github.com/nodejs/node/pull/23717
Refs: https://github.com/nodejs/node/pull/23648
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-11-29 11:39:00 -05:00
Steven Auger
f1fc05b45c
src: changed stdio_pipes_ to std::vector
...
PR-URL: https://github.com/nodejs/node/pull/23615
Reviewed-By: Sam Ruby <rubys@intertwingly.net >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-11-29 11:38:56 -05:00
Tobias Nießen
4b98ff299d
crypto: simplify internal state handling
...
Uninitialized instances are not exposed to users, so this condition should
always be true.
PR-URL: https://github.com/nodejs/node/pull/23648
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-11-29 11:38:56 -05:00
Tobias Nießen
d4b5f9f591
crypto: simplify error handling in ECDH::New
...
The type of the argument is being checked within JS which makes the
type checking in C++ unnecessary.
PR-URL: https://github.com/nodejs/node/pull/23647
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-11-29 11:38:56 -05:00
cjihrig
018a8683d6
src: update v8::Object::GetPropertyNames() usage
...
Use the non-deprecated version of GetPropertyNames().
PR-URL: https://github.com/nodejs/node/pull/23660
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-11-29 11:38:56 -05:00
Shelley Vohr
05409c9075
src: remove OCB support ifdef OPENSSL_NO_OCB
...
Electron uses BoringSSL which does not support OCB . It is also
possible to build OpenSSL without support for OCB for Node.js.
This commit disables OCB if OPENSSL_NO_OCB is defined.
PR-URL: https://github.com/nodejs/node/pull/23635
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-11-29 11:38:55 -05:00
Anna Henningsen
bae674ee5d
zlib: refactor zlib internals
...
Split out things that are specific to zlib as a specific
compression library, vs. the interface that is common to
most C compression libraries.
This should pave the way for including support for e.g.
brotli.
PR-URL: https://github.com/nodejs/node/pull/23360
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2018-11-29 11:38:54 -05:00
Gino Notto
e7bf838b1e
src: change macro to fn
...
Change base64_encoded_size and unbase64 to inline functions. The
base64_encoded_size is a constexpr to be used in function declarations.
PR-URL: https://github.com/nodejs/node/pull/23603
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2018-11-29 11:38:52 -05:00
Richard Hoehn
d152d7fb60
src: add default initializer in tls_wrap
...
PR-URL: https://github.com/nodejs/node/pull/23567
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-11-29 11:38:49 -05:00
Cody Hazelwood
3d76ab9287
src: use MallocedBuffer abstraction for buffers
...
Drop `Free` and `std::unique_ptr` in favor of Node's `MallocedBuffer`
for `char[]` buffer memory mangement.
PR-URL: https://github.com/nodejs/node/pull/23543
Reviewed-By: Anna Henningsen <anna@addaleax.net >
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: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
2018-11-29 11:38:43 -05:00
Andrew J D McCann
b258b377db
src: use default initializers over settings fields on the constructor
...
PR-URL: https://github.com/nodejs/node/pull/23532
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-11-29 11:38:40 -05:00
MarianneDr
e04a128731
src: remove unused UVHandle methods
...
PR-URL: https://github.com/nodejs/node/pull/23535
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-11-29 11:38:40 -05:00