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

26359 Commits

Author SHA1 Message Date
Ruben Bridgewater
e96e3f9eb0
test: remove redundant common.mustCall
All calls verify the cb is called, thus using `common.mustCall` is
not required inside of this function.

PR-URL: https://github.com/nodejs/node/pull/26738
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-23 02:55:56 +01:00
Ruben Bridgewater
3fe1e80896
lib: validate Error.captureStackTrace() calls
This adds a custom eslint rule to verify that
`Error.captureStackTrace()` is only called if necessary. In most
cases the helper function should be used instead.

PR-URL: https://github.com/nodejs/node/pull/26738
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-23 02:55:55 +01:00
Ruben Bridgewater
bfbce289c3
lib: refactor Error.captureStackTrace() usage
When using `Errors.captureStackFrames` the error's stack property
is set again. This adds a helper function that wraps this functionality
in a simple API that does not only set the stack including the `code`
property but it also improves the performance to create the error.
The helper works for thrown errors and errors returned from wrapped
functions in case they are Node.js core errors.

PR-URL: https://github.com/nodejs/node/pull/26738
Fixes: https://github.com/nodejs/node/issues/26669
Fixes: https://github.com/nodejs/node/issues/20253
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-23 02:55:54 +01:00
Ruben Bridgewater
1ed3c54ecb
errors: update error name
This updates all Node.js errors by removing the `code` being part
of the `name` property. Instead, the name is just changed once on
instantiation, the stack is accessed to create the stack as expected
and then the `name` property is set back to it's original form.

PR-URL: https://github.com/nodejs/node/pull/26738
Fixes: https://github.com/nodejs/node/issues/26669
Fixes: https://github.com/nodejs/node/issues/20253
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-23 02:55:54 +01:00
gengjiawen
c757cb1b98 src: apply clang-tidy readability-delete-null-pointer
PR-URL: https://github.com/nodejs/node/pull/26813
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-03-22 18:35:43 -04:00
gengjiawen
86e0296631 src: apply clang-tidy performance-faster-string-find
PR-URL: https://github.com/nodejs/node/pull/26812
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-22 18:14:37 -04:00
Rich Trott
7d201c4e70 test: move pummel tls test to sequential
Move test-tls-session-timeout from pummel to sequential. It isn't very
pummel-y and this will result in it being run on our CI more than once a
day. (It broke recently and it would have been caught if it was in
sequential rather than pummel.)

It must be in sequential rather than pummel because it uses
`common.PORT` which can result in test failures if more than one test
uses it at one time in parallel.

PR-URL: https://github.com/nodejs/node/pull/26865
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-22 13:57:24 -07:00
Rich Trott
cc89e68e72 test: fix pummel/test-tls-session-timeout
The test does not work with TLS 1.3 nor should it. Force TLS version
1.2.

While at it, some refactoring:

* refresh the tmp directory in case it doesn't exist!
* add an assert.strictEqual() check on the client return `code` value
  which must be zero
* use arrow functions for callbacks
* add trailing commas for multiline arrays/objects

Fixes: https://github.com/nodejs/node/issues/26839

PR-URL: https://github.com/nodejs/node/pull/26865
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-22 13:57:21 -07:00
Rich Trott
6e9551e1b1 test: complete console.assert() coverage
There is one condition in the `console.assert()` code that is not
tested currently. Add a test to confirm that `console.assert(false)`
does not include a `:` in its output.

PR-URL: https://github.com/nodejs/node/pull/26827
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-22 11:15:39 -07:00
dnlup
91be64b9d3 repl: remove usage of require('util') in repl/history
Use `require('internal/util/debuglog').debuglog` instead of
`require('util').debuglog`.

Refs: https://github.com/nodejs/node/issues/26546

PR-URL: https://github.com/nodejs/node/pull/26819
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-23 00:16:02 +08:00
toshi1127
01a129635c worker: remove usage of require('util')
PR-URL: https://github.com/nodejs/node/pull/26810
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yongsheng Zhang <zyszys98@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>
2019-03-23 00:09:48 +08:00
cjihrig
76387c1c20 src: initialize worker's stack_base_ field
Coverity was complaining that this field was not initialized.

PR-URL: https://github.com/nodejs/node/pull/26739
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-22 09:19:03 +01:00
Rich Trott
ee429e4b2c test: fix test-console-stdio-setters to test setters
test-console-stdio-setters needs to test against the global console in
order to test the setters for the lazy-loaded _stdout and _stderr
properties.

PR-URL: https://github.com/nodejs/node/pull/26796
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-21 22:22:29 -07:00
Richard Lau
41ba699973 build: update configure for Node.js 12
Update supported level of gcc to 6.3.0 and clang to 8.0.0.

Refs: https://github.com/nodejs/node/pull/26714

PR-URL: https://github.com/nodejs/node/pull/26719
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-22 00:50:08 -04:00
Zach Bjornson
0b516fac79 src: use explicit casts to silence conversion warnings
PR-URL: https://github.com/nodejs/node/pull/26766
Ref https://github.com/nodejs/node/issues/26733
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-22 05:47:47 +01:00
toshi1127
382e859afc child_process: reduce internal usage of public require of util
PR-URL: https://github.com/nodejs/node/pull/26769
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-22 12:41:25 +08:00
Richard Lau
db40b4ab32 build: restore running tests on Travis
Restore running tests on Travis once the ccache is populated.

PR-URL: https://github.com/nodejs/node/pull/26720
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-21 21:40:50 -04:00
Richard Lau
ce14a5ef3a build: temporarily don't run tests on Travis
We're hitting the Travis job timeout of 50mins if built with a new
compiler (as there is no ccache). Temporarily disable the running
of tests so the Travis job can complete within the timeout and
populate the ccache.

PR-URL: https://github.com/nodejs/node/pull/26720
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-21 21:40:47 -04:00
Richard Lau
e3340023f3 build: use Xenial and gcc 6 on Travis
PR-URL: https://github.com/nodejs/node/pull/26720
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-21 21:40:42 -04:00
Refael Ackermann
ecf98b0839 build,meta: quiet/pretty make output by default
PR-URL: https://github.com/nodejs/node/pull/26740
Refs: https://github.com/nodejs/node/pull/26252
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-21 20:21:01 -04:00
Anna Henningsen
b05fbaab43
src: add fast path for equal size to Reallocate()
When old and new size match, we can skip the rest of the function,
which makes sense in the case of embedders who do not use Node's
allocator, as that would lead to needlessly allocating and freeing
buffers of identical sizes.

PR-URL: https://github.com/nodejs/node/pull/26573
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-22 00:53:11 +01:00
Beni von Cheni
c97851dcd8
stream: reduce internal usage of public require of util
PR-URL: https://github.com/nodejs/node/pull/26698
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-22 00:48:32 +01:00
Anna Henningsen
d117e41e50
src: do not make Resize(0)’d buffers base nullptr
This fixes issues in which APIs that accept pointers created this way
treat `nullptr` and a zero-length buffer differently.
We already do something similar for our `Malloc()` implementation.

PR-URL: https://github.com/nodejs/node/pull/26731
Fixes: https://github.com/nodejs/node/issues/26514
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-03-22 00:47:15 +01:00
Anna Henningsen
bca23f2ee7
src: only open HandleScope when necessary
PR-URL: https://github.com/nodejs/node/pull/26734
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-03-22 00:45:48 +01:00
Anna Henningsen
d812dbb495
src: refactor thread stopping mechanism
- Follow style guide for naming, e.g. use lower_snake_case
  for simple setters/getters.
- For performance, use atomics instead of a mutex, and inline
  the corresponding getter/setter pair.

PR-URL: https://github.com/nodejs/node/pull/26757
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-03-22 00:44:25 +01:00
Daiki Ihara
de3b164f4f
assert: reduce internal usage of public require of util
PR-URL: https://github.com/nodejs/node/pull/26762
Refs: https://github.com/nodejs/node/issues/26546
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-22 00:42:55 +01:00
Joyee Cheung
245c96e7e5
perf_hooks: load internal/errors eagerly
Since `internal/errors` is loaded by many builtin modules and is
currently the first module loaded during bootstrap, it is
fine to load it eagerly. We just need to make sure
that `internal/errors` itself load other modules lazily.

PR-URL: https://github.com/nodejs/node/pull/26771
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-22 00:41:09 +01:00
Joyee Cheung
d81ea10f66
events: load internal/errors eagerly
Since `internal/errors` is loaded by many builtin modules and is
currently the first module loaded during bootstrap, it is
fine to load it eagerly. We just need to make sure
that `internal/errors` itself load other modules lazily.

PR-URL: https://github.com/nodejs/node/pull/26771
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-22 00:40:57 +01:00
Vladislav Kaminsky
82b3ee776b
repl: check colors with .getColorDepth()
PR-URL: https://github.com/nodejs/node/pull/26261
Fixes: https://github.com/nodejs/node/issues/26187
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2019-03-21 23:34:14 +01:00
Vladislav Kaminsky
d3a62fe7fc
readline: support TERM=dumb
When TERM=dumb and .isTTY=true don't use ANSI escape codes
and ignore all keys, except 'escape', 'return' and 'ctrl-c'.

PR-URL: https://github.com/nodejs/node/pull/26261
Fixes: https://github.com/nodejs/node/issues/26187
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2019-03-21 23:33:55 +01:00
Vladislav Kaminsky
99523758dc
console: don't use ANSI escape codes when TERM=dumb
PR-URL: https://github.com/nodejs/node/pull/26261
Fixes: https://github.com/nodejs/node/issues/26187
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2019-03-21 23:32:59 +01:00
ZYSzys
5f032a7a26
util: extract uncurryThis function for reuse
PR-URL: https://github.com/nodejs/node/pull/23081
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-03-21 23:07:48 +01:00
ZYSzys
20fab5f5d4
util: require isNativeError from internalBinding
PR-URL: https://github.com/nodejs/node/pull/23081
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-03-21 23:07:47 +01:00
Ruben Bridgewater
5a3623af74
assert: validate required arguments
This validates most `assert` functions to verify that the required
arguments are indeed passed to the function.

PR-URL: https://github.com/nodejs/node/pull/26641
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-03-21 22:58:12 +01:00
Ruben Bridgewater
ab3f7afacc
console: fix trace function
A recent refactoring made the slight mistake of calling `trace()`
instead of `this.trace()`.

PR-URL: https://github.com/nodejs/node/pull/26764
Fixes: https://github.com/nodejs/node/issues/26763
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-03-21 22:55:12 +01:00
Hang Jiang
296712602b doc: fix comma of the list in worker_threads.md
PR-URL: https://github.com/nodejs/node/pull/26838
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2019-03-21 23:53:11 +02:00
Ruben Bridgewater
39f4158bc3
lib: move extra properties into error creation
This encapsulates the Node.js errors more by adding extra properties
to an error inside of the function to create the error message instead
of adding the properties at the call site. That simplifies the usage
of our errors and makes sure the expected properties are always set.

PR-URL: https://github.com/nodejs/node/pull/26752
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-21 22:52:08 +01:00
Ruben Bridgewater
df0870dddf
test: remove internal error tests
These tests tested internal functionality in a way that bypassed all
code that could reach these cases. It gives a false feeling of safety
that some code works as intended while there is no guarantee that
it indeed works as it should.

Therefore it seemed best to remove all of these. The only thing that
should be tested is the raw functionality of the internal errors.

PR-URL: https://github.com/nodejs/node/pull/26752
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-21 22:52:07 +01:00
Jesse McCarthy
0622ce6e7f doc: fix changelog date typo
PR-URL: https://github.com/nodejs/node/pull/26831
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2019-03-21 23:36:38 +02:00
Anna Henningsen
96c3224de0
src: remove AddPromiseHook()
Remove this, as the underlying `Isolate::SetPromiseHook()` may be
removed as well in its current form in the future, and `async_hooks`
also serves this use case.

Refs: https://docs.google.com/document/d/1g8OrG5lMIUhRn1zbkutgY83MiTSMx-0NHDs8Bf-nXxM/
Refs: https://github.com/nodejs/node/pull/26529

PR-URL: https://github.com/nodejs/node/pull/26574
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2019-03-21 19:09:45 +01:00
dnlup
1500e5de64 lib: remove usage of require('util')
Remove usage of public require('util') in
`internal/child_process`.

Refs: https://github.com/nodejs/node/issues/26546

PR-URL: https://github.com/nodejs/node/pull/26773
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-03-22 00:07:32 +08:00
Weijia Wang
c8d3a73c8b lib: use Array#includes instead of Array#indexOf
PR-URL: https://github.com/nodejs/node/pull/26732
Refs: https://github.com/nodejs/node/issues/26568
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-03-21 21:38:02 +08:00
Anna Henningsen
1935625df4
src: disallow constructor behaviour for native methods
Disallow constructor behaviour and setting up prototypes
for native methods that are not constructors (i.e. make
them behave like ES6 class methods).

PR-URL: https://github.com/nodejs/node/pull/26700
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-21 12:14:26 +01:00
gengjiawen
11f8024d99 benchmark: replace deprecated and eliminate var in buffer-from.js
PR-URL: https://github.com/nodejs/node/pull/26585
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-03-21 09:09:28 +01:00
Aymen Naghmouchi
4643fd78b2 doc: remove discord community
PR-URL: https://github.com/nodejs/node/pull/26830
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-03-21 00:05:21 -07:00
gengjiawen
f091d4e840 src: apply clang-tidy rule modernize-use-emplace
PR-URL: https://github.com/nodejs/node/pull/26564
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-21 07:23:44 +01:00
Joyee Cheung
f47adfbda5 src: fix DTrace GC callbacks DCHECKs and add cleanup
Use the variant of GC callbacks that takes data to
avoid running into DCHECKs when multiple Environments try to add
the same callback to the same isolate multiple times.
In addition, remove the callbacks in the Environment cleanup hook.

PR-URL: https://github.com/nodejs/node/pull/26742
Fixes: https://github.com/nodejs/node/issues/26736
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-21 05:37:25 +01:00
Luigi Pinca
67c9f424b8 test: refresh tmpdir in child-process-server-close
PR-URL: https://github.com/nodejs/node/pull/26729
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-21 09:37:54 +08:00
Jeremiah Senkpiel
56199ec6af timers: move big impl comment to /internal/
To be paired with the commits from
https://github.com/nodejs/node/pull/26583

Specifically:
1a6fb71f71

PR-URL: https://github.com/nodejs/node/pull/26761
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-20 17:11:32 -07:00
Rich Trott
ba1c5fffaf test: optimize test-http2-large-file
Optimize test-http2-large-file so it only allocates a single buffer.

PR-URL: https://github.com/nodejs/node/pull/26737
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Adrian Estrada <edsadr@gmail.com>
2019-03-20 09:50:52 -07:00