summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* n-api: refactoring napi_create_function testingOctavian Soldea2019-07-313-69/+42
| | | | | | | | | | | | | This is a refactoring of https://github.com/nodejs/node/pull/26998 following https://github.com/nodejs/node/pull/28505. The functions `add_last_status()` and `add_returned_status()` are now reused, see also https://github.com/nodejs/node/pull/28848. PR-URL: https://github.com/nodejs/node/pull/28894 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* doc: include "exports" resolver specificationguybedford2019-07-311-2/+27
| | | | | | PR-URL: https://github.com/nodejs/node/pull/28899 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* src: allow generic C++ callables in SetImmediate()Anna Henningsen2019-08-0112-163/+206
| | | | | | | | | | | Modify the native `SetImmediate()` functions to take generic C++ callables as arguments. This makes passing arguments to the callback easier, and in particular, it allows passing `std::unique_ptr`s directly, which in turn makes sure that the data they point to is deleted if the `Environment` is torn down before the callback can run. PR-URL: https://github.com/nodejs/node/pull/28704 Reviewed-By: James M Snell <jasnell@gmail.com>
* module: unify package exports test for CJS and ESMJan Krems2019-07-316-90/+102
| | | | | | | | Refs: https://github.com/nodejs/modules/issues/358 PR-URL: https://github.com/nodejs/node/pull/28831 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* 2019-07-31, Version 10.16.1 'Dubnium' (LTS)Beth Griggs2019-07-312-1/+47
| | | | | | | | | | Notable changes: - **deps**: upgrade openssl sources to 1.1.1c (Sam Roberts) [#28212](https://github.com/nodejs/node/pull/28212) - **stream**: do not unconditionally call `\_read()` on `resume()` (Anna Henningsen) [#26965](https://github.com/nodejs/node/pull/26965) - **worker**: fix nullptr deref after MessagePort deser failure (Anna Henningsen) [#25076](https://github.com/nodejs/node/pull/25076) PR-URL: https://github.com/nodejs/node/pull/28731
* doc: revoke DEP0089cjihrig2019-07-311-4/+7
| | | | | | | | | | | | Using the legacy assert module is not discouraged. Revoke DEP0089 to avoid user confusion. PR-URL: https://github.com/nodejs/node/pull/28892 Fixes: https://github.com/nodejs/node/issues/28780 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* inspector: report all workersEugene Ostroukhov2019-07-304-9/+108
| | | | | | | | | | Main thread (the one that WS endpoint connects to) should be able to report all workers. PR-URL: https://github.com/nodejs/node/pull/28872 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* test: use assert.throws() in test-require-json.jsAlejandro Nanez2019-07-301-6/+5
| | | | | | | | | | | Use assert.throws() instead of try/catch. PR-URL: https://github.com/nodejs/node/pull/28358 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* doc: add example about emitter.emit in events documentationFelipe Duitama2019-07-301-0/+34
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/28374 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* worker: handle calling terminate when kHandler is nullelyalvarado2019-07-302-2/+30
| | | | | | | | | | | | | | | This PR makes a change to the Worker.terminate() when called if the kHandler is null. Before this pull request it was returning undefined, but the API is expecting a promise. With the changes in this PR if terminate is called a Promise.resolve() is returned, unless a callback is passed in which case the old behavior stays (returns undefined). PR-URL: https://github.com/nodejs/node/pull/28370 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* lib: replace var with let in loaders.jsmbj362019-07-301-1/+1
| | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/28081 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* benchmark, http: refactor for code consistencyAlex Ramirez2019-07-304-5/+5
| | | | | | | | In benchmark http directory this changes for loops using var to let when it applies for consistency PR-URL: https://github.com/nodejs/node/pull/28791 Reviewed-By: Rich Trott <rtrott@gmail.com>
* build: remove support for s390 (but not s390x)Ben Noordhuis2019-07-3011-31/+13
| | | | | | | | | | | | | | | | Upstream V8 removed support for s390 earlier this year and it's known to no longer build. Remove the support from our build scripts. Fixes: https://github.com/nodejs/node/issues/28866 PR-URL: https://github.com/nodejs/node/pull/28883 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* src: large pages fix FreeBSD fix region sizeDavid Carlier2019-07-301-5/+7
| | | | | | | | | | | Makes the size aligned to huge page size by calculating it from the aligned lower and upper boundary of the executable address. PR-URL: https://github.com/nodejs/node/pull/28735 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
* build: generate openssl config for BSD-x86Ben Noordhuis2019-07-3079-1/+144194
| | | | | | | | | | | | | | | | | Add BSD-x86 to the list of arches and regenerate everything. Everything in deps/openssl/config/archs/BSD-x86 is auto-generated, everything else is manual edits to include the right files in the right places. I cheated a little: I didn't check in changes to files for other arches because they contained mostly churn (updated buildstamps and such.) Fixes: https://github.com/nodejs/node/issues/20326 PR-URL: https://github.com/nodejs/node/pull/28806 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* test: fix nits in test/fixtures/tls-connect.jsLuigi Pinca2019-07-301-6/+6
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/28880 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* test: fix race in test-http2-originAlba Mendez2019-07-301-5/+9
| | | | | | PR-URL: https://github.com/nodejs/node/pull/28903 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
* build: do not mix spaces and tabs in MakefileLuigi Pinca2019-07-301-33/+33
| | | | | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/28881 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* src: export v8.GetHeapCodeAndMetadataStatistics()Yuriy Vasiyarov2019-07-307-3/+132
| | | | | | | | | | | Export statistic provided by V8 through HeapCodeStatistics class and and GetHeapCodeAndMetadataStatistics function to v8 Node.js module PR-URL: https://github.com/nodejs/node/pull/27978 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* benchmark: swap var for let in buffer benchmarksAlex Ramirez2019-07-3018-25/+25
| | | | | | | | | | In benchmark buffers directory this changes for loops using var to let when it applies for consistency PR-URL: https://github.com/nodejs/node/pull/28867 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Rich Trott <rtrott@gmail.com>
* benchmark: swap var for let in util benchmarksAlex Ramirez2019-07-305-5/+5
| | | | | | | | | | In benchmark util directory this changes for loops using var to let when it applies for consistency PR-URL: https://github.com/nodejs/node/pull/28867 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Rich Trott <rtrott@gmail.com>
* benchmark: swap var for let in url benchmarksAlex Ramirez2019-07-3014-22/+22
| | | | | | | | | | In benchmark url directory this changes for loops using var to let when it applies for consistency PR-URL: https://github.com/nodejs/node/pull/28867 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Rich Trott <rtrott@gmail.com>
* test: udpate test comment descriptionAndres Bedoya2019-07-301-1/+1
| | | | | | | | | | | | | | test-buffer-failed-alloc-typed-arrays.js is working fine, but the description was not correct. PR-URL: https://github.com/nodejs/node/pull/28351 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
* test: refactor test using assert instead of try/catchJuan Bedoya2019-07-301-13/+13
| | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/28346 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
* src: readlink("/proc/self/exe") -> uv_exename()Ben Noordhuis2019-07-301-2/+6
| | | | | | | | | | | | | This commit also adds error handling. A THP-enabled build terminated with an out-of-memory error on a system without /proc because it cast the -1 from readlink() to size_t (i.e. ULONG_MAX) and then tried to allocate a string of that size. PR-URL: https://github.com/nodejs/node/pull/28333 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
* doc: add example of event close for child_processLaura Ciro2019-07-301-0/+17
| | | | | | PR-URL: https://github.com/nodejs/node/pull/28376 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* http2: destructure constants from require callDaniel Nalborczyk2019-07-291-15/+15
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/28176 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* http2: add constant to already destructured constantsDaniel Nalborczyk2019-07-291-4/+4
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/28176 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* src: fix OpenBSD buildDavid Carlier2019-07-293-4/+8
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/28384 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
* dgram: changed 'var' to 'let' and 'const'Manuel Ochoa Loaiza2019-07-291-11/+11
| | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/28357 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* deps: dlloads node static linked executableLuca Lindhorst2019-07-291-0/+12
| | | | | | | | | | | | | OpenSSL dlloads itself to prevent unloading, in case it might be dynamically loaded. However when linked statically this will lead to dloading the main executable. Refs: https://github.com/nodejs/node/pull/21848#issuecomment-498396551 PR-URL: https://github.com/nodejs/node/pull/28045 Fixes: https://github.com/nodejs/node/issues/27925 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* vm: increase code coverage of source_text_module.jskball2019-07-291-0/+35
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/28350 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* test: improve test-async-hooks-http-parser-destroyGerhard Stoebich2019-07-291-13/+34
| | | | | | | | | | | | | | | | | | | Improve asserts to distinguish between reequest and response parsers. Change the assert sequence to first assert on the number of ids to easier identify if some operation is missing/incomplete. Destroy HTTP agent once expected number of events have been seen to avoid waiting on socket timeouts. Refs: https://github.com/nodejs/node/issues/28112 PR-URL: https://github.com/nodejs/node/pull/28253 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* src: read break_node_first_line from the inspect optionsSamuel Attard2019-07-291-1/+1
| | | | | | | | | | There are cases where the debug_options() on the env are different to the options that were passed into inspector::Agent. PR-URL: https://github.com/nodejs/node/pull/28034 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
* doc: fixup esm resolver spec formattingGuy Bedford2019-07-291-6/+6
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/28885 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* doc: correct import statementhimself652019-07-291-2/+2
| | | | | | | | | JSON file can be imported now PR-URL: https://github.com/nodejs/node/pull/28876 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* test, util: refactor isObject in test-utilAlex Ramirez2019-07-291-1/+5
| | | | | | | | | | | | | refactor the test for isObject function including falsy values, the use of strictEquals and the format actual, expected PR-URL: https://github.com/nodejs/node/pull/28878 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* test,report: relax CPU match requirementsAnna Henningsen2019-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some CPUs have variable speeds, and so exact matches between what `os.cpus()` and the report feature yield cannot always be expected: ``` >const results = [] >setInterval(() => results.push(os.cpus().map(({ speed }) => speed)), 1) [...] >results [ [ 1198, 1150, 1195, 1149 ], [ 1198, 1150, 1195, 1149 ], [ 1198, 1150, 1195, 1149 ], [ 1198, 1150, 1195, 1149 ], [ 2401, 2420, 2429, 2413 ], [ 2401, 2420, 2429, 2413 ], [ 2401, 2420, 2429, 2413 ], [ 2401, 2420, 2429, 2413 ], [ 2401, 2420, 2429, 2413 ], [ 2401, 2420, 2429, 2413 ], [ 2401, 2420, 2429, 2413 ], [ 2596, 2401, 2699, 2555 ], [...] ``` Refs: https://github.com/nodejs/node/pull/28829 PR-URL: https://github.com/nodejs/node/pull/28884 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* crypto: add null check to outputLength logiccjihrig2019-07-292-1/+4
| | | | | | | | | | | The Hash constructor's outputLength logic checks if the options input is an object, but doesn't check for null objects. This commit adds that check. PR-URL: https://github.com/nodejs/node/pull/28864 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* build: ignore backup filesAdam Majer2019-07-281-0/+1
| | | | | | | | | Prevent backup files from being accidentally automatically added to the index. PR-URL: https://github.com/nodejs/node/pull/28865 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* deps: remove backup filesAdam Majer2019-07-283-258/+0
| | | | | | PR-URL: https://github.com/nodejs/node/pull/28865 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* http: reset parser.incoming when server response is finishedAnna Henningsen2019-07-281-0/+2
| | | | | | | | | | | This resolves a memory leak for keep-alive connections with a naïve approach. Fixes: https://github.com/nodejs/node/issues/9668 PR-URL: https://github.com/nodejs/node/pull/28646 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* src: move relative uptime initMicha Hanselmann2019-07-271-1/+3
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/28849 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* test: specialize OOM check for AIXSam Roberts2019-07-272-15/+31
| | | | | | | | | | | | | | | | | | | | | | | | Assumption that if memory can be malloc()ed it can be used is not true on AIX. Later access of the allocated pages can trigger SIGKILL if there are insufficient VM pages. Use psdanger() to better estimate available memory. Fixes: https://github.com/nodejs/build/issues/1849 More info: - https://www.ibm.com/support/knowledgecenter/en/ssw_aix_71/generalprogramming/sys_mem_alloc.html - https://www.ibm.com/support/knowledgecenter/en/ssw_aix_71/p_bostechref/psdanger.html Related to: - https://github.com/nodejs/build/issues/1820#issuecomment-505998851 - https://github.com/nodejs/node/pull/28469 - https://github.com/nodejs/node/pull/28516 PR-URL: https://github.com/nodejs/node/pull/28857 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* build,tools: support building with Visual Studio 2019Michaël Zasso2019-07-273-4/+42
| | | | | | | | Add a `vs2019` option to `vcbuild.bat` to use VS 2019 instead of VS 2017 PR-URL: https://github.com/nodejs/node/pull/28781 Reviewed-By: João Reis <reis@janeasystems.com> Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
* stream: resolve perf regression introduced by V8 7.3Matteo Collina2019-07-262-3/+11
| | | | | | | | | | | | | | | | | | | This commit contains two fixes: 1. use instanceof instead of Object.getPrototypeOf, as checking an object prototype with Object.getPrototypeOf is slower than an instanceof check. 2. avoid parseInt(undefined, 10) to get NaN as it regressed. PR-URL: https://github.com/nodejs/node/pull/28842 Fixes: https://github.com/nodejs/node/issues/28586 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* n-api: refactor a previous commitOctavian Soldea2019-07-267-201/+154
| | | | | | | | | | | | | | This is a refactoring of https://github.com/nodejs/node/issues/27628 following https://github.com/nodejs/node/pull/28505. This change factors out functions `add_last_status()` and `add_returned_status()` so they may be reused in the tests for passing information about the last error status and/or a returned `napi_status` to JavaScript. PR-URL: https://github.com/nodejs/node/pull/28848 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
* doc: add documentation for stream.destroyedRobert Nagy2019-07-261-0/+18
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/28815 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* policy: add dependencies map for resourcesBradley Farias2019-07-2619-63/+411
| | | | | | | | | | | | | Adds a "dependencies" field to resources in policy manifest files. In order to ease development and testing while using manifests, wildcard values for both "dependencies" and "integrity" have been added using the boolean value "true" in the policy manifest. PR-URL: https://github.com/nodejs/node/pull/28767 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* crypto: fix handling of malicious getters (scrypt)Tobias Nießen2019-07-262-6/+41
| | | | | | | | | | | | | | | | | | It is possible to bypass parameter validation in crypto.scrypt and crypto.scryptSync by crafting option objects with malicious getters as demonstrated in the regression test. After bypassing validation, any value can be passed to the C++ layer, causing an assertion to crash the process. Fixes: https://github.com/nodejs/node/issues/28836 PR-URL: https://github.com/nodejs/node/pull/28838 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>