- Apr 17, 2019
-
-
Ruben Bridgewater authored
This improves the worker coverage by using `internal/assert` instead of relying on `assert` in case a faulty worker message type is received. PR-URL: https://github.com/nodejs/node/pull/27230 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
Ruben Bridgewater authored
Replace a couple of checks with a single regular expression. PR-URL: https://github.com/nodejs/node/pull/27233 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Yongsheng Zhang <zyszys98@gmail.com>
-
Rod Vagg authored
PR-URL: https://github.com/nodejs/node/pull/24114 Refs: https://nodejs.org/en/download/releases/ Refs: https://github.com/lgeiger/node-abi/blob/master/index.js Refs: https://github.com/nodejs/TSC/issues/621 Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Ali Ijaz Sheikh <ofrobots@google.com>
-
Joyee Cheung authored
Previously when an uncaught JS error is thrown before Environment was assigned to the context (e.g. a SyntaxError in a per-context script), it triggered an infinite recursion: 1. The error message listener `node::OnMessage()` triggered `node::FatalException()` 2. `node::FatalException()` attempted to get the Environment assigned to the context entered using `Environment::GetCurrent()` 3. `Environment::GetCurrent()` previously incorrectly accepted out-of-bound access with the length of the embedder data array as index, and called `context->GetAlignedPointerFromEmbedderData()` 4. The out-of-bound access in `GetAlignedPointerFromEmbedderData()` triggered a fatal error, which was handled by `node::FatalError()` 5. `node::FatalError()` called `Environment::GetCurrent()`, then we went back to 3. This patch fixes the incorrect guard in 3. When `Environment::GetCurrent()` returns nullptr (when Environment is not yet assigned to the context) in 2, it now prints the JS stack trace and crashes directly. PR-URL: https://github.com/nodejs/node/pull/27236 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Joyee Cheung authored
These cannot be preserved correctly in v8 snapshot. Currently none of these are called during bootstrap, this adds assertions to make sure future contributors do not accidentally call these in the wrong time. Consider this, on the machine that builds releases: ``` process.cwd(); # "/home/iojs/build/workspace/" ``` If `process.cwd()` is cached as in https://github.com/nodejs/node/pull/27224, when the user downloads this binary to their machine: ``` $ cd ~/ $ pwd # "/User/foo" $ node -p "process.cwd()" # "/home/iojs/build/workspace/" ``` This patch only adds checks in methods that get states from the environment - it's not likely that the setters would be called during bootstrap, and if they are called, we'll just ignore them and whatever tests that test the change would fail when snapshot is enabled. However the getters may be called in order to persist information into strings and that would be harder to catch (the test is only likely to test the format of these strings which won't be useful). PR-URL: https://github.com/nodejs/node/pull/27234 Refs: https://github.com/nodejs/node/pull/27224 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Rich Trott authored
In lib/dns.js, use `isIP()` instead of `isIPv4()` for determining the `family` property in `lookup()`. If an invalid IP address is returned, the `family` currently provided is `6`. With this change, it will be `0`. Update documentation to reflect this. PR-URL: https://github.com/nodejs/node/pull/27081 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:
Ruben Bridgewater <ruben@bridgewater.de>
-
Rich Trott authored
Use `isIP()` instead of `isIPv4()` since it does the additional functionality that we were adding after our calls to `isIP()`. This not-so-incidentally also increases code coverage from tests. At least one of the replaced ternaries was difficult to cover reliably because operating system/configuration variances were too unpredictable. PR-URL: https://github.com/nodejs/node/pull/27081 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:
Ruben Bridgewater <ruben@bridgewater.de>
-
Refael Ackermann authored
* fix test-code-cache (for the common cases) * deprecate `configure --code-cache-path` PR-URL: https://github.com/nodejs/node/pull/27161 Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com>
-
Refael Ackermann authored
PR-URL: https://github.com/nodejs/node/pull/27161 Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com>
-
Joyee Cheung authored
This patch implement a mkcodecache executable on top of the `NativeModuleLoader` singleton. This makes it possible to build a Node.js binary with embedded code cache without building itself using the code cache stub - the cache is now initialized by `NativeModuleEnv` instead which can be refactored out of the mkcodecache dependencies. PR-URL: https://github.com/nodejs/node/pull/27161 Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com>
-
Myles Borins authored
Notable Changes: * n-api: - add API for asynchronous functions (Gabriel Schulhof) https://github.com/nodejs/node/pull/17887 - mark thread-safe function as stable (Gabriel Schulhof) https://github.com/nodejs/node/pull/25556 PR-URL: https://github.com/nodejs/node/pull/26933 -
Joyee Cheung authored
This patch encapsulates the main isolate management into a NodeMainInstance class that manages the resources with RAII and controls the Isolate::CreateParams (which is necessary for deserializing snapshots with external references) PR-URL: https://github.com/nodejs/node/pull/27220 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Richard Lau authored
Replace try-catch blocks in tests with `assert.rejects()` and `assert.throws()`. PR-URL: https://github.com/nodejs/node/pull/27207 Fixes: https://github.com/nodejs/node/issues/27198 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By:
Ben Coe <bencoe@gmail.com>
-
Richard Lau authored
If `file` is a file then on Windows `mkdir` on `file/a` returns an `ENOENT` error while on POSIX the equivalent returns `ENOTDIR`. On the POSIX systems `ENOTDIR` would break out of the loop but on Windows the `ENOENT` would strip off the `a` and attempt to make `file` as a directory. This would return `EEXIST` but the code wasn't detecting that the existing path was a file and attempted to make `file/a` again. PR-URL: https://github.com/nodejs/node/pull/27207 Fixes: https://github.com/nodejs/node/issues/27198 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By:
Ben Coe <bencoe@gmail.com>
-
Geoffrey Booth authored
New flag is for string input only PR-URL: https://github.com/nodejs/node/pull/27184 Reviewed-By:
Jan Krems <jan.krems@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Myles Borins <myles.borins@gmail.com>
-
- Apr 16, 2019
-
-
Richard Lau authored
The test writes out a large file via `fs.createWriteStream()` but was not listening for the `error` event, which the `fs` docs describe as the reliable way to detect write errors. PR-URL: https://github.com/nodejs/node/pull/27058 Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Luigi Pinca authored
The function is very simple and is only called from `onwrite()`. PR-URL: https://github.com/nodejs/node/pull/27203 Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Masashi Hirano <shisama07@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Yongsheng Zhang <zyszys98@gmail.com>
-
Ruwan Geeganage authored
PR-URL: https://github.com/nodejs/node/pull/27212 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
gengjiawen authored
PR-URL: https://github.com/nodejs/node/pull/26959 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Tobias Nießen <tniessen@tnie.de>
-
gengjiawen authored
PR-URL: https://github.com/nodejs/node/pull/26959 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Tobias Nießen <tniessen@tnie.de>
-
gengjiawen authored
PR-URL: https://github.com/nodejs/node/pull/25947 Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
-
Refael Ackermann authored
even though jobs can run in parallel they start in declaration order * this patch makes "compiles >> no lint" in terms of precedence PR-URL: https://github.com/nodejs/node/pull/27205 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Joyee Cheung authored
In addition, use process.stderr instead of console.error when there is no need to swallow the error. PR-URL: https://github.com/nodejs/node/pull/27112 Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Aymen Naghmouchi authored
This adds documentation that is meant as internal only. As first entry the `--inspect-brk-node` flag got documented here. PR-URL: https://github.com/nodejs/node/pull/26665 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Richard Lau authored
Travis will be switching the default version of Python from 2.7 to 3.6. Our configuration and build scripts are not quite ready for Python 3 yet, so pin the version of Python to 2.7. PR-URL: https://github.com/nodejs/node/pull/27166 Refs: https://changelog.travis-ci.com/upcoming-python-default-version-update-96873 Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Ruben Bridgewater authored
This adds a flag to define the default behavior for unhandled rejections. Three modes exist: `none`, `warn` and `strict`. The first is going to silence all unhandled rejection warnings. The second behaves identical to the current default with the excetion that no deprecation warning will be printed and the last is going to throw an error for each unhandled rejection, just as regular exceptions do. It is possible to intercept those with the `uncaughtException` hook as with all other exceptions as well. This PR has no influence on the existing `unhandledRejection` hook. If that is used, it will continue to function as before. PR-URL: https://github.com/nodejs/node/pull/26599 Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Matheus Marchini <mat@mmarchini.me> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Сковорода Никита Андреевич <chalkerx@gmail....>
-
Ruben Bridgewater authored
In case of fatal errors, first print the error before aborting in case the process should abort on uncaught exceptions. PR-URL: https://github.com/nodejs/node/pull/26599 Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Matheus Marchini <mat@mmarchini.me> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
-
- Apr 15, 2019
-
-
Ruben Bridgewater authored
This updates the customization of colors for `util.inspect`. A couple entries were missing and this also adds a reference to check for colors. PR-URL: https://github.com/nodejs/node/pull/27052 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ruben Bridgewater authored
This makes sure weak entries are only sorted once, while using the sorted option. PR-URL: https://github.com/nodejs/node/pull/27052 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ruben Bridgewater authored
Using `util.inspect` on errors is going to highlight userland and node_module stack frames from now on. This is done by marking Node.js core frames grey and frames that contain `node_modules` in their path yellow. That way it's easy to grasp what frames belong to what code. PR-URL: https://github.com/nodejs/node/pull/27052 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ruben Bridgewater authored
This validates the input to make sure the arguments do not overflow. Before, if the input would overflow, it would cause the write to be performt in the wrong spot / result in unexpected behavior. Instead, just use a strict number validation. PR-URL: https://github.com/nodejs/node/pull/27045 Fixes: https://github.com/nodejs/node/issues/27043 Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Ben Noordhuis authored
Verify that RSA_NO_PADDING and RSA_PKCS1_PADDING work as advertised. PR-URL: https://github.com/nodejs/node/pull/27188 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Sam Roberts <vieuxtech@gmail.com> Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com>
-
Rich Trott authored
The test should pass if ESERVFAIL is the result. Refs: https://github.com/nodejs/node/issues/25870#issuecomment-471024667 PR-URL: https://github.com/nodejs/node/pull/27208 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Rich Trott authored
Make the TSC Meetings section in GOVERNANCE.md simpler and shorter. PR-URL: https://github.com/nodejs/node/pull/27204 Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com>
-
Vse Mozhet Byt authored
* Add missing reference ids. * Un-link impossible wildcard link. * Hardcode a link that baffles our new doc toolchain (`[][]` part is parsed as an empty link now instead of two-dimensional array sign). PR-URL: https://github.com/nodejs/node/pull/27141 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com>
-
Anna Henningsen authored
This condition was incorrect. We currently take the fallback path in default Node builds, which always works, but may come with some overhead, whereas the intention was that we use the fast path in this condition. This is causing issues for embedders, because we would erroneously try to take the fast path when they don’t provide a Node.js-style `ArrayBufferAlloactor`, and crash as a consequence of that. This also requires us to relax the check in the debugging ArrayBuffer allocator a bit, because since d117e41e, 0-sized ArrayBuffers may actually point to allocations of size 1. Previously, that wasn’t caught because the fallback path circumvented our ArrayBufferAllocator. Refs: https://github.com/nodejs/node/commit/84e02b178ad14fae0df2a514e8a39bfa50ffdc2d#r33116006 PR-URL: https://github.com/nodejs/node/pull/27174 Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host>
-
- Apr 14, 2019
-
-
Rich Trott authored
Update js-yaml from 3.13.0 to 3.13.1 in the lint-md.js tool. Version 3.13.0 is the subject of a security problem. It is almost certainly not anything that is reasonable exploitable in our code base (as it's internal tooling) but good to update anyway just in case... Refs: https://app.snyk.io/vuln/SNYK-JS-JSYAML-174129 PR-URL: https://github.com/nodejs/node/pull/27195 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Yongsheng Zhang <zyszys98@gmail.com>
-
Refael Ackermann authored
PR-URL: https://github.com/nodejs/node/pull/25614 Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
-
Refael Ackermann authored
PR-URL: https://github.com/nodejs/node/pull/25614 Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
-
Refael Ackermann authored
* Tree-factor location of some *.py files for easy demarcation of areas to exclude. PR-URL: https://github.com/nodejs/node/pull/25614 Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
-