- Aug 16, 2018
-
-
SheetJS authored
Buffer.from / new Buffer accept Uint8Array Fixes: https://github.com/nodejs/node/issues/14118 Backport-PR-URL: https://github.com/nodejs/node/pull/21590 PR-URL: https://github.com/nodejs/node/pull/19949 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host>
-
Rich Trott authored
As the introduction of ES6 features recedes further into the past, it is less and less relevant (and more and more distracting) to cite it in documentation text. Remove mention in buffer.md. Backport-PR-URL: https://github.com/nodejs/node/pull/21590 PR-URL: https://github.com/nodejs/node/pull/19685 Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Ali Ijaz Sheikh authored
As part of the backport to 8.x, this change removes the runtime deprecation making this a docs-only deprecation for 8.x. PR-URL: https://github.com/nodejs/node/pull/19517 Reviewed-By:
mcollina - Matteo Collina <matteo.collina@gmail.com>
-
Ruben Bridgewater authored
Refs: https://github.com/nodejs/node/pull/18513 Backport-PR-URL: https://github.com/nodejs/node/pull/19517 PR-URL: https://github.com/nodejs/node/pull/18694 Refs: https://github.com/nodejs/node/pull/18513 Reviewed-By:
Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Ali Ijaz Sheikh authored
The emit{Before,After} APIs in AsyncResource are problematic. * emit{Before,After} are named to suggest that the only thing they do is emit the before and after hooks. However, they in fact, mutate the current execution context. * They must be properly nested. Failure to do so by user code leads to catastrophic (unrecoverable) exceptions. It is very easy for the users to forget that they must be using a try/finally block around the code that must be surrounded by these operations. Even the example provided in the official docs makes this mistake. Failing to use a finally can lead to a catastrophic crash if the callback ends up throwing. This change provides a safer `runInAsyncScope` API as an alternative and deprecates emit{Before,After}. Backport-PR-URL: https://github.com/nodejs/node/pull/19517 PR-URL: https://github.com/nodejs/node/pull/18513 Reviewed-By:James M Snell <jasnell@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Andreas Madsen <amwebdk@gmail.com>
-
Ali Ijaz Sheikh authored
This is the v8.x backport of https://github.com/nodejs/node/pull/20727. Original commit message: ThreadDataTable: Change global linked list to per-Isolate hash map. For use cases with a large number of threads or a large number of isolates (or both), ThreadDataTable can be a major performance bottleneck due to O(n) lookup time of the linked list. Switching to a hash map reduces this to O(1). Example 1: Sandstorm.io, a Node.js app that utilizes "fibers", was observed spending the majority of CPU time iterating over the ThreadDataTable. See: https://sandstorm.io/news/2016-09-30-fiber-bomb-debugging-story Example 2: Cloudflare's Workers engine, a high-multi-tenancy web server framework built on V8 (but not Node), creates large numbers of threads and isolates per-process. It saw a 34x improvement in throughput when we applied this patch. Cloudflare has been using a patch in production since the Worker launch which replaces the linked list with a hash map -- but still global. This commit builds on that but goes further and creates a separate hash map and mutex for each isolate, with the table being a member of the Isolate class. This avoids any globals and should reduce lock contention. Bug: v8:5338 Change-Id: If0d11509afb2e043b888c376e36d3463db931b47 Reviewed-on: https://chromium-review.googlesource.com/1014407 Reviewed-by:
Yang Guo <yangguo@chromium.org> Commit-Queue: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#52753} Backport-PR-URL: https://github.com/nodejs/node/pull/21529 PR-URL: https://github.com/nodejs/node/pull/20727 Refs: https://github.com/nodejs/node/issues/20083 Refs: https://github.com/nodejs/node/issues/20083 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Myles Borins authored
This is a fix for filenames that have spaces which currently breaks node-gyp. npm has not yet updated the dependency to the latest version in the mean time we should land this as a patch PR-URL: https://github.com/nodejs/node/pull/21448 Refs: https://github.com/nodejs/node-gyp/pull/1436 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Minwoo Jung <minwoo@nodesource.com>
-
Myles Borins authored
Currently `make doc-only` is updating the package-lock.json which is breaking our release build. This adds the flags `--no-package-lock` when running `npm install` to ensure the package-lock.json is not changed unintentionally by running make PR-URL: https://github.com/nodejs/node/pull/21015 Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
Steven R. Loomis authored
In ICU 61.x, icu4c will no longer put its declarations in the global namespace. Everything will be in the "icu::" namespace (or icu_60:: in the linker). Prepare for this. https://ssl.icu-project.org/trac/ticket/13460
-
Michael Dawson authored
For tests that use anonymous namespaces, some tagged the close of the namespace with 'namespace' while others used 'anonymous namespace'. It was suggested I should use 'anonymous namespace' in a recent PR review so make all of the tests consistent with this. PR-URL: https://github.com/nodejs/node/pull/18583 Reviewed-By:
Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Rich Trott authored
Using High Sierra and `xcode-select --install` without installing full Xcode, our build tooling breaks due to faulty regular expressions. Update the `configure` script in our project root directory to handle multi-digit version numbers. `tools/gyp` and `deps/npm/node_modules/node-gyp` still need to be updated for a complete fix. PR-URL: https://github.com/nodejs/node/pull/21173 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Misty De Meo authored
Compare versions using tuples instead of strings so that it is future-proofed against versions that contain a number that is more than one digit. PR-URL: https://github.com/nodejs/node/pull/21183 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
Rich Trott authored
Tool versions can be 10 and higher. Float patch from node-gyp to accommodate this fact of life. PR-URL: https://github.com/nodejs/node/pull/21216 Refs: https://github.com/nodejs/node-gyp/commit/293092c362febffe19f72712467565045e08e8f1 Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Michaël Zasso authored
Migrate the script to the new common tmpDir API. Backport-PR-URL: https://github.com/nodejs/node/pull/21302 PR-URL: https://github.com/nodejs/node/pull/19293 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Myles Borins <myles.borins@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Daijiro Wachi <daijiro.wachi@gmail.com>
-
Rebecca Turner authored
Backport-PR-URL: https://github.com/nodejs/node/pull/21302 PR-URL: https://github.com/nodejs/node/pull/20190 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com>
-
Ali Ijaz Sheikh authored
Original commit message: [heap] Lower external allocation limit when external memory shrinks. BUG=chromium:728228 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng Review-Url: https://codereview.chromium.org/2921883002 Cr-Commit-Position: refs/heads/master@{#45726} PR-URL: https://github.com/nodejs/node/pull/21269 Fixes: https://github.com/nodejs/node/issues/21021 Reviewed-By:
Myles Borins <myles.borins@gmail.com>
-
Ali Ijaz Sheikh authored
Original commit message: [heap] Activate memory reducer on external memory activity. BUG=chromium:728228,chromium:626082 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng Review-Url: https://codereview.chromium.org/2917853004 Cr-Commit-Position: refs/heads/master@{#45671} PR-URL: https://github.com/nodejs/node/pull/21269 Fixes: https://github.com/nodejs/node/issues/21021 Reviewed-By:
Myles Borins <myles.borins@gmail.com>
-
Rod Vagg authored
PR-URL: https://github.com/nodejs/node/pull/19746 Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com>
-
Daniel Bevenius authored
This commit updates node_crypto to use the non-deprecated Set functions that return a v8::Maybe<bool>. Backport-PR-URL: https://github.com/nodejs/node/pull/20931 PR-URL: https://github.com/nodejs/node/pull/17482 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Franziska Hinkelmann authored
Use std::unique_ptr for delayed tasks in the scheduled delayed tasks vector. This makes it clear that the vector has ownership of the delayed tasks and is responsible for deleting them. Use a custom deleter for the pointers because libuv needs to close the handle and then delete the data. Provide the handle when creating the pointer instead of invoking the special delete action everytime an element is removed from the vector. Backport-PR-URL: https://github.com/nodejs/node/pull/20901 PR-URL: https://github.com/nodejs/node/pull/17083 Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Franziska Hinkelmann authored
Replace raw pointers in task queues with std::unique_ptr. This makes ownership obvious. Backport-PR-URL: https://github.com/nodejs/node/pull/20901 PR-URL: https://github.com/nodejs/node/pull/16970 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com>
-
Anna Henningsen authored
Worker threads need an event loop without active libuv handles in order to shut down. One source of handles that was previously not accounted for were delayed V8 tasks; these create timers that would be standing in the way of clearing the event loop. To solve this, keep track of the scheduled tasks in a list and close their timer handles before the corresponding isolate/loop is removed from the platform. It is not clear from the V8 documentation what the expectation is with respect to pending background tasks at the end of the isolate lifetime; however, an alternative approach of executing these scheduled tasks when flushing them led to an infinite loop of tasks scheduling each other; so it seems safe to assume that the behaviour implemented in this patch is at least acceptable. Backport-PR-URL: https://github.com/nodejs/node/pull/20901 Original-PR-URL: https://github.com/ayojs/ayo/pull/120 Original-Reviewed-By:
Stephen Belanger <admin@stephenbelanger.com> PR-URL: https://github.com/nodejs/node/pull/16700 Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
This splits the task queue used for asynchronous tasks scheduled by V8 in per-isolate queues, so that multiple threads can be supported. Backport-PR-URL: https://github.com/nodejs/node/pull/20901 Original-PR-URL: https://github.com/ayojs/ayo/pull/89 Original-Reviewed-By:
Timothy Gu <timothygu99@gmail.com> PR-URL: https://github.com/nodejs/node/pull/16700 Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Michael Dawson authored
Take n-api out of experimental as per: https://github.com/nodejs/TSC/issues/501 Backport-PR-URL: https://github.com/nodejs/node/pull/21083 PR-URL: https://github.com/nodejs/node/pull/19262 Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
-
陈刚 authored
`state.corkedRequestsFree` of a writable stream is always not null. PR-URL: https://github.com/nodejs/node/pull/18145 Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-
陈刚 authored
In `Writable.prototype.end()`, `state.ending` is true after calling `endWritable()` and it doesn't reset to false. In `Writable.prototype.uncork()`, `state.finished` must be false if `state.bufferedRequest` is true. PR-URL: https://github.com/nodejs/node/pull/18145 Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-
Anatoli Papirovski authored
PR-URL: https://github.com/nodejs/node/pull/18445 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com>
-
Steven R. Loomis authored
- remove TODOs: the one about defaults has been addressed, and the one about testing is a work item that doesn't belong in a doc. - add some background information Fixes: https://github.com/nodejs/node/issues/7843 PR-URL: https://github.com/nodejs/node/pull/16939 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
Myles Borins authored
currently if you want to use dynamic import you must use both the `--experimental-modules` and the `--harmony-dynamic-imports` flags. Chrome is currently shipping dynamic import unflagged, the flag only remains in V8 to guard embedders who have not set the appropriate callback from throwing an unhandled rejection when the feature is used. As such it is reasonable to enable the flag by default for `--experimental-modules` Backport-PR-URL: https://github.com/nodejs/node/pull/17823 PR-URL: https://github.com/nodejs/node/pull/18387 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Jan Krems <jan.krems@gmail.com> Reviewed-By:
Bradley Farias <bradley.meck@gmail.com> Reviewed-By:
Guy Bedford <guybedford@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com>
-
Jan Krems authored
This is an initial implementation to support dynamic import in both scripts and modules. It's off by default since support for dynamic import is still flagged in V8. Without setting the V8 flag, this code won't be executed. This initial version does not support importing into vm contexts. Backport-PR-URL: https://github.com/nodejs/node/pull/17823 PR-URL: https://github.com/nodejs/node/pull/15713 Reviewed-By:
Timothy Gu <timothygu99@gmail.com> Reviewed-By:
Bradley Farias <bradley.meck@gmail.com>
-
Jan Krems authored
Original commit message: Introduce ScriptOrModule and HostDefinedOptions This patch introduces a new container type ScriptOrModule which provides the name and the host defined options of the script/module. This patch also introduces a new PrimitivesArray that can hold Primitive values, which the embedder can use to store metadata. The HostDefinedOptions is passed to V8 through the ScriptOrigin, and passed back to the embedder through HostImportModuleDynamically for module loading. Bug: v8:5785, v8:6658, v8:6683 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I56c26fc9a680b273ac0a6691e5ad75f15b8dc80a Reviewed-on: https://chromium-review.googlesource.com/622158 Reviewed-by:Adam Klein <adamk@chromium.org> Reviewed-by:
Georg Neis <neis@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#47724} Backport-PR-URL: https://github.com/nodejs/node/pull/17823 PR-URL: https://github.com/nodejs/node/pull/16889 Refs: https://github.com/v8/v8/commit/dbfe4a49d88f6655ed31285a40b63786ab1e8e49 Refs: https://github.com/nodejs/node/pull/15713 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Michaël Zasso <targos@protonmail.com>
-
Anna Henningsen authored
Instead of providing a separate class for keeping the parser alive during its own call back, just delay a possible `.close()` call until the stack has cleared completely. PR-URL: https://github.com/nodejs/node/pull/18135 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Anna Henningsen authored
Use template helpers instead of `#define`s to generate the raw C callbacks that are passed to the HTTP parser library. A nice effect of this is that it is more obvious what parameters the `Parser` methods take. PR-URL: https://github.com/nodejs/node/pull/18133 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Jon Moss <me@jonathanmoss.me> Reviewed-By:
Tobias Nießen <tniessen@tnie.de> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By:
Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
-
Daniel Bevenius authored
Currently the cctest target depend on the node_core_target_name target. But it is the node_lib_target_name target that compiles the sources now which means that if a source file in src is updated the cctest executable will not be re-linked against it, but will remain unchanged. The code will still be compiled, just not linked which means that if you are debugging you'll not see the changes and also a warning will be displayed about this issue. This commit changes the cctest target to depend on node_lib_target_name. Backport-PR-URL: https://github.com/nodejs/node/pull/20797 PR-URL: https://github.com/nodejs/node/pull/18576 Reviewed-By:
Matheus Marchini <matheus@sthima.com> Reviewed-By:
Yihong Wang <yh.wang@ibm.com> Reviewed-By:
Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Daniel Bevenius authored
I mistakenly introduced user defined variables using uppercase characters, reading the gyp documentation they state: "Predefined variables. By convention, these are named with CAPITAL_LETTERS. Predefined variables are set automatically by GYP" and also "By convention, user-defined variables are named with lowercase_letters." This commit renames the user defined variables to lowercase to follow the above mentioned convention. Backport-PR-URL: https://github.com/nodejs/node/pull/20797 PR-URL: https://github.com/nodejs/node/pull/16238 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
This should make these function calls a lot more intuitive for people who are more accustomed to Node’s EventEmitter API. PR-URL: https://github.com/nodejs/node/pull/17701 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Timothy Gu <timothygu99@gmail.com> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Anna Henningsen authored
Since these are executing JS code, and in particular parts of that code may be provided by userland, handle such exceptions in C++. Refs: https://github.com/nodejs/node/pull/17938#issuecomment-354683850 PR-URL: https://github.com/nodejs/node/pull/18028 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com>
-
Anna Henningsen authored
This is made to mirror the connection-bound net benchmarks. PR-URL: https://github.com/nodejs/node/pull/17983 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
- Switch over to async tracking through promises/async fns - Remove an unused temp dir refresh - Inline the multiline/npm text prompts into expectations - Unify handling prompts/stripping prompts out - Make sure no unexpected data is received by requireing all *lines* to be matched, rather than chunks received from the REPL. This made the test too loose in terms of matched lines and too strict in terms of stream chunking requirements. - Some general cleanup PR-URL: https://github.com/nodejs/node/pull/17926 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Bradley Farias <bradley.meck@gmail.com> Reviewed-By:
Jon Moss <me@jonathanmoss.me> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Michael Dawson authored
In https://github.com/nodejs/node/pull/17987 which updated the location of the code coverage patches I missed a few changes needed to properly clean up for code coverage. Add these. PR-URL: https://github.com/nodejs/node/pull/18081 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Jon Moss <me@jonathanmoss.me> Reviewed-By:
James M Snell <jasnell@gmail.com>
-