summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* src: name EmbededderGraph edges and use class names for nodesJoyee Cheung2018-10-0440-405/+574
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch: - Refactors the `MemoryRetainer` API so that the impementer no longer calls `TrackThis()` that sets the size of node on the top of the stack, which may be hard to understand. Instead now they implements `SelfSize()` to provide their self sizes. Also documents the API in the header. - Refactors `MemoryTracker` so it calls `MemoryInfoName()` and `SelfSize()` of `MemoryRetainer` to retrieve info about them, and separate `node_names` and `edge_names` so the edges can be properly named with reference names and the nodes can be named with class names. (Previously the nodes are named with reference names while the edges are all indexed and appear as array elements). - Adds `SET_MEMORY_INFO_NAME()`, `SET_SELF_SIZE()` and `SET_NO_MEMORY_INFO()` convenience macros - Fixes a few `MemoryInfo` calls in some `MemoryRetainers` to track their references properly. - Refactors the heapdump tests to check both node names and edge names, distinguishing between wrapped JS nodes (without prefixes) and embedder wrappers (prefixed with `Node / `). PR-URL: https://github.com/nodejs/node/pull/23072 Reviewed-By: Anna Henningsen <anna@addaleax.net>
* src: clean up zlib write codeAnna Henningsen2018-10-041-38/+42
| | | | | | | | | | | Split the existing `Write()` method into one that takes care of translating the arguments from JS to C++, and a non-static method for the actual write operations, as well as some minor stylistic drive-by fixes. PR-URL: https://github.com/nodejs/node/pull/23183 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
* src: use default parameters for `UVException()`Anna Henningsen2018-10-042-16/+2
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/23176 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* src: deprecate `UVException()` without `Isolate*`Anna Henningsen2018-10-041-2/+3
| | | | | | | | | | | | | | | This method, like all other methods which use `Isolate::GetCurrent()`, should be avoided. This was probably overlooked in 75adde07f9a2de7f38a. PR-URL: https://github.com/nodejs/node/pull/23175 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* src: deprecate V8 date conversion helpersAnna Henningsen2018-10-041-3/+10
| | | | | | | | | | | These helpers provide no benefit over the existing V8 API, and at least one of them fetches the current `Isolate` through `Isolate::GetCurrent()` (which should be avoided). PR-URL: https://github.com/nodejs/node/pull/23179 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: remove public API for option variablesAnna Henningsen2018-10-036-57/+10
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/23069 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
* src: use JS inheritance for `AsyncWrap`Anna Henningsen2018-10-0327-192/+132
| | | | | | | | | | | | | For all classes descending from `AsyncWrap`, use JS inheritance instead of manually adding methods to the individual classes. This allows cleanup of some code around transferring handles over IPC. PR-URL: https://github.com/nodejs/node/pull/23094 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* http2: set nghttp2_option_set_no_closed_streamsDavid Halls2018-10-031-0/+4
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/23134 Fixes: https://github.com/nodejs/node/issues/23116 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* build: encapsulate node/inspector gyp scafoldingRefael Ackermann2018-10-021-0/+149
| | | | | | PR-URL: https://github.com/nodejs/node/pull/23156 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* util: update definition of DISALLOW_COPY_AND_ASSIGN macroNitish Sakhawalkar2018-10-021-3/+1
| | | | | | PR-URL: https://github.com/nodejs/node/pull/23092 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
* crypto: make PEM parsing RFC7468-compliantTobias Nießen2018-10-021-32/+51
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/23164 Fixes: https://github.com/nodejs/node/issues/13612 Fixes: https://github.com/nodejs/node/issues/22815 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
* crypto: add support for PEM-level encryptionTobias Nießen2018-10-021-12/+20
| | | | | | | | | | | This adds support for PEM-level encryption as defined in RFC 1421. PEM-level encryption is intentionally unsupported for PKCS#8 private keys since PKCS#8 defines a newer encryption format. PR-URL: https://github.com/nodejs/node/pull/23151 Refs: https://github.com/nodejs/node/pull/22660 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: fix indentation for `AsyncResource`Anna Henningsen2018-10-011-78/+78
| | | | | | | | | | | | | | | This un-breaks the linter, which currently does not seem to run on this part of the file. PR-URL: https://github.com/nodejs/node/pull/23177 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* crypto: replace gotosTobias Nießen2018-10-011-12/+4
| | | | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/23132 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* url: use foreach-style C++ loopTobias Nießen2018-10-011-3/+2
| | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/23138 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* src: remove unused using declarationsDaniel Bevenius2018-10-011-4/+0
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/23120 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: remove unused locale.hDaniel Bevenius2018-10-011-1/+0
| | | | | | | | | | | This commit removes the locale.h header as it does not look like it is used. PR-URL: https://github.com/nodejs/node/pull/23120 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: make req_wrap a unique_ptr in AfterConnectDaniel Bevenius2018-10-011-3/+2
| | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/23115 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: use unique_ptr for obj in SetWeak lambdaDaniel Bevenius2018-10-011-2/+1
| | | | | | PR-URL: https://github.com/nodejs/node/pull/23117 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: unique_ptrs in few lambdasGireesh Punathil2018-10-011-6/+3
| | | | | | | | | | | | Few lambdas in src/node_file.cc uses conventional pointers, turn those into unique_ptr semantics PR-URL: https://github.com/nodejs/node/pull/23124 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* crypto: remove unnecessary calls to TLS_method()Daniel Bevenius2018-09-281-4/+1
| | | | | | PR-URL: https://github.com/nodejs/node/pull/23077 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: refactor crypto code with RAII cleanupGireesh Punathil2018-09-281-7/+11
| | | | | | | | | | | | | | | | use more idiomatic expressions with RAII primitives, instead of old style goto PR-URL: https://github.com/nodejs/node/pull/23014 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* crypto: enable auto cert chaining for BoringSSLJeremy Apthorp2018-09-271-0/+5
| | | | | | | | | | | | OpenSSL enables this feature by default, but BoringSSL doesn't. This change makes it so that when building node with BoringSSL, the behaviour matches OpenSSL's. PR-URL: https://github.com/nodejs/node/pull/22110 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* errors: use ERR_OUT_OF_RANGE for index errorsRich Trott2018-09-262-8/+19
| | | | | | | | | | | | | Remove ERR_INDEX_OUT_OF_RANGE in favor of ERR_OUT_OF_RANGE which is capable of providing more detail. (In one instance, use ERR_BUFFER_OUT_OF_BOUNDS which is more accurate in that one instance.) PR-URL: https://github.com/nodejs/node/pull/22969 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com>
* crypto: deduplicate cipher initialization codeTobias Nießen2018-09-262-77/+64
| | | | | | | | | | | CipherBase::Init and CipherBase::InitIv contain a lot of duplicate code, this commit moves that into a separate function. PR-URL: https://github.com/nodejs/node/pull/23011 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
* worker: reduce `MessagePort` prototype to documented APIAnna Henningsen2018-09-261-4/+0
| | | | | | | | | | | | | | | `MessagePort` is special because it has to be a C++ API that is exposed to userland. Therefore, there is a number of internal methods on its native prototype; this commit reduces this set of methods to only what is documented in the API. PR-URL: https://github.com/nodejs/node/pull/23037 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
* worker: hide MessagePort init function behind symbolAnna Henningsen2018-09-263-2/+6
| | | | | | | | | | | This reduces unintended exposure of internals. PR-URL: https://github.com/nodejs/node/pull/23037 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: simplify `MessagePort` construction code a bitAnna Henningsen2018-09-261-2/+2
| | | | | | | | | | | | Using `ASSIGN_OR_RETURN_UNWRAP` would return if the created `MessagePort` object had no internal fields. That would be a bug, so switch to a checked conversion instead. PR-URL: https://github.com/nodejs/node/pull/23036 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* src: fix a typo in the commentGireesh Punathil2018-09-251-1/+1
| | | | | | | | | | | | | | withing -> within PR-URL: https://github.com/nodejs/node/pull/23078 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* cli: normalize `_` → `-` when parsing optionsAnna Henningsen2018-09-252-20/+11
| | | | | | | | | | | | | | | | This allows for option syntax similar to V8’s one, e.g. `--no_warnings` has the same effect as `--no-warnings`. PR-URL: https://github.com/nodejs/node/pull/23020 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
* process: add `multipleResolves` eventRuben Bridgewater2018-09-252-21/+37
| | | | | | | | | | | | | | | | This adds the `multipleResolves` event to track promises that resolve more than once or that reject after resolving. It is important to expose this to the user to make sure the application runs as expected. Without such warnings it would be very hard to debug these situations. PR-URL: https://github.com/nodejs/node/pull/22218 Fixes: https://github.com/nodejs/promises-debugging/issues/8 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
* src: cache and resue isolate and contex pointersGireesh Punathil2018-09-251-66/+83
| | | | | | | | | | | | | Many places these values are obtained through `env` pointer that incurs function calls. Source in once and re-use as much as possible. There are more of this pattern in this file, but those are either one-time use or used in conditional blocks which means sourcing-in those data early may not be beneficial. PR-URL: https://github.com/nodejs/node/pull/23024 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
* src: use RAII cleanup in node_i18n.ccAnna Henningsen2018-09-251-8/+8
| | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/23021 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* src: define zlib constants in node_zlib.ccAnna Henningsen2018-09-253-63/+55
| | | | | | | | | This is in order to avoid having two separate definitions for `node_zlib_mode`. PR-URL: https://github.com/nodejs/node/pull/23019 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
* src: make `ZCtx::Init()` non-staticAnna Henningsen2018-09-251-38/+38
| | | | | | PR-URL: https://github.com/nodejs/node/pull/23019 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
* src: refactor zlib dictionary to STL vectorAnna Henningsen2018-09-251-35/+28
| | | | | | PR-URL: https://github.com/nodejs/node/pull/23019 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
* crypto: remove unnecessary usage of gotoTobias Nießen2018-09-251-3/+1
| | | | | | | | | | | | | | The control flow can easily be refactored to use break instead of goto. PR-URL: https://github.com/nodejs/node/pull/23018 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* string_decoder: fix number of replacement charsAnna Henningsen2018-09-241-6/+7
| | | | | | | | | | | Fixes: https://github.com/nodejs/node/issues/22626 PR-URL: https://github.com/nodejs/node/pull/22709 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* src: replace deprecated uses of FunctionTemplate::GetFunctionAndreas Haas2018-09-2430-58/+102
| | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/22993 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
* http2: add ping eventJames M Snell2018-09-232-5/+13
| | | | | | | | | | | | | Add a `Http2Session` event whenever a non-ack `PING` is received. Fixes: https://github.com/nodejs/node/issues/18514 PR-URL: https://github.com/nodejs/node/pull/23009 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
* src: remove calls to SetWrapperClassId()Joyee Cheung2018-09-233-8/+0
| | | | | | | | | | | | | | We have migrated from the deprecated RetainedObjectInfo API to the new EmbedderGraph API, so there is no need to take care of wrapper class ids anymore since they are dedicated to the deprecated API (the new API uses a graph instead of ids to retrieve info about nodes). PR-URL: https://github.com/nodejs/node/pull/22975 Refs: https://github.com/nodejs/node/pull/21741 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* lib: implement queueMicrotaskGus Caplan2018-09-231-0/+13
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/22951 Refs: https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* src: refactor win32 `DebugProcess()` to use RAII cleanupAnna Henningsen2018-09-231-21/+23
| | | | | | | | | | | | | Prefer more idiomatic C++ cleanup code over `goto`. PR-URL: https://github.com/nodejs/node/pull/22981 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
* src: update postmortem constantscjihrig2018-09-221-3/+3
| | | | | | | | | | | | Update two postmortem constants in the ustack helper that changed while moving to V8 7.0. PR-URL: https://github.com/nodejs/node/pull/22754 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* src: use HeapStatistics to get external memoryRodrigo Bruno2018-09-221-1/+1
| | | | | | | | | | | | | | | V8 is improving the way external memory is internally managed and how it is reported. External memory should now be retrieved using HeapStatistics. Refs: https://github.com/v8/node/pull/80 PR-URL: https://github.com/nodejs/node/pull/22754 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* src: update NODE_MODULE_VERSION to 67Michaël Zasso2018-09-221-1/+2
| | | | | | | | | | | | | | Major V8 updates are usually API/ABI incompatible with previous versions. This commit adapts NODE_MODULE_VERSION for V8 7.0. Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md PR-URL: https://github.com/nodejs/node/pull/22754 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* src: add CheckOptions to Options classesDaniel Bevenius2018-09-224-44/+61
| | | | | | | | | | | | | | | | This commit adds a CheckOptions function that the options classes can optionally implement to check that options specified are correct (dependencies between options are met or options that are mutually exclusive). In the process of doing this the error pointer passed to Parse was changed to be of type vector so that potentially multiple options check failures can be reported. PR-URL: https://github.com/nodejs/node/pull/22943 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* http2: add origin frame supportJames M Snell2018-09-213-7/+147
| | | | | PR-URL: https://github.com/nodejs/node/pull/22956 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* crypto: do not allow multiple calls to setAuthTagTobias Nießen2018-09-211-5/+2
| | | | | | | | | | | Calling setAuthTag multiple times can result in hard to detect bugs since to the user, it is unclear which invocation actually affected OpenSSL. PR-URL: https://github.com/nodejs/node/pull/22931 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
* tools: add bash completion for nodeDaniel Bevenius2018-09-212-0/+4
| | | | | | | | | | | | | | | This commit adds a --completion-bash option to node which can be sourced to provide bash code completion for node options. Usage: $ node --completion-bash > node_bash_completion $ source node_bash_completion $ node --[tab] PR-URL: https://github.com/nodejs/node/pull/20713 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>