aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2018-11-27lib: fix comment nits in bootstrap\loaders.jsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/24641 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-11-27lib: suppress crypto related env vars in help msgDaniel Bevenius
This commit adds a crypto check to suppress the crypto related environment variables introduced in Commit 399bb3c95af821350774c18f469ab700387f38e1 ("doc: add NODE_DEBUG_NATIVE to API docs"). Without this check, test/parallel/test-cli-node-print-help.js will fail when configured --without-ssl, as it some of the descriptions for these environment variables contain flags that the test is not expecting to find. PR-URL: https://github.com/nodejs/node/pull/24556 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-26lib: convert to arrow functionNaojirou Hisada
PR-URL: https://github.com/nodejs/node/pull/24596 Reviewed-By: Ron Korving <ron@ronkorving.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-26crypto: convert to arrow functionyosuke ota
Changed function expression to arrow function. PR-URL: https://github.com/nodejs/node/pull/24597 Reviewed-By: Ron Korving <ron@ronkorving.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-26lib: change anonymous function to arrow functiontakato
PR-URL: https://github.com/nodejs/node/pull/24589 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
2018-11-26lib: simplify own keys retrievalVse Mozhet Byt
This replacement can save us a function call, two array spreadings, and an array concatenation. PR-URL: https://github.com/nodejs/node/pull/24582 Refs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/ownKeys#Description Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-25lib: fix nits in lib/internal/bootstrap/cache.jsVse Mozhet Byt
* Unwrap short lines. * Unify comments. * Decrease function calls. PR-URL: https://github.com/nodejs/node/pull/24581 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-11-24net: emit "write after end" errors in the next tickOuyang Yadong
This commit makes those errors caused by calling `net.Socket.write()` after sockets ending be emitted in the next tick. PR-URL: https://github.com/nodejs/node/pull/24457 Fixes: https://github.com/nodejs/node/issues/24111 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-11-24crypto: allow monkey patching of pseudoRandomBytesGerhard Stoebich
Make `pseudoRandomBytes` and it's aliases `prng` and `rng` configurable to allow monkey patching. PR-URL: https://github.com/nodejs/node/pull/24108 Refs: https://github.com/nodejs/node/pull/22519 Refs: https://github.com/nodejs/node/pull/23017 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-24http2: fix session[kSession] undefined issueleeight
`finishSessionDestroy` session cleanup when already done. PR-URL: https://github.com/nodejs/node/pull/24547 Fixes: https://github.com/nodejs/node/issues/24546 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-22tls: add min/max protocol version optionsSam Roberts
The existing secureProtocol option only allows setting the allowed protocol to a specific version, or setting it to "all supported versions". It also used obscure strings based on OpenSSL C API functions. Directly setting the min or max is easier to use and explain. PR-URL: https://github.com/nodejs/node/pull/24405 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
2018-11-22net,dgram: add ipv6Only option for net and dgramOuyang Yadong
For TCP servers, the dual-stack support is enable by default, i.e. binding host "::" will also make "0.0.0.0" bound. This commit add ipv6Only option in `net.Server.listen()` and `dgram.createSocket()` methods which allows to disable dual-stack support. Support for cluster module is also provided in this commit. Fixes: https://github.com/nodejs/node/issues/17664 PR-URL: https://github.com/nodejs/node/pull/23798 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-22http: change DEP0066 to a runtime deprecationMorgan Roderick
Change doc-only deprecation for _headers and _headerNames accessors to a runtime deprecation. PR-URL: https://github.com/nodejs/node/pull/24167 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-11-21http2: cleanup endStream logicJames M Snell
PR-URL: https://github.com/nodejs/node/pull/24063 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Note: Landed with one collaborator approval after PR was open for 18 days
2018-11-21http2: set js callbacks onceJames M Snell
Make the http2 binding a bit more efficient by setting the callback functions once when the module is loaded rather than for each `Http2Session` and `Http2Stream`. PR-URL: https://github.com/nodejs/node/pull/24063 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Note: Landed with one collaborator approval after PR was open for 18 days
2018-11-21http2: throw from mapToHeadersJames M Snell
PR-URL: https://github.com/nodejs/node/pull/24063 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Note: Landed with one collaborator approval after PR was open for 18 days
2018-11-21stream: correctly pause and resume after once('readable')Matteo Collina
Fixes: https://github.com/nodejs/node/issues/24281 PR-URL: https://github.com/nodejs/node/pull/24366 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-11-21net,http2: merge after-write codeAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/24380 Refs: https://github.com/nodejs/node/issues/19060 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-11-20lib: move encodeStr function to internal for reusableZYSzys
PR-URL: https://github.com/nodejs/node/pull/24242 Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-20cli: add missing env vars to --helpcjihrig
This adds NODE_TLS_REJECT_UNAUTHORIZED, SSL_CERT_DIR, SSL_CERT_FILE, and UV_THREADPOOL_SIZE to the --help menu. PR-URL: https://github.com/nodejs/node/pull/24383 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-11-20readline: add support for async iterationTimothy Gu
Co-authored-by: Ivan Filenko <ivan.filenko@protonmail.com> Fixes: https://github.com/nodejs/node/issues/18603 Refs: https://github.com/nodejs/node/pull/18904 PR-URL: https://github.com/nodejs/node/pull/23916 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2018-11-20http2: replace unreachable error with assertionRich Trott
"That particular `emit('error', ...)` is largely defensively coded and should not ever actually happen." Sounds like an assertion rather than an error event. The code in question has no test coverage because it is believed to be unreachable. Fixes: https://github.com/nodejs/node/issues/20673 PR-URL: https://github.com/nodejs/node/pull/24407 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-11-20console: improve code readabilitygengjiawen
use object spread to make console code more readable PR-URL: https://github.com/nodejs/node/pull/24412 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-11-20http2: order declarations in http2.jsZYSzys
PR-URL: https://github.com/nodejs/node/pull/24411 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-11-20util: remove unreachable branchrahulshuklab4u
Re-defining the array length will always set to 0. Hence, the code branch can not be covered. PR-URL: https://github.com/nodejs/node/pull/24447 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-20lib: refactor setupInspector in bootstrap/node.jsleeight
`CJSModule` is not used in `setupGlobalConsole`, so we can move it to `setupInspector` and remove the argument from `setupInspector`. PR-URL: https://github.com/nodejs/node/pull/24446 Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-11-19fs: inline typeof checkdexterleng
PR-URL: https://github.com/nodejs/node/pull/24390 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-19repl: handle buffered string logic on finishAnto Aravinth
Looks like `clearBufferedCommand` will be called on almost all flows. Hence history was broken. PR-URL: https://github.com/nodejs/node/pull/24389 Fixes: https://github.com/nodejs/node/issues/24385 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-11-20src: use STL containers instead of v8 values for static module dataJoyee Cheung
Instead of putting the source code and the cache in v8::Objects, put them in per-process std::maps. This has the following benefits: - It's slightly lighter in weight compared to storing things on the v8 heap. Also it may be slightly faster since the preivous v8::Object is already in dictionary mode - though the difference is very small given the number of native modules is limited. - The source and code cache generation templates are now much simpler since they just initialize static arrays and manipulate STL constructs. - The static native module data can be accessed independently of any Environment or Isolate, and it's easy to look them up from the C++'s side. - It's now impossible to mutate the source code used to compile native modules from the JS land since it's completely separate from the v8 heap. We can still get the constant strings from process.binding('natives') but that's all. A few drive-by fixes: - Remove DecorateErrorStack in LookupAndCompile - We don't need to capture the exception to decorate when we encounter errors during native module compilation, as those errors should be syntax errors and v8 is able to decorate them well. We use CompileFunctionInContext so there is no need to worry about wrappers either. - The code cache could be rejected when node is started with v8 flags. Instead of aborting in that case, simply keep a record in the native_module_without_cache set. - Refactor js2c.py a bit, reduce code duplication and inline Render() to make the one-byte/two-byte special treatment easier to read. PR-URL: https://github.com/nodejs/node/pull/24384 Fixes: https://github.com/Remove Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-19events: extract listener check as a functionZYSzys
PR-URL: https://github.com/nodejs/node/pull/24303 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-18lib: set stderr._destroy to dummyDestroyJoyee Cheung
This seems to be typo: we are setting stdout._destroy instead of stderr._destroy in the getter of stderr. PR-URL: https://github.com/nodejs/node/pull/24398 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-11-18stream: do not use crypto.DEFAULT_ENCODING in lazy_transform.jsJoyee Cheung
The default encoding can be retrieved via `require('internal/crypto/util').getDefaultEncoding` instead of the deprecated crypto.DEFAULT_ENCODING which triggers a warning. Background: The require chain goes like this: ``` internal/streams/lazy_transform.js -> crypto.js -> internal/crypto/cipher.js (uses LazyTransform in the global scope) -> internal/streams/lazy_transform.js ``` So when `internal/streams/lazy_transform.js` is required before `lib/crypto.js`, we have a circular dependency and since `internal/crypto/cipher.js` uses destructuring to use LazyTransform we will get an error. And it can also trigger a warning if lazy_transform.js is the first file that touches crypto.DEFAULT_ENCODING. PR-URL: https://github.com/nodejs/node/pull/24396 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-16fs: make process.binding('fs') internalMasashi Hirano
Refs: https://github.com/nodejs/node/issues/22160 PR-URL: https://github.com/nodejs/node/pull/22478 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2018-11-16Revert "net: partially revert "simplify Socket.prototype._final""Anna Henningsen
This reverts commit ac1f56c76a5d1a8ebcb2421d5c629e51df1ac48c. Refs: https://github.com/nodejs/node/pull/24288 Refs: https://github.com/nodejs/node/pull/24075 PR-URL: https://github.com/nodejs/node/pull/24290 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
2018-11-16tls: destroy TLS socket if StreamWrap is destroyedAnna Henningsen
Previously, there was no mechanism in place that would have destroyed the TLS socket once the underlying socket had been closed. PR-URL: https://github.com/nodejs/node/pull/24290 Refs: https://github.com/nodejs/node/pull/24288 Refs: https://github.com/nodejs/node/pull/24075 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
2018-11-16tls: do not rely on 'drain' handlers in StreamWrapAnna Henningsen
`'drain'` event handlers may not be invoked if the stream is currently finishing. Instead, use the fact that we know when writes are active or not, and invoke the delayed shutdown handler from our own after-write callback. PR-URL: https://github.com/nodejs/node/pull/24290 Refs: https://github.com/nodejs/node/pull/24288 Refs: https://github.com/nodejs/node/pull/24075 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
2018-11-15lib: gather all errors constant in the same place for consistencyZYSzys
PR-URL: https://github.com/nodejs/node/pull/24038 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-15stream: change comment on duplex stream optionsJesse W. Collins
'options.XXX' did not convey to me how to use camelCase for different readable and writable options on a duplex stream. Give an example instead. PR-URL: https://github.com/nodejs/node/pull/24247 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-11-15tls: emit a warning when servername is an IP addressRodger Combs
Setting the TLS ServerName to an IP address is not permitted by RFC6066. This will be ignored in a future version. Refs: https://github.com/nodejs/node/pull/18127 PR-URL: https://github.com/nodejs/node/pull/23329 Fixes: https://github.com/nodejs/node/issues/18071 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: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-11-15net: always invoke after-write callbackAnna Henningsen
This is part of the streams API contract, and aligns network sockets with other streams in this respect. PR-URL: https://github.com/nodejs/node/pull/24291 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-11-14lib: improved conditional check in zlibDan Corman
PR-URL: https://github.com/nodejs/node/pull/24190 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-11-14timers: fix priority queue removeAtAnatoli Papirovski
PR-URL: https://github.com/nodejs/node/pull/24322 Fixes: https://github.com/nodejs/node/issues/24320 Fixes: https://github.com/nodejs/node/issues/24362 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-11-14Revert "util: change util.inspect depth default"Gus Caplan
This reverts commit ac7450a09a4c167cd43c14d7c88721d22f077529. This fully reverts the changes to util.inspect depth. It has caused breakage in logging to existing apps, and even something as simple as `console.log(require)` will cause >1m freezes. I've heard nothing but negative feedback (seriously not a single person has expressed anything positive about this change) and personally i find this change extremely annoying. PR-URL: https://github.com/nodejs/node/pull/24326 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
2018-11-14http: else case is not reachableszabolcsit
While checking the arguments passed to http.Server, the case where the options argument was of wrong type was not handled. Now it throws an ERR_INVALID_ARG_TYPE error if the options argument is not a function, object, null, or undefined. PR-URL: https://github.com/nodejs/node/pull/24176 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-11-15src: compile native modules and their code cache in C++Joyee Cheung
This patch refactors out a part of NativeModule.prototype.compile (in JS land) into a C++ NativeModule class, this enables a couple of possibilities: 1. By moving the code to the C++ land, we have more opportunity to specialize the compilation process of the native modules (e.g. compilation options, code cache) that is orthogonal to how user land modules are compiled 2. We can reuse the code to compile bootstrappers and context fixers and enable them to be compiled with the code cache later, since they are not loaded by NativeModule in the JS land their caching must be done in C++. 3. Since there is no need to pass the static data to JS for compilation anymore, this enables us to use (std::map<std::string, const char*>) in the generated node_code_cache.cc and node_javascript.cc later, and scope every actual access to the source of native modules to a std::map lookup instead of a lookup on a v8::Object in dictionary mode. This patch also refactor the code cache generator and tests a bit and trace the `withCodeCache` and `withoutCodeCache` in a Set instead of an Array, and makes sure that all the cachable builtins are tested. PR-URL: https://github.com/nodejs/node/pull/24221 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-11-13fs,net: standardize `pending` stream propertyAnna Henningsen
Use the same property name as http2 does to indicate that the stream is in the state before the `ready` event is emitted. PR-URL: https://github.com/nodejs/node/pull/24067 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-13tls: get the local certificate after tls handshakeSam Roberts
Add an API to get the local certificate chosen during TLS handshake from the SSL context. Fix: https://github.com/nodejs/node/issues/24095 PR-URL: https://github.com/nodejs/node/pull/24261 Fixes: https://github.com/nodejs/node/issues/24095 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-11-13net: add comments explaining error checkSteven Gabarro
PR-URL: https://github.com/nodejs/node/pull/24222 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-11-13net: remove unreachable check in internalConnectPhilipp Dunkel
Checked all call-sites to ensure that this code is truly unreachable. addressType is always checked before internalConnect is even called. PR-URL: https://github.com/nodejs/node/pull/24158 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-11-13Revert "child_process: change windowsHide default to true"Rich Trott
This reverts commit 420d8afe3db22ad703e74892f58f9e32d34ff699. PR-URL: https://github.com/nodejs/node/pull/24034 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>