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

21107 Commits

Author SHA1 Message Date
Anatoli Papirovski
47a984ada0
timers: prevent event loop blocking
When an interval takes as long or longer to run as its timeout setting
and the roundtrip from rearm() to its deferal takes exactly 1ms, that
interval can then block the event loop. This is an edge case of another
recently fixed bug (which in itself was an edge case).

PR-URL: https://github.com/nodejs/node/pull/18486
Refs: https://github.com/nodejs/node/pull/15072
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-02-04 11:04:12 -05:00
Anatoli Papirovski
d7894f3969
timers: use start instead of stop + start
Instead of calling stop + start from the refresh method
of Timeout, instead just call start as libuv already
calls stop if necessary.

PR-URL: https://github.com/nodejs/node/pull/18486
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-02-04 11:04:12 -05:00
Anatoli Papirovski
71c0d0370a
timers: use const as appropriate
PR-URL: https://github.com/nodejs/node/pull/18486
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-02-04 11:04:12 -05:00
Anatoli Papirovski
a986158cbf
timers: re-enter C++ less frequently
Pass in Timer.now() as an argument of kOnTimeout instead of always
re-entering C++ to get it. Also don't constantly call Timer.now()
from ontimeout, even when it isn't needed. Improves performance
on our pooled benchmark by upwards of 40%.

PR-URL: https://github.com/nodejs/node/pull/18486
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-02-04 11:04:12 -05:00
Anatoli Papirovski
9b8e1c2e4f
timers: refactor error handling
Instead of using nextTick to process failed lists, just attempt to
process them again from C++ if the process is still alive.

This also allows the removal of domain specific code in timers.

The current behaviour is not quite ideal as it means that all lists
after the failed one will process on an arbitrary nextTick, even if
they're — say — not due to fire for another 2 days...

PR-URL: https://github.com/nodejs/node/pull/18486
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-02-04 11:04:12 -05:00
Sarat Addepalli
c45afe8198
tools: non-Ascii linter for /lib only
Non-ASCII characters in /lib get compiled into the node binary,
and may bloat the binary size unnecessarily. A linter rule may
help prevent this.

PR-URL: https://github.com/nodejs/node/pull/18043
Fixes: https://github.com/nodejs/node/issues/11209
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
2018-02-04 16:55:13 +01:00
Rod Vagg
591a8adeae
build: allow x86_64 as a dest_cpu alias for x64
x86_64 is a standard arch descriptor on Linux, allow it as an alias for
our preferred descriptor: x64

PR-URL: https://github.com/nodejs/node/pull/18052
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-04 16:53:07 +01:00
jvelezpo
95eb02dc74
doc: shell option for the execFile and execFileSync functions
Useful for executing in a shell because it accepts arguments as
an array instead of a string as exec does.
Depending on the circumstances,
that can prove to be useful if the arguments are already prepared.

PR-URL: https://github.com/nodejs/node/pull/18237
Fixes: https://github.com/nodejs/node/issues/18199
Reviewed-By: Julian Duque <julianduquej@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Adrian Estrada <edsadr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-04 16:51:49 +01:00
Guangcong Luo
27ee08363b
doc: improve http.request documentation
PR-URL: https://github.com/nodejs/node/pull/18289
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-04 16:48:51 +01:00
Birunthan Mohanathas
c9ce5c33dc
win, build: fix intl-none option
Like #17614, but for the `intl-none` option.

Refs: https://github.com/nodejs/node/pull/17614
PR-URL: https://github.com/nodejs/node/pull/18292
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2018-02-04 16:48:02 +01:00
Yihong Wang
d161625c00
build: include the libuv and zlib into node
Add libuv and zlib into node executable and shared lib. Also fix an
issue that openssl is not fully included in node executable for macOS.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

Fixes: https://github.com/nodejs/node/issues/17444
PR-URL: https://github.com/nodejs/node/pull/18383
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-04 16:44:46 +01:00
jvelezpo
6f8de31cde
test: verify the shell option works properly on execFile
Useful for executing in a shell because it accepts arguments as
an array instead of a string as exec does.
Depending on the circumstances,
that can prove to be useful if the arguments are already prepared.

PR-URL: https://github.com/nodejs/node/pull/18384
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-04 16:38:34 +01:00
Kelvin Jin
71b15e8c7b
doc: remove removed apis from http2 docs
PR-URL: https://github.com/nodejs/node/pull/18439
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-02-04 16:33:53 +01:00
Anatoli Papirovski
fc96743454
timers: remove domain specific code
It is no longer necessary to explicitly set the handle
to inherit the Timeout domain.

PR-URL: https://github.com/nodejs/node/pull/18477
Refs: https://github.com/nodejs/node/pull/16222
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-02-04 08:27:06 -05:00
Anatoli Papirovski
7020bc6e07
http: remove domain specific code
Due to some changes to async tracking of http and also
in how domains are handled, it's no longer necessary
to manually copy domain from req to res in http code.

PR-URL: https://github.com/nodejs/node/pull/18477
Refs: https://github.com/nodejs/node/pull/16222
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-02-04 08:23:26 -05:00
Anatoli Papirovski
5c2c412f21
test: add test for tls benchmarks
PR-URL: https://github.com/nodejs/node/pull/18489
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-04 08:14:44 -05:00
Gus Caplan
6d84ecefcd
vm: flip Module#link's signature
The specifier parameter is deemed to be more essential than
referencingModule. Flipping the parameter order allows developers to
write simple linker functions that only take in a specifier.

PR-URL: https://github.com/nodejs/node/pull/18471
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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-03 11:04:34 -08:00
Luigi Pinca
f8fda0d5ad net: remove redundant code from _writeGeneric()
The encoding is already handled by `Writable.prototype.write()`.

PR-URL: https://github.com/nodejs/node/pull/18429
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-03 16:18:31 +01:00
Gabriel Schulhof
1286923cc0 n-api: implement wrapping using private properties
PR-URL: https://github.com/nodejs/node/pull/18311
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Fixes: https://github.com/nodejs/node/issues/14367
2018-02-02 20:20:20 -05:00
陈刚
f0b2dd31ce stream: delete unused code
In implementation of `stream.Writable`, `writable._write()` is
always called with a callback that is `_writableState.onwrite()`.
And In `afterTransform()`, `ts.writechunk` and `ts.writecb` are
assigned to null.  So, `ts.writecb` is a true value if
`ts.writechunk` isn't null.

PR-URL: https://github.com/nodejs/node/pull/18278
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-02 23:00:50 +01:00
Justin Ridgewell
d2a6110d3f
string_decoder: reset decoder on end
This resets the StringDecoder's state after calling `#end`. Further
writes to the decoder will act as if it were a brand new instance,
allowing simple reuse.

PR-URL: https://github.com/nodejs/node/pull/18494
Fixes: https://github.com/nodejs/node/issues/16564
Refs: https://github.com/nodejs/node/pull/16594
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-02-02 20:31:39 +01:00
Jeremiah Senkpiel
68783ae0b8 timers: runtime-deprecate {un}enroll()
This was never a Very Good API, and generally just left so many open
ends for inconsistent behavior. The "optimization" benefit of this API
is little to none. Makes a starting step towards removing it so that in
the future timers, especially in their async_hooks interactions, can be
simplified.

PR-URL: https://github.com/nodejs/node/pull/18066
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-02 14:05:43 -05:00
cjihrig
42258d7e54 lib: include missing profiler file
This commit includes deps/v8/tools/arguments.js, which is
needed by the profiler.

PR-URL: https://github.com/nodejs/node/pull/18455
Fixes: https://github.com/nodejs/node/issues/18451
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-02 10:58:30 -08:00
Ruben Bridgewater
70dcacd710
assert: deprecate assert.fail partially
Using `assert.fail()` with more than one argument is not intuitive
to use and has no benefit over using a message on its own.

Therefore this introduces a runtime deprecation in case it is used
in that way.

PR-URL: https://github.com/nodejs/node/pull/18418
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-02 19:05:22 +01:00
Rich Trott
89dd21a8ad doc: streamline README intro
Shorten text that is duplicated from website and supply link.

PR-URL: https://github.com/nodejs/node/pull/18483
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-02 09:58:02 -08:00
Aaron Bieber
68d9f63347 build: add cflags for OpenBSD, remove stray comma.
PR-URL: https://github.com/nodejs/node/pull/18448
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-02 09:55:47 -08:00
Aaron Bieber
eb82b21138 v8: add missing ',' in OpenBSD's 'sources' section.
Add stack_trace_posix to 'sources' as well.

Fixes https://github.com/nodejs/node/issues/15784
Fixes https://github.com/nodejs/help/issues/992

add stack_trace_posix to OpenBSD's sources

PR-URL: https://github.com/nodejs/node/pull/18448
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-02 09:55:26 -08:00
Anna Henningsen
6acb1a3df5 process: fix reading zero-length env vars on win32
Up until now, Node did not clear the current error code
attempting to read environment variables on Windows.
Since checking the error code is the way we distinguish between
missing and zero-length environment variables, this could lead to a
false positive when the error code was still tainted.

In the simplest case, accessing a missing variable and then a
zero-length one would lead Node to believe that both calls yielded
an error.

Before:

    > process.env.I=''; process.env.Q; process.env.I
    undefined
    > process.env.I=''; /*process.env.Q;*/ process.env.I
    ''

After:

    > process.env.I=''; process.env.Q; process.env.I
    ''
    > process.env.I=''; /*process.env.Q;*/ process.env.I
    ''

This only affects Node 8 and above, since before
1aa595e5bd we always constructed a
`v8::String::Value` instance for passing the lookup key to the OS,
which in in turn always made a heap allocation and therefore
reset the error code.

PR-URL: https://github.com/nodejs/node/pull/18463
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-02 09:46:34 -08:00
James M Snell
6e7992e8b8 crypto: docs-only deprecate crypto.fips, replace
Docs-only deprecate the getter/setter crypto.fips and replace
with crypto.setFips() and crypto.getFips()

This is specifically in preparation for ESM module support

PR-URL: https://github.com/nodejs/node/pull/18335
Refs: https://github.com/nodejs/node/pull/18131
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-02 07:50:31 -08:00
Yihong Wang
a89d215b79 build: fix coverage build
After adding the node_lib target in node.gyp, most of the node source
files are moved to that target. When coverage option is enabled,
corresponding cflags and ldflags are needed in that target as well.
gcovr also needs to check .gcda data for both node and node_lib.

PR-URL: https://github.com/nodejs/node/pull/18409
Fixes: https://github.com/nodejs/node/issues/18402
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-02 10:07:25 -05:00
陈刚
fca1c557ac stream: delete redundant code
`state.corkedRequestsFree` of a writable stream is always not null.

PR-URL: https://github.com/nodejs/node/pull/18145
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-02 10:14:43 +01:00
陈刚
ce83099d3e stream: delete redundant code
In `Writable.prototype.end()`, `state.ending` is true after calling
`endWritable()` and it doesn't reset to false.

In `Writable.prototype.uncork()`, `state.finished` must be false
if `state.bufferedRequest` is true.

PR-URL: https://github.com/nodejs/node/pull/18145
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-02 10:14:34 +01:00
Rich Trott
caa26cbf13 doc: move Brian White to TSC Emeriti list
PR-URL: https://github.com/nodejs/node/pull/18482
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-01 14:40:14 -08:00
Ali Ijaz Sheikh
ad94be84f9 async_hooks: clean up comments
With some of the recent work, some of the comments were no longer
representative of the code, or were otherwise unclear. This commit
fixes some obvious issues I found.

Ref: 83e5215a4e
Ref: 0784b0440c
PR-URL: https://github.com/nodejs/node/pull/18467
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-01 09:56:51 -08:00
Myles Borins
a36b47b7d3
test: mark test-inspector-stop-profile-after-done flaky
This test is consistently failing and making CI red.

PR-URL: https://github.com/nodejs/node/pull/18491
Refs: https://github.com/nodejs/node/issues/16772
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-01 09:40:12 -08:00
James M Snell
2ac6658296 crypto,doc: fix unassignd deprecation codes
Missed when landing the original PRs

PR-URL: https://github.com/nodejs/node/pull/18492
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-01 08:09:38 -08:00
James M Snell
84cc8329f7 benchmark: spread operator benchmark
Benchmark comparing `util._extend()`, `Object.assign()`,
and the spread operator for object assignment.

`util._extend()` still wins currently.

PR-URL: https://github.com/nodejs/node/pull/18442
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2018-02-01 07:35:54 -08:00
Michaël Zasso
9e1a6f8cb1
src,lib: implement import.meta
Implement the C++ callback that is required to configure the
`import.meta` object and add one property:
- url: absolute URL of the module

PR-URL: https://github.com/nodejs/node/pull/18368
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-02-01 13:46:56 +01:00
Jan Krems
02b3bbc5e2
deps: update node-inspect to 1.11.3
Highlights:

* Using a random port works (`node inspect --port=0 script.js`)
* `takeHeapSnapshot()` creates valid snapshots again

PR-URL: https://github.com/nodejs/node/pull/18354
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-02-01 13:39:40 +01:00
Leko
7ff4888ed2
src: allow --perf-(basic-)?prof in NODE_OPTIONS
PR-URL: https://github.com/nodejs/node/pull/17600
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-01 13:38:24 +01:00
Ruben Bridgewater
4372185ef8
test: fix builds
A former commit changed the tmpDir behavior and that broke this test.

PR-URL: https://github.com/nodejs/node/pull/18500
Refs: bf6ce47259
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-01 13:17:33 +01:00
Gus Caplan
39dc947409
util: add bigint formatting to util.inspect
PR-URL: https://github.com/nodejs/node/pull/18412
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-02-01 12:23:44 +01:00
Qingyan Li
e4fc6d44c5
lib: remove debugger dead code
PR-URL: https://github.com/nodejs/node/pull/18426
Refs: 719247ff95
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-01 12:08:29 +01:00
Joyee Cheung
d3841ec872
benchmark: shorten config name in http benchmark
Shorten the config name in check_invalid_header_char so it would
not result in long lines that make the benchmark result hard to read.

PR-URL: https://github.com/nodejs/node/pull/18452
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-01 12:02:54 +01:00
Bartosz Sosnowski
ef2861961c
test: fix test-tty-get-color-depth
If getTTYfd returns 0, and stdin is not writable (like on Windows),
trying to create WriteStream will fail. This commit fixes that by
skipping fd 0.

PR-URL: https://github.com/nodejs/node/pull/18478
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-01 11:58:38 +01:00
Ben Wilcox
0c16b18043
test: show pending exception error in napi tests
Shows the result of the wasPending in the error message if the
assertion fails.

PR-URL: https://github.com/nodejs/node/pull/18413
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-01 11:57:02 +01:00
Timothy O. Peters
b0b204571b
lib: extract validation functions
PR-URL: https://github.com/nodejs/node/pull/18421
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-01 11:55:13 +01:00
Anna Henningsen
3206e20af6
test: speed up parallel/test-tls-session-cache
This test had some unnecessary timeouts that made it run for a
much longer time than necessary (about 9 s rather than 0.2 s).

PR-URL: https://github.com/nodejs/node/pull/18424
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-01 11:52:25 +01:00
陈刚
3ca79350d9
doc: improve stream documentation
PR-URL: https://github.com/nodejs/node/pull/18375
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-01 11:49:18 +01:00
Joyee Cheung
54b3a685c1
benchmark: cut down http benchmark run time
PR-URL: https://github.com/nodejs/node/pull/18379
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-01 11:43:30 +01:00