- Mar 20, 2018
-
-
cjihrig authored
This commit adds proper error handling to net.connect() when a custom lookup() function returns an invalid address family. PR-URL: https://github.com/nodejs/node/pull/19415 Fixes: https://github.com/nodejs/node/issues/19407 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By:
Khaidi Chu <i@2333.moe> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Rich Trott authored
The test is unreliable on some Windows platforms in its current form. Make it more robust by using `setInterval()` to repeat the flooding until an error is triggered. PR-URL: https://github.com/nodejs/node/pull/19395 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
- Mar 19, 2018
-
-
Gabriel Schulhof authored
Place the test_make_callback async_hooks-related test into its own file. PR-URL: https://github.com/nodejs/node/pull/19392 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
Ivan Filenko authored
PR-URL: https://github.com/nodejs/node/pull/19331 Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Joyee Cheung authored
- Check if the watcher is active in JS land before invoking the binding, act as a noop if the state of the watcher does not match the expectation. This avoids firing 'stop' when the watcher is already stopped. - Update comments, validate more arguments and the type of the handle. - Handle the errors from uv_fs_poll_start - Create an `IsActive` helper method on StatWatcher PR-URL: https://github.com/nodejs/node/pull/19345 Refs: https://github.com/nodejs/node/pull/19089 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-
Joyee Cheung authored
- Remove ERR_FS_WATCHER_ALREADY_STARTED and ERR_FS_WATCHER_NOT_STARTED because those two situations should result in noop instead of errors for consistency with the documented behavior of fs.watchFile. This partially reverts https://github.com/nodejs/node/pull/19089 - Update comments about this behavior. Refs: https://github.com/nodejs/node/pull/19089 PR-URL: https://github.com/nodejs/node/pull/19345 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-
Joyee Cheung authored
In the async case, if the buffer was copied instead of being moved then the buf will not get deleted after the request is done. This was introduced when the FSReqWrap:: Ownership was removed in 4b9ba9b8, and ReleaseEarly was no longer called upon destruction of FSReqWrap. Create a custom Init function so we can use the MaybeStackBuffer in the FSReqBase to copy the string in the async case. The data will then get destructed when the FSReqBase is destructed. Fixes: https://github.com/nodejs/node/issues/19356 PR-URL: https://github.com/nodejs/node/pull/19357 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Myles Borins authored
PR-URL: https://github.com/nodejs/node/pull/19380 Refs: https://github.com/v8/v8/compare/6.5.254.38...6.5.254.40 Reviewed-By:
Michaël Zasso <targos@protonmail.com>
-
Daniel Bevenius authored
PR-URL: https://github.com/nodejs/node/pull/19429 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Tobias Nießen <tniessen@tnie.de> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Ujjwal Sharma authored
Rename the tests appropriately alongside mentioning the subsystem. Also, make a few basic changes to make sure the tests conform to the standard test structure. - Rename test-regress-GH-io-1068 to test-tty-stdin-end - Rename test-regress-GH-io-1811 to test-zlib-kmaxlength-rangeerror - Rename test-regress-GH-node-9326 to test-kill-segfault-freebsd - Rename test-timers-regress-GH-9765 to test-timers-setimmediate-infinite-loop - Rename test-tls-pfx-gh-5100-regr to test-tls-pfx-authorizationerror - Rename test-tls-regr-gh-5108 to test-tls-tlswrap-segfault PR-URL: https://github.com/nodejs/node/pull/19332 Fixes: https://github.com/nodejs/node/issues/19105 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Weijia Wang <starkwang@126.com> Reviewed-By:
Yuta Hiroto <hello@hiroppy.me> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Shingo Inoue <leko.noor@gmail.com>
-
James M Snell authored
PR-URL: https://github.com/nodejs/node/pull/19400 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-
James M Snell authored
Use of a MaybeStackBuffer was just silly. Fix a long standing todo Reduce code duplication a bit. PR-URL: https://github.com/nodejs/node/pull/19400 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-
James M Snell authored
Most of the inlines were leftovers from a much older design iteration and are largely pointless or counter productive. PR-URL: https://github.com/nodejs/node/pull/19400 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-
- Mar 18, 2018
-
-
Tobias Nießen authored
PR-URL: https://github.com/nodejs/node/pull/19353 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By:
Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Daniel Bevenius authored
PR-URL: https://github.com/nodejs/node/pull/19390 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Daniel Bevenius authored
This commit removes the builtin async_wrap module from lib/async_hooks.js. The motivation for this is that lib/async_hooks.js requires lib/internal/async_hooks which also binds async_wrap. Instead of lib/async_hooks.js also binding async_wrap it now only has to require the internal async_hooks and access it's exports. There might be a very good reason for doing it the current way but the reason is not obvious to me. Hopefully someone can shed some light on this. PR-URL: https://github.com/nodejs/node/pull/19368 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
Andreas Madsen <amwebdk@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Daniel Bevenius authored
Currently, there is an AsyncWrap constructor that is only used by PromiseWrap. This constructor has a body which is very similar to the other AsyncWrap constructor. This commit suggests updating the private constructor that is used by PromiseWrap and also have the second constructor delegate to this one to avoid the code duplication. PR-URL: https://github.com/nodejs/node/pull/19366 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Minwoo Jung <minwoo@nodesource.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Ruben Bridgewater authored
This reverts commit 1708af36. Numbers are much more difficult to read in blue and it would be good to have a consistent output throughout all OS. PR-URL: https://github.com/nodejs/node/pull/19256 Refs: https://github.com/nodejs/node/pull/18925 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Gibson Fahnestock <gibfahn@gmail.com>
-
- Mar 17, 2018
-
-
Anna Henningsen authored
82bdf8fb fixed an issue by silently modifying the `start` option for the case when only `end` is passed, in order to perform reads from a specified range in the file. However, that approach does not work for non-seekable files, since a numeric `start` option means that positioned reads will be used to read data from the file. This patch fixes that, and instead ends reading after a specified size by adjusting the read buffer size. This way we avoid re-introducing the bug that 82bdf8fb fixed, and align behaviour with the native file stream mechanism introduced in https://github.com/nodejs/node/pull/18936 as well. PR-URL: https://github.com/nodejs/node/pull/19329 Fixes: https://github.com/nodejs/node/issues/19240 Refs: https://github.com/nodejs/node/pull/18121 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Chen Gang <gangc.cxy@foxmail.com>
-
Michaël Zasso authored
Before: > Object(7n) BigInt {} After: > Object(7n) [BigInt: 7n] PR-URL: https://github.com/nodejs/node/pull/19341 Reviewed-By:Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host>
-
Michael Dawson authored
Add checks for a pending exception in napi_make_callback after the callback has been invoked. If there is a pending exception then we need to avoid checking the result as that will not be able to complete properly. Add additional checks to the unit test for napi_make_callback to catch this case. PR-URL: https://github.com/nodejs/node/pull/19362 Fixes: https://github.com/nodejs/node-addon-api/issues/235 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
James M Snell authored
Emit the perf_hooks node timing milestones as trace events. PR-URL: https://github.com/nodejs/node/pull/19175 Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Rich Trott authored
The test is unreliable on some Windows platforms in its current form. Make it more robust by using `setInterval()` to repeat the flooding until an error is triggered. Fixes: https://github.com/nodejs/node/issues/18251 PR-URL: https://github.com/nodejs/node/pull/19349 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com>
-
- Mar 16, 2018
-
-
Kyle Robinson Young authored
PR-URL: https://github.com/nodejs/node/pull/19385 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Tobias Nießen <tniessen@tnie.de> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Daniel Bevenius authored
PR-URL: https://github.com/nodejs/node/pull/19342 Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Tobias Nießen <tniessen@tnie.de> Reviewed-By:
Khaidi Chu <i@2333.moe>
-
Daniel Bevenius authored
PR-URL: https://github.com/nodejs/node/pull/19340 Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Daniel Bevenius authored
Currently PromiseHook extracts the PromiseWrap from a Local<Promise> in two places. This commit extracts that code into a function instead. PR-URL: https://github.com/nodejs/node/pull/19340 Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Rich Trott authored
Move period incorrectly placed outside of parentheses to inside the parentheses. The parenthetical in this case is a full sentence. PR-URL: https://github.com/nodejs/node/pull/19364 Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By:
Yuta Hiroto <hello@hiroppy.me> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Tobias Nießen <tniessen@tnie.de>
-
Kyle Farnung authored
Added some simple tests to verify that the int64 API is correctly handling numbers greater than 32-bits. This is a basic test, but verifies that an implementer hasn't truncated back to 32-bits. Refs: https://github.com/nodejs/node-chakracore/pull/496 PR-URL: https://github.com/nodejs/node/pull/19309 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Brian White authored
PR-URL: https://github.com/nodejs/node/pull/19292 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Yuta Hiroto <hello@hiroppy.me> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
- Mar 15, 2018
-
-
Gireesh Punathil authored
Access permission on the target child is currently thrown as an exception. Bring this under the runtime error definition, much like ENOENT and friends. PR-URL: https://github.com/nodejs/node/pull/19294 Fixes: https://github.com/nodejs/help/issues/990 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Joyee Cheung authored
- Make the HandleCleanup a struct, and make the queue a std::list, iterate over it in CleanupHandles() and clear it after that. - Put the handle cleanup registration into a method and document that they will not be called in the one environemt per process setup. PR-URL: https://github.com/nodejs/node/pull/19319 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Jackson Tian <shyvo1987@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Joyee Cheung authored
CleanupHandles() has not been called in our own code base anymore after the v8 debug agent has been removed. It used to be in the ~Environment() destructor but then removed to avoid firing other events after the exit event, given that we were not going to clean up handles for the one environment per process setup. Call it in FreeEnvironment so that embedders can clean up the handles in the loop when creating multiple environments. PR-URL: https://github.com/nodejs/node/pull/19319 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Jackson Tian <shyvo1987@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Michaël Zasso authored
Refs: https://github.com/v8/v8/wiki/Untrusted-code-mitigations PR-URL: https://github.com/nodejs/node/pull/19222 Reviewed-By:
Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By:
Yang Guo <yangguo@chromium.org> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Benedikt Meurer <benedikt.meurer@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Gibson Fahnestock <gibfahn@gmail.com>
-
Michaël Zasso authored
Add a GYP flag similar to the one defined in BUILD.gn. PR-URL: https://github.com/nodejs/node/pull/19222 Reviewed-By:
Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By:
Yang Guo <yangguo@chromium.org> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Benedikt Meurer <benedikt.meurer@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Gibson Fahnestock <gibfahn@gmail.com>
-
Joyee Cheung authored
The previous commit deleted lib/module.js so that git recognize the file move `lib/module.js` -> `lib/internal/modules/cjs/loader.js`. This commit add the redirection back. PR-URL: https://github.com/nodejs/node/pull/19177 Refs: https://github.com/nodejs/node/pull/19112 Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com>
-
Joyee Cheung authored
Create `lib/internal/modules` and restructure the module loaders to make the purpose of those files clearer. Also make it clear in the code that the object exported by `lib/internal/modules/cjs/loader.js` is `CJSModule` instead of the ambiguous `Module`. Before: ``` lib ├── ... ├── internal │ ├── loaders │ │ ├── CreateDynamicModule.js │ │ ├── DefaultResolve.js │ │ ├── Loader.js │ │ ├── ModuleJob.js │ │ ├── ModuleMap.js │ │ └── Translators.js │ └── module.js └── module.js ``` After: ``` lib ├── ... ├── internal │ ├── ... │ └── modules │ ├── cjs │ │ ├── helpers.js │ │ └── loader.js │ └── esm │ ├── CreateDynamicModule.js │ ├── DefaultResolve.js │ ├── Loader.js │ ├── ModuleJob.js │ ├── ModuleMap.js │ └── Translators.js └── module.js # deleted in this commit to work with git file mode ``` PR-URL: https://github.com/nodejs/node/pull/19177 Refs: https://github.com/nodejs/node/pull/19112 Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com>
-
Joyee Cheung authored
Create `lib/internal/bootstrap/` and put bootstrappers there: Before: ``` lib/internal ├── ... ├── bootstrap_loaders.js └── bootstrap_node.js ``` After: ``` lib/internal ├── ... └── bootstrap ├── loaders.js └── node.js ``` PR-URL: https://github.com/nodejs/node/pull/19177 Refs: https://github.com/nodejs/node/pull/19112 Reviewed-By:Gus Caplan <me@gus.host> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com>
-
Joyee Cheung authored
Otherwise the debug log output might be mixed up with the expected errors and the assertion matching the error message would fail. PR-URL: https://github.com/nodejs/node/pull/19177 Refs: https://github.com/nodejs/node/pull/19112 Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com>
-
Anna Henningsen authored
The `StreamBase` interface changed, so that `OnStreamRead()` and `OnStreamAlloc()` are not guaranteed to be emitted in the same tick any more. This means that, while it isn’t causing any trouble right now, we should not assume that it’s safe to return a static buffer in the HTTP parser’s `OnStreamAlloc()` method. PR-URL: https://github.com/nodejs/node/pull/18936 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-