- Nov 18, 2017
-
-
Rich Trott authored
PR-URL: https://github.com/nodejs/node/pull/16703 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Anna Henningsen authored
This removes the `process._needImmediateCallback` property and its semantics of having a 1/0 switch that tells C++ whether immediates are currently scheduled. Instead, a counter keeping track of all immediates is created, that can be increased on `setImmediate()` or decreased when an immediate is run or cleared. This is faster, because rather than reading/writing a C++ getter, this operation can be performed as a direct memory read/write via a typed array. The only C++ call that is left to make is activating the native handles upon creation of the first `Immediate` after the queue is empty. One other (good!) side-effect is that `immediate._destroyed` now reliably tells whether an `immediate` is still scheduled to run or not. Also, as a nice extra, this should make it easier to implement an internal variant of `setImmediate` for C++ that piggybacks off the same mechanism, which should be useful at least for async hooks and HTTP/2. Benchmark results: $ ./node benchmark/compare.js --new ./node --old ./node-master-1b093cb9 --runs 10 --filter immediate timers | Rscript benchmark/compare.R [00:08:53|% 100| 4/4 files | 20/20 runs | 1/1 configs]: Done improvement confidence p.value timers/immediate.js type="breadth" thousands=2000 25.61 % ** 1.432301e-03 timers/immediate.js type="breadth1" thousands=2000 7.66 % 1.320233e-01 timers/immediate.js type="breadth4" thousands=2000 4.61 % 5.669053e-01 timers/immediate.js type="clear" thousands=2000 311.40 % *** 3.896291e-07 timers/immediate.js type="depth" thousands=2000 17.54 % ** 9.755389e-03 timers/immediate.js type="depth1" thousands=2000 17.09 % *** 7.176229e-04 timers/set-immediate-breadth-args.js millions=5 10.63 % * 4.250034e-02 timers/set-immediate-breadth.js millions=10 20.62 % *** 9.150439e-07 timers/set-immediate-depth-args.js millions=10 17.97 % *** 6.819135e-10 PR-URL: https://github.com/nodejs/node/pull/17064 Reviewed-By:Refael Ackermann <refack@gmail.com> Reviewed-By:
Minwoo Jung <minwoo@nodesource.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Vse Mozhet Byt authored
PR-URL: https://github.com/nodejs/node/pull/17108 Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Rich Trott authored
Add a Support section, borrowing heavily from wp-cli project. Move stuff about contributing to Node.js to the bottom as vastly more users are interested in using Node.js and getting help with Node.js than contributing to Node.js. Information still belongs, just not at the top. (Many people will know to look in CONTRIBUTING.md anyway.) PR-URL: https://github.com/nodejs/node/pull/16533 Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
Rich Trott authored
Remove the practice of starting most error descriptions with "Used when" or wordier variations. Change errors of the form: > Used when the type of an asynchronous resource is invalid. ...to: > The type of an asynchronous resource was invalid. Change errors of the form: > The `'ERR_INVALID_CURSOR_POS'` is thrown specifically when a cursor on > a given stream is attempted to move to a specified row without a > specified column. ...to: > A cursor on a given stream cannot be moved to a specified row without > a specified column. PR-URL: https://github.com/nodejs/node/pull/16954 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Tobias Nießen <tniessen@tnie.de> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com>
-
João Reis authored
Fixes: https://github.com/nodejs/node/issues/13471 PR-URL: https://github.com/nodejs/node/pull/17008 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By:
Timothy Gu <timothygu99@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Hitesh Kanwathirtha <hiteshk@microsoft.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
- Nov 17, 2017
-
-
Michael Dawson authored
PR-URL: https://github.com/nodejs/node/pull/16699 Fixes: https://github.com/nodejs/node/issues/13824 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Joyee Cheung authored
PR-URL: https://github.com/nodejs/node/pull/16661 Fixes: https://github.com/nodejs/node/issues/16650 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com>
-
Daniel Bevenius authored
This commit renames req-wrap to req_wrap consitency with other c++ source files. PR-URL: https://github.com/nodejs/node/pull/17022 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com>
-
Daniel Bevenius authored
This commit renames base-object to base_object for consitency with other c++ source files. PR-URL: https://github.com/nodejs/node/pull/17022 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com>
-
Daniel Bevenius authored
This commit renames async-wrap to async_wrap for consitency with other c++ source files. PR-URL: https://github.com/nodejs/node/pull/17022 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com>
-
Vijayalakshmi Kannan authored
PR-URL: https://github.com/nodejs/node/pull/16923 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Tobias Nießen <tniessen@tnie.de> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com>
-
Franziska Hinkelmann authored
Add rule for smart pointers, i.e., std::unique_ptr and std::shared_ptr, to the Cpp style guide. Mostly copied from the Google style guide. PR-URL: https://github.com/nodejs/node/pull/17055 Ref: https://github.com/nodejs/node/pull/16970 Ref: https://github.com/nodejs/node/pull/16974 Ref: https://github.com/nodejs/node/pull/17000 Ref: https://github.com/nodejs/node/pull/17012 Ref: https://github.com/nodejs/node/pull/17020 Ref: https://github.com/nodejs/node/pull/17030 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Franziska Hinkelmann authored
Use an std::unique_ptr for variables that are deleted right after creation. Since the destructor of InspectorTimer is private but needed by the unique_ptr, define deleter_type as friend. PR-URL: https://github.com/nodejs/node/pull/17020 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Timothy Gu <timothygu99@gmail.com>
-
Daniel Bevenius authored
Currently the cctest target will fail on linux when configured --with-dtrace: /node-v9.2.0/out/Release/obj.target/node/src/node_dtrace.o: In function `node::DTRACE_NET_SERVER_CONNECTION( v8::FunctionCallbackInfo<v8::Value> const&)': node_dtrace.cc:(.text+0x103): undefined reference to `node_net__server__connection_semaphore' /node-v9.2.0/out/Release/obj.target/node/src/node_dtrace.o: In function `node::DTRACE_NET_STREAM_END( v8::FunctionCallbackInfo<v8::Value> const&)': ... This is because node_dtrace_provider.o is not linked by the cctest target. This commit tries to fix and simplify the conditions in cctest target so that node_dtrace.o is included for all operating systems that support dtrace, include node_dtrace_ustack.o for all operating systems except mac and linux, and include node_dtrace_provider.o for all operating systems except mac. PR-URL: https://github.com/nodejs/node/pull/17039 Reviewed-By:Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Rich Trott authored
Change documentation-only deprecation for custom inspection using `object.inspect` property to a runtime deprecation. This is a breaking change. Custom inspection via `object.inspect` is deprecated because there is a more robust Symbol-based alternative to `.inspect` and the custom inspection via `object.inspect` feature means that people can accidentally break `console.log()` simply by attaching a `.inspect` property to their objects. Note that since this is a deprecation, the custom inspection will still work. The breaking change is simply the printing of a warning which could alarm users, break tests or other things that might be dependent on specific output, etc. PR-URL: https://github.com/nodejs/node/pull/16393 Ref: https://github.com/nodejs/node/issues/15549 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Rich Trott authored
If another function has already emitted the deprecation warning with the same code as the warning that is about to be emitted, do not emit the warning. This is a breaking change. Previously, different functions could emit the same deprecation warning multiple times. This was a known bug rather than a feature, but this change is being treated as a breaking change out of caution. Identical deprecation warnings should not be emitted. PR-URL: https://github.com/nodejs/node/pull/16393 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Rich Trott authored
Improve documentation for `util.deprecate()`. In particular, provide complete function signature, document arguments, and document return value. PR-URL: https://github.com/nodejs/node/pull/16393 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Rich Trott authored
In test-util-inspect, apply ESLint exception for accessor-pairs rule narrowly. It had been applied to nearly the whole file, but is only needed for two lines. PR-URL: https://github.com/nodejs/node/pull/16393 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Ben Noordhuis authored
Commit d217b285 ("async_hooks: add trace events to async_hooks") used `NODE_MODULE_CONTEXT_AWARE_BUILTIN()` instead. After commit 8680bb9f ("src: explicitly register built-in modules") it no longer works for static library builds so remove it. PR-URL: https://github.com/nodejs/node/pull/17071 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Timothy Gu <timothygu99@gmail.com>
-
Ali Ijaz Sheikh authored
Depending on the allocator, existing code leaks memory. PR-URL: https://github.com/nodejs/node/pull/16898 Reviewed-By:
Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Khaidi Chu <i@2333.moe>
-
Timothy Gu authored
Much of the AST visitor code was ported from Chrome DevTools code written by Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>. PR-URL: https://github.com/nodejs/node/pull/15566 Fixes: https://github.com/nodejs/node/issues/13209 Refs: https://chromium.googlesource.com/chromium/src/+/e8111c396fef38da6654093433b4be93bed01dce Reviewed-By:
Stephen Belanger <admin@stephenbelanger.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Timothy Gu authored
PR-URL: https://github.com/nodejs/node/pull/15566 Reviewed-By:
Stephen Belanger <admin@stephenbelanger.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Timothy Gu authored
PR-URL: https://github.com/nodejs/node/pull/15566 Reviewed-By:
Stephen Belanger <admin@stephenbelanger.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Timothy Gu authored
PR-URL: https://github.com/nodejs/node/pull/15566 Reviewed-By:
Stephen Belanger <admin@stephenbelanger.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Timothy Gu authored
Imported from the tarball published on npm (https://registry.npmjs.org/acorn/-/acorn-5.2.1.tgz). PR-URL: https://github.com/nodejs/node/pull/15566 Reviewed-By:
Stephen Belanger <admin@stephenbelanger.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Anna Henningsen authored
Make a REPL tab completion test pass in coverage mode by using `Uin` as the common prefix of all `Uint*Array` globals instead of `co` which could be a prefix for `console` and `coverage`, so it doesn't expand the way it's expected to in coverage mode. PR-URL: https://github.com/nodejs/node/pull/17082 Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Rich Trott authored
Remove commented-out code that is leftover from a refactoring. PR-URL: https://github.com/nodejs/node/pull/17023 Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Lance Ball <lball@redhat.com>
-
Gaara authored
PR-URL: https://github.com/nodejs/node/pull/17072 Fixes: https://github.com/nodejs/node/issues/17026 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Myles Borins <myles.borins@gmail.com>
-
Sebastian Mayr authored
In cases where libraries create AsyncResources which may be emitting more events depending on usage, the only way to ensure that destroy is called properly is by calling it when the resource gets garbage collected. Fixes: https://github.com/nodejs/node/issues/16153 PR-URL: https://github.com/nodejs/node/pull/16998 Fixes: https://github.com/nodejs/node/issues/16153 Reviewed-By:
Andreas Madsen <amwebdk@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
- Nov 16, 2017
-
-
Franziska Hinkelmann authored
Use smart pointers instead of raw pointers for StdioPipes. Also, use a smart pointer for the array holding them. PR-URL: https://github.com/nodejs/node/pull/17030 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Ben Noordhuis authored
Mea culpa, somehow I managed to drop the documentation commit while merging the pull request. This should have been included in commit 74023c07 ("fs: expose realpath(3) bindings") from this month. PR-URL: https://github.com/nodejs/node/pull/17059 Refs: https://github.com/nodejs/node/pull/15776 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Evan Lucas <evanlucas@me.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Refael Ackermann <refack@gmail.com>
-
Andreas Madsen authored
This will allow trace event to record timing information for all asynchronous operations that are observed by async_hooks. PR-URL: https://github.com/nodejs/node/pull/15538 Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Franziska Hinkelmann authored
The Cpp style guide is growing. IMHO, a Table of Contents makes it easier to navigate. PR-URL: https://github.com/nodejs/node/pull/17052 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com>
-
Franziska Hinkelmann authored
Use std::unique_ptr instead of raw pointers for the tracing_agent_ in node.cc. This makes ownership clearer and we don't risk a memory leak. PR-URL: https://github.com/nodejs/node/pull/17012 Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Timothy Gu <timothygu99@gmail.com>
-
Daniel Bevenius authored
This reverts commit a36b5405. PR-URL: https://github.com/nodejs/node/pull/14986 Refs: https://github.com/nodejs/node/issues/14158 Refs: https://github.com/nodejs/node/pull/14892 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com>
-
Daniel Bevenius authored
The motivation for this commit is to enable projects embedding Node.js and building with --enable-static to be able to run the test suite and linter. Currently when building with --enable-static no node executable will be created which means that the tests (apart from the cctest) and linter cannot be run. This is currently a work in progress and works on MacOS but I need to run the CI, and manually on different environments to verify that it works as expected. PR-URL: https://github.com/nodejs/node/pull/14986 Refs: https://github.com/nodejs/node/issues/14158 Refs: https://github.com/nodejs/node/pull/14892 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com>
-
Daniel Bevenius authored
Currenlty the test target will echo additional information that might not be that useful, for example: make doc-only make[1]: Nothing to be done for `doc-only'. make lint Running JS linter... Running C++ linter... Total errors found: 0 make[2]: Nothing to be done for `lint-md'. Running C++ linter on addon docs... Total errors found: 0 make cctest This commit suggests reducing this to: make -s doc-only make -s lint Running JS linter... Running C++ linter... Running C++ linter on addon docs... Total errors found: 0 make -s cctest PR-URL: https://github.com/nodejs/node/pull/17010 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com>
-
Franziska Hinkelmann authored
Instead of raw pointerns, use std::unique_ptr for PBKDF2Request and RandomBytesRequest. This makes ownership more clear. PR-URL: https://github.com/nodejs/node/pull/17000 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Steve Kinney authored
Tests a basic WebAssembly module that adds two numbers. wasm example from the WebAssembly/wabt repo licensed Apache 2.0. Refs: https://github.com/WebAssembly/wabt/blob/49b7984544ddaf14d5e2f1ad9115dad7e9a2b299/demo/wat2wasm/examples.js#L27-L32 PR-URL: https://github.com/nodejs/node/pull/16760 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Myles Borins <myles.borins@gmail.com> Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By:
Yuta Hiroto <hello@about-hiroppy.com>
-