0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

21291 Commits

Author SHA1 Message Date
Vse Mozhet Byt
48e90ed87e doc: lowercase primitives in test/common/README.md
PR-URL: https://github.com/nodejs/node/pull/18875
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-22 01:48:51 +02:00
Yihong Wang
ab7c627e53
test: check symbols in shared lib
When building the node with `--shared` option, we need
to verify the symbols in shared lib instead of executable.

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/18806
Refs: https://github.com/nodejs/node/issues/18535
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-02-21 22:24:12 +01:00
Trivikram
15e02ceb1e
test: http2 errors on req.close()
PR-URL: https://github.com/nodejs/node/pull/18854
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-21 22:22:14 +01:00
Anna Henningsen
03ddd13d8a
net: use _final instead of on('finish')
Shutting down the connection is what `_final` is there for.

PR-URL: https://github.com/nodejs/node/pull/18608
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-21 20:42:18 +01:00
Ben Noordhuis
6bdc18c592 src: don't touch js object in Http2Session dtor
Don't try to update the internal field pointer of the JS object in the
destructor.

The garbage collector invokes the destructor when the object is
collected and is not necessarily in a valid state anymore.

PR-URL: https://github.com/nodejs/node/pull/18656
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-02-21 15:24:18 +01:00
Ben Noordhuis
d4024815b7 src: remove unnecessary Reset() calls
The previous commit made persistent handles auto-reset on destruction.
This commit removes the Reset() calls that are now no longer necessary.

PR-URL: https://github.com/nodejs/node/pull/18656
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-02-21 15:24:18 +01:00
Ben Noordhuis
992703f2b5 src: prevent persistent handle resource leaks
Replace v8::Persistent with node::Persistent, a specialization that
resets the persistent handle on destruction.  Prevents accidental
resource leaks when forgetting to call .Reset() manually.

I'm fairly confident this commit fixes a number of resource leaks that
have gone undiagnosed so far.

PR-URL: https://github.com/nodejs/node/pull/18656
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-02-21 15:24:18 +01:00
Rich Trott
e53275d819 doc: fix minor grammar/typographical issues in onboarding.md
PR-URL: https://github.com/nodejs/node/pull/18847
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: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-02-21 00:30:25 -08:00
Rich Trott
1b83a9df05 doc: update onboarding.md for faster exercise completion
Note that the CI run for the exercise can be minimal.

PR-URL: https://github.com/nodejs/node/pull/18846
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-21 00:28:10 -08:00
Vse Mozhet Byt
d28edf97fa doc: fix nits in tools/doc/README.md
* Sync format schemes with the current doc state.
* Lowercase primitive types.
* Fix typos and unify the style.
* Remove tautological info.

PR-URL: https://github.com/nodejs/node/pull/18874
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-02-21 00:50:46 +02:00
Gus Caplan
6934792eb3 lint: move eslint to new plugin system
PR-URL: https://github.com/nodejs/node/pull/18566
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2018-02-20 13:13:22 -06:00
Jeremiah Senkpiel
7514eb3cff test: actually test tty getColorDepth()
TTY tests should almost never be placed in `/parallel/`. Skipping TTY
tests there due to missing tty fds just means they will never be run,
ever, on any system.

This moves the tty-get-color-depth test to `/pseudo-tty/` where the test
runner will actually make a pty fd.

Refs: https://github.com/nodejs/node/pull/17615
PR-URL: https://github.com/nodejs/node/pull/18800
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-02-20 12:31:26 -05:00
Jeremiah Senkpiel
92bf2492cd test: move getTTYfd() to common helpers
This utility is fairly generic and likely useful for more than one test.

PR-URL: https://github.com/nodejs/node/pull/18800
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-02-20 12:31:16 -05:00
Trivikram
0089860757 test: http2 client settings invalid callback
PR-URL: https://github.com/nodejs/node/pull/18850
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-20 07:52:23 -08:00
Trivikram
1e57a8d117 test: http2 client ping errors
PR-URL: https://github.com/nodejs/node/pull/18849
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-20 07:46:15 -08:00
Trivikram
808c05858a test: http2 client operations after destroy
PR-URL: https://github.com/nodejs/node/pull/18845
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-20 07:39:01 -08:00
dustinnewman98
e83adf87f5 doc: improved documentation for fs.unlink()
Refs: https://github.com/nodejs/node/issues/11135

PR-URL: https://github.com/nodejs/node/pull/18843
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-02-20 10:06:29 -03:00
Justin Lee
2caa1f5458 doc: fix broken link in pull-requests.md
PR-URL: https://github.com/nodejs/node/pull/18873
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-20 02:18:03 +02:00
Vse Mozhet Byt
469036add4 doc: fix typo in http2.md
PR-URL: https://github.com/nodejs/node/pull/18872
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-20 00:01:50 +02:00
Kyle Farnung
de0ed84f04 tls: tls_wrap causes debug assert in vector
When using a debug build (on Windows specifically) the error case for
tls_wrap causes an assert to fire because the index being passed is
outside the bounds of the vector.

The fix is to switch to iterators.

PR-URL: https://github.com/nodejs/node/pull/18830
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-19 12:35:08 -08:00
Anatoli Papirovski
28f3ffba0f
timers: add helper fn for async init
There are currently 3 places in Timers where the exact same code
appears. Instead create a helper function that does the same job
of setting asyncId & triggerAsyncId, as well as calling emitInit.

PR-URL: https://github.com/nodejs/node/pull/18825
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-19 07:02:21 -05:00
Daniel Bevenius
30f89dfbf6 build: add node_lib_target_name to cctest deps
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.

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>
2018-02-19 12:27:25 +01:00
Matteo Collina
3d93f39190 http2: make response.end() return this
PR-URL: https://github.com/nodejs/node/pull/18780
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-19 08:59:47 +01:00
Matteo Collina
8118da7430 http: OutgoingMessage.end() should return this
PR-URL: https://github.com/nodejs/node/pull/18780
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-19 08:59:32 +01:00
Matteo Collina
f6721c20df stream: writable.end should return this.
PR-URL: https://github.com/nodejs/node/pull/18780
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-19 08:59:12 +01:00
Daniel Bevenius
e91ea21411 src: add nullptr check for session in DEBUG macro
Currenlty when configuring --debug-http2
/test/parallel/test-http2-getpackedsettings.js will segment fault:

$ out/Debug/node test/parallel/test-http2-getpackedsettings.js
Segmentation fault: 11

This is happening because the settings is created with the Environment in
PackSettings:
Http2Session::Http2Settings settings(env);
This will cause the session to be set to nullptr. When the init
function is later called the expanded DEBUG_HTTP2SESSION macro will
cause the segment fault when the session is dereferenced.

PR-URL: https://github.com/nodejs/node/pull/18815
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-19 08:17:41 +01:00
Joyee Cheung
12412ef43f
fs: fix potential segfault in async calls
When the async uv_fs_* call errors out synchronously in AsyncDestCall,
the after callbacks (e.g. AfterNoArgs) would delete the req_wrap
in FSReqAfterScope, and AsyncDestCall would set those req_wrap to
nullptr afterwards. But when it returns to the top-layer bindings,
the bindings all call `req_wrap->SetReturnValue()` again without
checking if `req_wrap` is nullptr, causing a segfault.

This has not been caught in any of the tests because we usually do a
lot of argument checking in the JS layer before invoking the uv_fs_*
functions, so it's rare to get a synchronous error from them.

Currently we never need the binding to return the wrap to JS layer,
so we can just call `req_wrap->SetReturnValue()` to return undefined
for normal FSReqWrap and the promise for FSReqPromise in AsyncDestCall
instead of doing this in the top-level bindings.

PR-URL: https://github.com/nodejs/node/pull/18811
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-19 15:12:16 +08:00
Sergey Golovin
472cde603e fs: remove useless comments which duplicate names of variables
PR-URL: https://github.com/nodejs/node/pull/18739
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-02-17 16:07:41 -02:00
Shobhit Chittora
5156342105
tools: custom eslint autofix for inspector-check.js
1. Adds fixer method
2. Extends test

PR-URL: https://github.com/nodejs/node/pull/16646
Refs: https://github.com/nodejs/node/issues/16636
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-17 17:15:05 +01:00
Shobhit Chittora
f242d4b250
tools: auto fix custom crypto-check eslint rule
1. Fixer for crypto-check.js
2. Extends tests

PR-URL: https://github.com/nodejs/node/pull/16647
Refs: https://github.com/nodejs/node/issues/16636
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-17 17:11:12 +01:00
Sam Roberts
7ca4ca8cc3
lib: allow process kill by signal number
This brings the behaviour in line with the documentation.

PR-URL: https://github.com/nodejs/node/pull/16944
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-17 17:09:25 +01:00
juggernaut451
c9b42c4c13
test: refactor parallel/test-tls-pause
Use arrow functions and common.mustCall() and add a description.

PR-URL: https://github.com/nodejs/node/pull/18714
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-02-17 15:49:07 +01:00
Alhadis
ef7f5a11e8
doc: refactor manpage to use mdoc(7) macros
Like man(7), mdoc(7) is a macro package for marking up computer manuals.
The main difference is that mdoc is semantic rather than presentational,
providing authors with a full DSL to abstract page markup from low-level
Roff commands. By contrast, `man` is minimalist and leaves formatting to
the author, who is expected to have a working amount of Roff knowledge.

Therefore the use of `mdoc` for marking up Node's manpage is a decidedly
better choice than bare `man`. Less room is left for error and mandoc(1)
offers very robust error-checking and linting.

PR-URL: https://github.com/nodejs/node/pull/18559
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-02-17 15:43:29 +01:00
Bartosz Sosnowski
ea1a07656e
doc: mark accessing IPC channel fd as undefined
Adds note that accessing the fd of the IPC channel in any other way
than process.send, or using the IPC channel with child processes that
is not Node.js is not supported.

PR-URL: https://github.com/nodejs/node/pull/17545
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-17 15:24:38 +01:00
Luigi Pinca
33103e9758
test: refactor stream-*-constructor-set-methods
- Use `common.mustCall()` to ensure that callbacks are called.
- Remove no longer needed variables.
- Remove unnecessary `process.on('exit')` usage.

PR-URL: https://github.com/nodejs/node/pull/18817
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-17 15:22:14 +01:00
Myles Borins
81232320aa
deps: patch V8 to 6.4.388.46
PR-URL: https://github.com/nodejs/node/pull/18827
Refs: https://github.com/v8/v8/compare/6.4.388.45...6.4.388.46
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-02-17 15:19:52 +01:00
Rich Trott
2fbe15b82c
doc: fix minor typos in GOVERNANCE.md
PR-URL: https://github.com/nodejs/node/pull/18829
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-17 15:16:56 +01:00
Bartosz Sosnowski
1bda746c1b
test: stdio pipe behavior tests
Add two regression tests for stdio over pipes.

test-stdio-pipe-access tests if accessing stdio pipe that is being read
by another process does not deadlocks Node.js. This was reported in
https://github.com/nodejs/node/issues/10836 and was fixed in v8.3.0.
The deadlock would happen intermittently, so we run the test 5 times.

test-stdio-pipe-redirect tests if redirecting one child process stdin to
another process stdout does not crash Node as reported in
https://github.com/nodejs/node/issues/17493. It was fixed in
https://github.com/nodejs/node/pull/18019.

PR-URL: https://github.com/nodejs/node/pull/18614
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-17 14:57:00 +01:00
Sergey Golovin
b404aa56c0
path: replace duplicate conditions by functions
It will also remove useless "code" variables by inlining
path.charCodeAt.

PR-URL: https://github.com/nodejs/node/pull/18693
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-17 14:53:58 +01:00
Anna Henningsen
590eacecaa
net: simplify net.Socket#end()
`writable` is already set by the streams side, and
there is a handler waiting for the writable side to finish
which already takes care of the other cleanup code that
was previously there; both of these things can therefore be removed.

PR-URL: https://github.com/nodejs/node/pull/18708
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-17 14:37:35 +01:00
Myles Borins
99d693da5c
lib: replace eval with vm.runInThisContext
PR-URL: https://github.com/nodejs/node/pull/18623
Refs: https://github.com/nodejs/node/pull/18212#pullrequestreview-94616927
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-17 14:35:34 +01:00
killagu
38f04d4da1 tools, test: fix prof polyfill readline
`node --prof foo.js` may not print the full profile log file, leaving
the last line broken (for example `tick,`. When that happens, `readline`
will be stuck in an infinite loop. This patch fixes it.

Also introduced `common.isCPPSymbolsNotMapped` to avoid duplicated code
on tick-processor tests.

PR-URL: https://github.com/nodejs/node/pull/18641
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-17 10:06:53 -02:00
Michaël Zasso
513d939720 fs: move fs.promises API to fs/promises
PR-URL: https://github.com/nodejs/node/pull/18777
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-02-17 10:15:20 +01:00
Michaël Zasso
2620358624 fs: move utility functions to internal/fs
PR-URL: https://github.com/nodejs/node/pull/18777
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-02-17 10:09:22 +01:00
Yihong Wang
6c9774fd94 doc: add Yihong Wang to collaborators
Signed-off-by: Yihong Wang <yh.wang@ibm.com>

PR-URL: https://github.com/nodejs/node/pull/18824
Refs: https://github.com/nodejs/node/issues/18533
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-02-16 21:14:59 -08:00
juggernaut451
760f86c75b test: refactor parallel/test-tls-0-dns-altname
PR-URL: https://github.com/nodejs/node/pull/18803
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-16 16:18:23 -08:00
Myles Borins
1fd69872e6 test: add common.skipIfEslintMissing
We've added a number of tests that hook into ESLint which can error
when running the test suite with the distributed tarball. This PR
adds a new test helper `common.skipIfEslintMissing` and will skip
remaining tests in a file when `ESLint` is not available at
`tools/node_modules/eslint`

PR-URL: https://github.com/nodejs/node/pull/18807
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-16 15:54:56 -08:00
Ali Ijaz Sheikh
6ab288f3b8 test: fix warnings in addon tests
The legacy MakeCallback deprecation was resulting in compile time
warnings in adddon tests. Fix them.

Ref: https://github.com/nodejs/node/pull/18632

PR-URL: https://github.com/nodejs/node/pull/18810
Refs: https://github.com/nodejs/node/pull/18632
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-16 15:47:07 -08:00
Jimmy Thomson
197258bda7 src: changing node_file's usage of v8::Resolver
node_file was casting back and forth between v8::Resolver and
v8::Promise. This is unnecessary; most of the time it just wants the
v8::Resolver, converting to the v8::Promise only as a return value.

PR-URL: https://github.com/nodejs/node/pull/18765
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
2018-02-16 15:03:17 -08:00
Anna Henningsen
cbe6d5c519 doc: warn against concurrent http2stream.respondWithFD
Upcoming changes to move away from synchronous I/O on the main
thread will imply that using the same file descriptor to
respond on multiple HTTP/2 streams at the same time is invalid,
because at least on Windows `uv_fs_read()` is race-y.

Therefore, warn against such usage.

PR-URL: https://github.com/nodejs/node/pull/18762
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-16 13:54:14 -08:00