summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* n-api: allow escape of undefinedescape_undefinedMichael Dawson2018-03-183-2/+22
| | | | | | | | | The node-addon-api module was calling escape on undefined which would fail. Instead of forcing a check in all consumers of napi_escape_handle accept undefined and simply return it as it does not need to be escaped. Refs: https://github.com/nodejs/node-addon-api/issues/233
* Revert "util: use blue on non-windows systems for number/bigint"Ruben Bridgewater2018-03-172-5/+3
| | | | | | | | | | | | | | | | This reverts commit 1708af369ba4cdfbc9f3eadd657508498b8489a3. 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>
* fs: fix `createReadStream(…, {end: n})` for non-seekable fdsAnna Henningsen2018-03-172-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | 82bdf8fba2d3f 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 82bdf8fba2d3f 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>
* util: add boxed BigInt formatting to util.inspectMichaël Zasso2018-03-172-0/+9
| | | | | | | | | | | | | | | | | | 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>
* n-api: add missing exception checkingMichael Dawson2018-03-162-5/+22
| | | | | | | | | | | | | | | | 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>
* perf_hooks,trace_events: emit perf milestone trace eventsJames M Snell2018-03-167-28/+92
| | | | | | | 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>
* test: fix flaky test-http2-settings-floodRich Trott2018-03-162-11/+15
| | | | | | | | | | | | 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>
* doc: fix typos on n-apiKyle Robinson Young2018-03-161-8/+8
| | | | | | | | | | | 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>
* src: remove unused uv.h include from async_wrap.ccDaniel Bevenius2018-03-161-1/+0
| | | | | | | | | | 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>
* src: fix indenting of wrap->EmitTraceEventBeforeDaniel Bevenius2018-03-161-1/+1
| | | | | PR-URL: https://github.com/nodejs/node/pull/19340 Reviewed-By: James M Snell <jasnell@gmail.com>
* src: add extractPromiseWrap functionDaniel Bevenius2018-03-161-12/+9
| | | | | | | | 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>
* doc: fix punctuation issue in async_hooks.mdRich Trott2018-03-151-1/+1
| | | | | | | | | | | | | | 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>
* n-api,test: add int64 bounds testsKyle Farnung2018-03-152-0/+30
| | | | | | | | | | | | | 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>
* assert: improve assert()/assert.ok() performanceBrian White2018-03-152-6/+24
| | | | | | | | | 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>
* child_process: define EACCES as a runtime errorGireesh Punathil2018-03-151-1/+3
| | | | | | | | | | | | | 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>
* src: simplify Environment::HandleCleanupJoyee Cheung2018-03-153-51/+48
| | | | | | | | | | | | | | - 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>
* src: call CleanupHandles in FreeEnvironmentJoyee Cheung2018-03-152-1/+1
| | | | | | | | | | | | | | | 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>
* build: disable V8 untrusted code mitigationsMichaël Zasso2018-03-152-0/+22
| | | | | | | | | | | | | 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>
* deps: allow disabling V8 untrusted code mitigationsMichaël Zasso2018-03-152-1/+7
| | | | | | | | | | | | | 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>
* lib: add back lib/module.js redirectionJoyee Cheung2018-03-151-0/+3
| | | | | | | | | | | | | 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>
* lib: restructure cjs and esm loadersJoyee Cheung2018-03-1538-174/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* src: put bootstrappers in lib/internal/bootstrap/Joyee Cheung2018-03-1532-81/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* test: remove NODE_DEBUG in global module loading testJoyee Cheung2018-03-151-2/+0
| | | | | | | | | | | | 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>
* http: align parser with StreamBase interface changesAnna Henningsen2018-03-154-0/+36
| | | | | | | | | | | | | | 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>
* benchmark: remove excessive value from http2 benchmarkAnna Henningsen2018-03-151-1/+1
| | | | | | | | | `requests = 1000000` took about 10 minutes per run for me and doesn’t seem to add much value on its own. 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>
* src: use ObjectTemplate for creating stream req objsAnna Henningsen2018-03-154-9/+25
| | | | | | | | | | | | | | | | | This allows V8 to avoid preparing a execution context for the constructor, to give a (kinda) small but noticeable perf gain. Benchmarks (only this commit): $ ./node benchmark/compare.js --new ./node --old ./node-master --filter net-c2s.js --set len=10 --set type=asc --runs 360 net | Rscript benchmark/compare.R [01:15:27|% 100| 1/1 files | 720/720 runs | 1/1 configs]: Done confidence improvement accuracy (*) (**) (***) net/net-c2s.js dur=5 type='asc' len=10 *** 0.69 % ±0.31% ±0.41% ±0.53% 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>
* http2: remove regular-file-only restrictionAnna Henningsen2018-03-157-14/+164
| | | | | | | | | | | | Requiring `respondWithFile()` to only work with regular files is an artificial restriction on Node’s side and has become unnecessary. Offsets or lengths cannot be specified for those files, but that is an inherent property of other file types. 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>
* http2: use native pipe instead of synchronous I/OAnna Henningsen2018-03-154-162/+51
| | | | | | | | | | | This resolves the issue of using synchronous I/O for `respondWithFile()` and `respondWithFD()`, and enables scenarios in which the underlying file does not need to be a regular file. 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>
* src: introduce native-layer stream pipingAnna Henningsen2018-03-1510-3/+358
| | | | | | | | | Provide a way to create pipes between native `StreamBase` instances that acts more directly than a `.pipe()` call would. 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>
* src: add helper for before/after scope without JS callsAnna Henningsen2018-03-152-0/+28
| | | | | | | | | | | Add `AsyncScope` for cases where the async_hooks `before` and `after` callbacks should be called, to track async context, but no actual JS is called in between and we can therefore skip things like draining the microtask or `nextTick` queues. 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>
* src: give StreamBases the capability to ask for dataAnna Henningsen2018-03-154-0/+26
| | | | | | | | | Add a `OnStreamWantsWrite()` event that allows streams to ask for more input data if they want some. 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>
* src: make `FileHandle` a (readonly) `StreamBase`Anna Henningsen2018-03-158-14/+279
| | | | | | | | | | | | This enables accessing files using a more standard pattern. Once some more refactoring has been performed on the other existing `StreamBase` streams, this could also be used to implement `fs` streams in a more standard manner. 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>
* src: tighten handle scopes for stream operationsAnna Henningsen2018-03-155-37/+38
| | | | | | | | | | | | | Put `HandleScope`s and `Context::Scope`s where they are used, and don’t create one for native stream callbacks automatically. This is slightly less convenient but means that stream listeners that don’t actually call back into JS don’t have to pay the (small) cost of setting these up. 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>
* test: remove unused deprecation codeDaniel Bevenius2018-03-152-4/+2
| | | | | | | | | | | | | | | | | Currently there are two tests that specify a third argument, a deprecation code string, when calling common.expectWarning. The function only takes two arguments and this third argument is not used. This commit removes the deprecation code. PR-URL: https://github.com/nodejs/node/pull/19317 Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Jackson Tian <shyvo1987@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
* doc: improve best practices in onboarding-extrasRich Trott2018-03-141-6/+3
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/19315 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* doc: fix minor issues in async_hooks.mdRich Trott2018-03-141-6/+6
| | | | | | | | | | | * easily -> easy * was -> is * add a missing comma PR-URL: https://github.com/nodejs/node/pull/19313 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* doc: improve text in async_hooks.mdRich Trott2018-03-141-18/+16
| | | | | | | | | | * Remove unnecessary *Note:* designations. * Various small edits for tone, punctuation, etc. PR-URL: https://github.com/nodejs/node/pull/19312 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* test: fix test-cluster-send-handle-large-payloadRich Trott2018-03-141-0/+0
| | | | | | | | | | | test-cluster-send-handle-large-payload is susceptible to failure if it is competing for resources. Move to `sequential` directory so it is not competing with other tests. Fixes: https://github.com/nodejs/node/issues/14844 PR-URL: https://github.com/nodejs/node/pull/19311 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
* doc: add returned values and options to stream.mdIvan Filenko2018-03-151-2/+13
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/19361 Refs: https://github.com/nodejs/node/issues/11135 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
* n-api: take n-api out of experimentalMichael Dawson2018-03-1410-88/+3
| | | | | | | | | | | | | Take n-api out of experimental as per: https://github.com/nodejs/TSC/issues/501 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>
* deps: patch V8 to 6.5.254.38Myles Borins2018-03-1419-450/+218
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/19303 Refs: https://github.com/v8/v8/compare/6.5.254.31...6.5.254.38 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* doc: clarify default TLS handshake timeoutRich Trott2018-03-141-3/+3
| | | | | | | | | Because the `handshakeTimeout` is in milliseconds, use that unit of measurement to express the default value. PR-URL: https://github.com/nodejs/node/pull/19290 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* path: remove redundant functionSergey Golovin2018-03-141-77/+9
| | | | | | PR-URL: https://github.com/nodejs/node/pull/19237 Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
* build: do not cd on vcbuild helpVse Mozhet Byt2018-03-141-2/+2
| | | | | | | | | | | | `vcbuild help` just outputs help info and exits. If a user calls this command not from a project root, the directory change can be unexpected and unwanted. PR-URL: https://github.com/nodejs/node/pull/19291 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* doc: update username and emailYuta Hiroto2018-03-141-2/+2
| | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/19338 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
* src: refactor emit before/after/promiseResolveDaniel Bevenius2018-03-141-21/+13
| | | | | | | | | Currently EmitBefore, EmitAfter, EmitPromiseResolve are very similar. This commit suggests extracting the code they have in common to a new function to reduce code duplication. PR-URL: https://github.com/nodejs/node/pull/19295 Reviewed-By: Anna Henningsen <anna@addaleax.net>
* test: use descriptive names for regression testsUjjwal Sharma2018-03-135-0/+23
| | | | | | | | | | | | | | | | | | 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-9819 to test-crypto-tostring-segfault - Rename test-regress-GH-5051 to test-http-addrequest-localaddress - Rename test-regress-GH-5727 to test-net-listen-invalid-port - Rename test-regress-GH-5927 to test-tty-stdin-pipe - Rename test-regress-GH-6235 to test-v8-global-setter PR-URL: https://github.com/nodejs/node/pull/19275 Refs: https://github.com/nodejs/node/issues/19105 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* test: delete test/parallel/test-regress-GH-4948Ujjwal Sharma2018-03-131-43/+0
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/19279 Refs: https://github.com/nodejs/node/pull/19275#discussion_r173647620 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
* doc: improve style guide textRich Trott2018-03-121-3/+2
| | | | | | | | | | | | | | | | | | | * Specify that personal pronouns are OK in colloquial documentation rather than just pronouns. Pronouns are OK in all documentation. (For example, "it" is a pronoun and is acceptable in all types of documentation.) Specify "personal pronouns" for clarity. * more colloquial -> colloquial * like -> such as * Remove "mass nouns" as no mass nouns are given as examples. Plural nouns seems to be what was meant, so use that instead. * Repeat "gender-neutral" to make it clear that it refers to both terms and not merely the first term it appears before. * Remove "non-comprehensive examples". Examples are, by definition, non-comprehensive. No need to announce that the examples are examples. It is obvious. PR-URL: https://github.com/nodejs/node/pull/19269 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* test: shared lib build doesn't handle SIGPIPEYihong Wang2018-03-123-17/+39
| | | | | | | | | | | | | | | | | | | | | | | | | For shared lib build, we leave the signal handling for embedding users. In these two test cases: - `parallel/test-process-external-stdio-close-spawn` - `parallel/test-process-external-stdio-close` The pipe is used for stdout and is destroied before child process uses it for logging. So the node executble that uses shared lib build receives SIGPIPE and the child process ends. This change ignores the SIGPIPE in node_main.cc for shared lib case. Refs: https://github.com/nodejs/node/issues/18535 Signed-off-by: Yihong Wang <yh.wang@ibm.com> PR-URL: https://github.com/nodejs/node/pull/19211 Refs: https://github.com/nodejs/node/issues/18535 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>