- Jul 07, 2020
-
-
Daniel Bevenius authored
This commit removes two unnecessary else statements in base_object-inl.h. It also tries to make the if statements consistent with regards to braces. PR-URL: https://github.com/nodejs/node/pull/33413 Reviewed-By:
Zeyu Yang <himself65@outlook.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Juan José Arboleda <soyjuanarbol@gmail.com>
-
Anna Henningsen authored
PR-URL: https://github.com/nodejs/node/pull/33454 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Jan Krems authored
Highlights: * Remove use of `process.binding` on modern node (@addaleax) * Increase timeout for port checking (@yilmazdurmaz) * Auto-resume on start when `NODE_INSPECT_RESUME_ON_START` is set (@dolsem) Compare: https://github.com/nodejs/node-inspect/compare/v1.11.6...v2.0.0 PR-URL: https://github.com/nodejs/node/pull/33447 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Matheus Marchini <mat@mmarchini.me> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Ruben Bridgewater authored
This outlines the basic class setup when inspecting a class. Signed-off-by:
Ruben Bridgewater <ruben@bridgewater.de> PR-URL: https://github.com/nodejs/node/pull/32332 Fixes: https://github.com/nodejs/node/issues/32270 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Anto Aravinth <anto.aravinth.cse@gmail.com>
-
Daniel Bevenius authored
This commit updates the comment referring to the executionAsyncId/triggerAsyncId pair being stored in a std::stack. It looks like this was changed from std::stack to AliasedFloat64Array in Commit 83e5215a ("async_hooks: use typed array stack as fast path"). PR-URL: https://github.com/nodejs/node/pull/33396 Reviewed-By:
Chengzhong Wu <legendecas@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
- Jun 30, 2020
-
-
Beth Griggs authored
PR-URL: https://github.com/nodejs/node/pull/34077
-
- Jun 27, 2020
-
-
Beth Griggs authored
Notable changes: - deps: V8: backport fb26d0bb1835 (Matheus Marchini) [#33573](https://github.com/nodejs/node/pull/33573) - src: use symbol to store `AsyncWrap` resource (Anna Henningsen) [#31745](https://github.com/nodejs/node/pull/31745) PR-URL: https://github.com/nodejs/node/pull/34077
-
Anna Henningsen authored
Use a symbol on the bindings object to store the public resource object, rather than a `v8::Global` Persistent. This has several advantages: - It’s harder to inadvertently create memory leaks this way. The garbage collector sees the `AsyncWrap` → resource link like a regular JS property, and can collect the objects as a group, even if the resource object should happen to point back to the `AsyncWrap` object. - This will make it easier in the future to use `owner_symbol` for this purpose, which is generally the direction we should be moving the `async_hooks` API into (i.e. using more public objects instead of letting internal wires stick out). PR-URL: https://github.com/nodejs/node/pull/31745 Backport-PR-URL: https://github.com/nodejs/node/pull/33962 Reviewed-By:
Stephen Belanger <admin@stephenbelanger.com> Reviewed-By:
David Carlier <devnexen@gmail.com> Reviewed-By:
Denys Otrishko <shishugi@gmail.com> Reviewed-By:
Chengzhong Wu <legendecas@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Minwoo Jung <nodecorelab@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By:
Gerhard Stöbich <deb2001-github@yahoo.de>
-
Matheus Marchini authored
Original commit message: [objects] Compact and shrink script_list So far creating scripts always grew the script_list without ever reusing cleared slots or shrinking. While this is probably not a problem with script_list in practice, this is still a memory leak. Fix this leak by using WeakArrayList::Append instead of AddToEnd. Append adds to the end of the array, but potentially compacts and shrinks the list as well. Other WeakArrayLists can use this method as well, as long as they are not using indices into this array. Bug: v8:10031 Change-Id: If743c4cc3f8d67ab735522f0ded038b2fb43e437 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1967385 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#65640} Refs: https://github.com/v8/v8/commit/fb26d0bb1835dd18d175128fcb18590bee4ec218 PR-URL: https://github.com/nodejs/node/pull/33573 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Shelley Vohr <codebytere@gmail.com> Reviewed-By:
Beth Griggs <Bethany.Griggs@uk.ibm.com>
-
- Jun 18, 2020
-
-
Shelley Vohr authored
PR-URL: https://github.com/nodejs/node/pull/33811
-
- Jun 17, 2020
-
-
Shelley Vohr authored
Notable changes: deps: * V8: cherry-pick 548f6c81d424 (Dominykas Blyžė) [#33484](https://github.com/nodejs/node/pull/33484) * update to uvwasi 0.0.9 (Colin Ihrig) [#33445](https://github.com/nodejs/node/pull/33445) * upgrade to libuv 1.38.0 (Colin Ihrig) [#33446](https://github.com/nodejs/node/pull/33446) * upgrade npm to 6.14.5 (Ruy Adorno) [#33239](https://github.com/nodejs/node/pull/33239) PR-URL: https://github.com/nodejs/node/pull/33811
-
- Jun 10, 2020
-
-
Dominykas Blyžė authored
Original commit message: [runtime] Don't track transitions for certainly detached maps Previously such maps were marked as prototype, but that has bad performance / memory characteristics if objects are used as dictionaries. Bug: b:148346655, v8:10339 Change-Id: I287c5664c8b7799a084669aaaffe3affcf73e95f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2179322 Reviewed-by:Igor Sheludko <ishell@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#67537} Refs: https://github.com/v8/v8/commit/548f6c81d4246736a7feafd7995fdf6f24ed1149 PR-URL: https://github.com/nodejs/node/pull/33484 Backport-PR-URL: https://github.com/nodejs/node/pull/33553 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Matheus Marchini <mat@mmarchini.me> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
- Jun 09, 2020
-
-
cjihrig authored
Notable changes: - A `DEBUG()` macro and `UVWASI_DEBUG_LOG` build option have been added to improve debugging. - Path length restrictions have been removed across the codebase. - Initial support for `poll_oneoff()` has been added on all platforms. The implementation is based on `uv_poll_t`'s. - A new `uvwasi_size_t` has been introduced across the WASI system call API. This provides consistent 32-bit `size_t`'s. - The cmake test targets are now only generated if uvwasi is the root project to avoid conflicts with targets from embedders. - `uv.h` has been removed from the public headers. - A serialization/deserialization API has been added to simplify the process of working with WASM memory. This also hides many WASI <--> WASM interfacing implementation details from embedders. - A memory corruption bug on Windows related to path resolution has been fixed. PR-URL: https://github.com/nodejs/node/pull/33445 Fixes: https://github.com/nodejs/node/issues/33403 Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Jiawen Geng <technicalcute@gmail.com>
-
James M Snell authored
Allow the AsyncWrap to be properly detached. Extracted from the [QUIC PR](https://github.com/nodejs/node/pull/32379 ). Signed-off-by:
James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/33102 Refs: https://github.com/nodejs/node/pull/32379/files?file-filters%5B%5D=.bat&file-filters%5B%5D=.gyp&file-filters%5B%5D=.gypi&file-filters%5B%5D=.h&file-filters%5B%5D=.md&file-filters%5B%5D=.py&file-filters%5B%5D=.sh&file-filters%5B%5D=No+extension&file-filters%5B%5D=dotfile#r409084763 Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Antoine du Hamel authored
Refs: https://github.com/nodejs/node/pull/26970 Fixes: https://github.com/nodejs/node/issues/33270 PR-URL: https://github.com/nodejs/node/pull/33323 Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Ethan Arrowood authored
PR-URL: https://github.com/nodejs/node/pull/33281 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Tobias Nießen authored
PR-URL: https://github.com/nodejs/node/pull/33267 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By:
Masashi Hirano <shisama07@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Pranshu Srivastava authored
Refs: https://github.com/nodejs/node/issues/29829 PR-URL: https://github.com/nodejs/node/pull/33183 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Anna Henningsen authored
`AddToIncomingQueue()` relies on `owner_` only being modified with `mutex_` being locked, but in these two places, that didn’t happen. Modify them to use `Detach()` instead, which has the same effect as setting `owner_ = nullptr` here, but does it with proper locking. This race condition probably only shows up in practice when Node.js is compiled in debug mode, because the compiler eliminates the duplicate load in `AddToIncomingQueue()` when compiling with optimizations enabled. PR-URL: https://github.com/nodejs/node/pull/33429 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
David Carlier <devnexen@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Daniel Bevenius authored
This commit suggest using a lambda for the RegisterHandlerCleanup calls in RegisterHandleCleanups. The motivation is to reduce some duplication and to make it a little easier to read as all of the calls pass in the same arguments, apart from casting the uv handle. PR-URL: https://github.com/nodejs/node/pull/33421 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Zeyu Yang <himself65@outlook.com> Reviewed-By:
David Carlier <devnexen@gmail.com>
-
Jonathan Buhacoff authored
According to the [NodeJS CCM example](https://nodejs.org/docs/latest-v14.x/api/crypto.html#crypto_ccm_mode], when decrypting the `plaintextLength` parameter actually refers to the ciphertext length, not the plaintext length: ``` decipher.setAAD(aad, { plaintextLength: ciphertext.length }); ``` The same can be seen in the [OpenSSL docs](https://wiki.openssl.org/index.php/EVP_Authenticated_Encryption_and_Decryption) where a call to `EVP_DecryptUpdate` passes the ciphertext length: ``` /* Provide the total ciphertext length */ if(1 != EVP_DecryptUpdate(ctx, NULL, &len, NULL, ciphertext_len)) handleErrors(); ``` This parameter probably should have been called `inputLength` or `bufferLength` instead of `plaintextLength`, so that it makes sense both when encrypting and decrypting, but at least we can correct the sentence in the documentation for now to refer to the correct value. PR-URL: https://github.com/nodejs/node/pull/33095 Reviewed-By:
Ujjwal Sharma <ryzokuken@disroot.org> Reviewed-By:
Tobias Nießen <tniessen@tnie.de> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Benjamin Gruenbaum authored
Add a comment regarding memory limits and setting highWaterMark PR-URL: https://github.com/nodejs/node/pull/33432 Reviewd-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Robert Nagy <ronagy@icloud.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
cjihrig authored
Notable changes: - `uv_library_shutdown()` has been added. - `uv_udp_init_ex()` now accepts `UV_UDP_RECVMMSG`, although it is a no-op. - Obsolete `MAX_PATH` restrictions have been removed on Windows, and Windows is now long path aware. - Windows environment variables longer than 32,767 characters are now supported. - Linux `cpu_times` are now reported as milliseconds to match other platforms. - A memory leak resulting from `uv_loop_init()` failures has been fixed. PR-URL: https://github.com/nodejs/node/pull/33446 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Richard Lau <riclau@uk.ibm.com>
-
Joyee Cheung authored
- Add clarifications for Node.js-only extensions - Explain the Web Performance APIs implemented in Node.js and clarify that perf_hooks also include other non-Web APIs. - Prefix exposed interfaces with `perf_hooks.` to distinguish them from internal classes. PR-URL: https://github.com/nodejs/node/pull/33199 Refs: https://github.com/nodejs/node/issues/28635 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Chengzhong Wu <legendecas@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Daniel Bevenius authored
PR-URL: https://github.com/nodejs/node/pull/33417 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Daniel Bevenius authored
This commit removes the unused 'misc' variable from one of the NodeMainInstance constructors. Another option could be to add a default argument to SetIsolateMiscHandlers but I'd like to hear what others think about that first. PR-URL: https://github.com/nodejs/node/pull/33417 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Daniel Bevenius authored
This commit adds promise_resolve to the list of callbacks mentioned in the comment. It also fixes a minor typo, every -> ever. PR-URL: https://github.com/nodejs/node/pull/33365 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Thomas authored
Some consoles do not convert ANSI escape sequences to colors, rather display them directly to the stdout. On those consoles, libuv emulates colors by intercepting stdout stream and calling corresponding Windows API functions for setting console colors. However, fatal error are handled differently and we cannot easily highlight them. PR-URL: https://github.com/nodejs/node/pull/33132 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Rich Trott authored
PR-URL: https://github.com/nodejs/node/pull/33412 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Richard Lau <riclau@uk.ibm.com>
-
Gus Caplan authored
PR-URL: https://github.com/nodejs/node/pull/33408 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Myles Borins <myles.borins@gmail.com>
-
Anna Henningsen authored
In some situations, it can be useful to use threadsafe callbacks on an `Environment` to perform cleanup operations that should run even when the process would otherwise be ending. PR-URL: https://github.com/nodejs/node/pull/33320 Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
To be more precise, fix a crash when `worker.unref()` is called from a message on the Worker that is not emitted before the Worker thread has stopped. PR-URL: https://github.com/nodejs/node/pull/33394 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Cheng Zhao authored
When precompile headers are disabled this file would cause compilation errors due to #include <string> not included. PR-URL: https://github.com/nodejs/node/pull/33332 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Antoine du Hamel authored
Adds hint when module specifier is a file URL. PR-URL: https://github.com/nodejs/node/pull/33220 Fixes: https://github.com/nodejs/node/issues/33219 Reviewed-By:
Guy Bedford <guybedford@gmail.com>
-
Antoine du HAMEL authored
PR-URL: https://github.com/nodejs/node/pull/33220 Fixes: https://github.com/nodejs/node/issues/33219 Reviewed-By:
Guy Bedford <guybedford@gmail.com>
-
himself65 authored
PR-URL: https://github.com/nodejs/node/pull/33383 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Masashi Hirano <shisama07@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Juan José Arboleda <soyjuanarbol@gmail.com>
-
Anna Henningsen authored
Add regression tests for the case in which an async_hook is enabled inside a Worker thread and `process.exit()` is called during the async part of an async function. This commit includes multiple tests that seem like they should all crash in a similar way, but interestingly don’t. In particular, it’s surprising that the presence of a statement after `process.exit()` in a function has an effect on the kind of crash that’s being exhibited (V8 DCHECK vs. assertion in our own code) and the circumstances under which it crashes (e.g. the -1 and -2 tests can be “fixed” by reverting 13c5a162, although they should have the same behavior as the -3 and -4 tests). PR-URL: https://github.com/nodejs/node/pull/33347 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
David Carlier <devnexen@gmail.com>
-
Anna Henningsen authored
Termination exceptions are similar to uncaught exceptions in that they should clear the async id stack, because no ongoing async callbacks will be brought to completion when execution terminates. Previously, there was a check that made sure that that happened when the termination occurred during the callback itself, but no such check was in place for the case that the termination occurred during microtasks started by them. This commit adds such a check, both for microtasks and the `nextTick` queue. The latter addition doesn’t fix a crash, but still makes sense conceptually. The condition here is also flipped from applying only on Worker threads to also applying on the main thread, and setting the `failed_` flag rather than reading it. The former makes sense because the public C++ `Stop(env)` API can have the same effect as worker thread termination, but on the main thread rather than a Worker thread. PR-URL: https://github.com/nodejs/node/pull/33347 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
David Carlier <devnexen@gmail.com>
-
Anna Henningsen authored
As the comment indicates, this fixes a DCHECK failure, although I don’t quite understand why it is happening in the first place. PR-URL: https://github.com/nodejs/node/pull/33347 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
David Carlier <devnexen@gmail.com>
-
Anna Henningsen authored
libuv does not expect concurrent operations on `uv_dir_t` instances, and will gladly create memory leaks, corrupt data, or crash the process. This patch forbids that, and: - Makes sure that concurrent async operations are run sequentially - Throws an exception if sync operations are attempted during an async operation The assumption here is that a thrown exception is preferable to a potential hard crash. This fully fixes flakiness from `parallel/test-fs-opendir` when run under ASAN. PR-URL: https://github.com/nodejs/node/pull/33274 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-