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

22431 Commits

Author SHA1 Message Date
Gus Caplan
064057b7ad
util: support inspecting namespaces of unevaluated modules
PR-URL: https://github.com/nodejs/node/pull/20782
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-18 20:40:41 -05:00
Anna Henningsen
70cc5da0f1
lib,src: use V8 API for collection inspection
Use a new public V8 API for inspecting weak collections and
collection iterators, rather than using V8-internal functions
to achieve this. This currently comes with a slight modification of
the output for inspecting iterators generated by `Set().entries()`.

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

PR-URL: https://github.com/nodejs/node/pull/20719
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-19 01:02:14 +02:00
Anna Henningsen
143a2f8d67
deps: cherry-pick ff0a9793334 from upstream V8
Original commit message:

    [api] Expose PreviewEntries as public API

    Turn `debug::EntriesPreview` into a public API.
    This is a straightforward approach to addressing
    nodejs/node#20409
    (not relying on functionality behind `--allow-natives-syntax`)
    in Node.js.

Refs: ff0a979333

PR-URL: https://github.com/nodejs/node/pull/20719
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-19 01:02:13 +02:00
Ali Ijaz Sheikh
3ff723f940 src: trace_events: support for metadata events
Add support for metadata events. At this point they are added to the
main buffer. Emit a metadata event for the main thread.

PR-URL: https://github.com/nodejs/node/pull/20757
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-05-18 10:42:35 -07:00
Anna Henningsen
42a4a60645
test: improve assertion in test-performance
PR-URL: https://github.com/nodejs/node/pull/20809
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-05-18 16:16:07 +02:00
Bartosz Sosnowski
30ad0793ec
doc: describe using multiple link-module on win
Current description seems to suggest that only one linked-module can be
provided. This modifies the example to show that multiple
inked-modules can be used.

PR-URL: https://github.com/nodejs/node/pull/20774
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-18 16:15:38 +02:00
Benjamin Coe
d5a117c73f
build: use nyc's merge command
a 'merge' command has recently been added to nyc, eliminating the need
for the istanbul-merge library.

PR-URL: https://github.com/nodejs/node/pull/20760
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-18 16:14:47 +02:00
Ruben Bridgewater
2c42999f7e
assert: fix EOL issue in messages on Windows
PR-URL: https://github.com/nodejs/node/pull/20754
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-18 16:09:00 +02:00
Myles Borins
3424f71cc9
deps: patch V8 to 6.6.346.32
PR-URL: https://github.com/nodejs/node/pull/20748
Refs: https://github.com/v8/v8/compare/6.6.346.31...6.6.346.32
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-05-18 16:07:36 +02:00
Vse Mozhet Byt
59f71ea4dd
doc: fix typo in COLLABORATOR_GUIDE.md
PR-URL: https://github.com/nodejs/node/pull/20742
Refs: https://github.com/nodejs/node/pull/20740
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-18 16:06:31 +02:00
Rich Trott
40469b4f6a
tools: update prohibited-strings md linting
Update to remark-lint-prohibited-strings 1.0.3 to avoid false positives
with GitHub team names which must be lowercased no matter what our
prohibited-strings rules say about a particular string.

PR-URL: https://github.com/nodejs/node/pull/20742
Refs: https://github.com/nodejs/node/pull/20740
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-18 16:05:07 +02:00
Ruben Bridgewater
dd9d32f94c
test: add eslint rule to verify assertion input
The input for `assert.deepStrictEqual` and similar expect the actual
input first and the expected input as second argument. This verifies
that this is actually done correct in our tests.

This is important so the possible error message actually makes sense.

PR-URL: https://github.com/nodejs/node/pull/20718
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-18 15:59:40 +02:00
Shobhit Chittora
eeb1d514ad
repl: changes ctrl+u to delete from cursor to line start
Closes: #20145

PR-URL: https://github.com/nodejs/node/pull/20686
Fixes: https://github.com/nodejs/node/issues/20145
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-18 15:56:14 +02:00
ohbarye
0c852a1795
console: .table fall back to logging for function too
According to the console.table documentation, it reads that it "falls
back to just logging the argument if it can’t be parsed as tabular."

But it doesn't fall back when I give a function as its first argument.
It logs an empty table. This is fixes by this commit.

PR-URL: https://github.com/nodejs/node/pull/20681
Fixes: https://github.com/nodejs/node/issues/20679
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-18 15:53:06 +02:00
Dan Kang
60cc8ff096
src: remove 2nd undefined argument in node_file.cc
In the document for fs, there are several functions that state "No
arguments other than a possible exception are given to the completion
callback." (ex> fs.access, fs.chmod, fs.close, ..)

But, the functions are invoking the callback with two parameters (err,
undefined)

It causes problems in using several API like
[async.waterfall](https://caolan.github.io/async/docs.html#waterfall).

PR-URL: https://github.com/nodejs/node/pull/20629
Fixes: https://github.com/nodejs/node/issues/20335
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-18 15:50:42 +02:00
monkingxue
9aa4ec43fc
repl: add friendly tips about how to exit repl
Imitate python repl, when the user enters 'exit' or 'quit',
no longer prompt 'Reference Error', but
prompts 'To exit, press ^D or type .exit'.
If the user defines variables named 'exit' or 'quit' ,
only the value of the variables are output

PR-URL: https://github.com/nodejs/node/pull/20617
Fixes: https://github.com/nodejs/node/issues/19021
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-18 15:47:17 +02:00
Ruben Bridgewater
9deca876bb
test: add loaded modules test
This makes sure there is no regression by switching to loading
eagerly.

PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:27:29 +02:00
Ruben Bridgewater
c07e85123e
net: lazy load dns
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:27:29 +02:00
Ruben Bridgewater
bf46c371eb
stream: lazy load end-of-stream
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:27:29 +02:00
Ruben Bridgewater
5dad1e45e9
console: lazy load cli
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:27:29 +02:00
Ruben Bridgewater
3b5a7a3e19
stream: lazy load ReadableAsyncIterator
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:27:29 +02:00
Ruben Bridgewater
1a8aa8cac7
lib: do not call performance hooks
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:32:14 +02:00
Ruben Bridgewater
a3a14082fc
async_hooks: lazy loading for startup performance
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:32:10 +02:00
Ruben Bridgewater
17d95ea1f0
assert,util: lazy load comparison functions
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:27:29 +02:00
Ruben Bridgewater
e0c71ca3eb
tools: stricter eslint rule for globals
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:27:29 +02:00
Ruben Bridgewater
7afb73715f
lib: remove unnecessary require
The call to url was not necessary since the `url` module itself was
already taking care of this.

PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:32:05 +02:00
Ruben Bridgewater
dc1737881e
lib: use capital letters in comments
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:27:29 +02:00
Ruben Bridgewater
7cc303415c
lib: lazy loaded
This makes sure the async hooks and more is only loaded in case it
is actually necessary.

PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:31:57 +02:00
Ruben Bridgewater
b4be89ffc1
cluster: remove obsolete array allocation
The array was only used to create a key. Instead of allocating that
first, just directly create the necessary string.

PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:27:29 +02:00
Ruben Bridgewater
6550013b73
lib: lazy load necessary loaders
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:31:52 +02:00
Ruben Bridgewater
6468e3d15a
lib: only load inspector stuff if necessary
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:27:29 +02:00
Ruben Bridgewater
c2179c530b
dns: lazy loaded
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:25:42 +02:00
Ruben Bridgewater
d478e52fe0
os: lazy loaded
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:25:41 +02:00
Ruben Bridgewater
2bfba0dd33
readline: lazy loaded
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:25:40 +02:00
Ruben Bridgewater
d0bb9b1205
querystring: lazy loaded
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:25:39 +02:00
Ruben Bridgewater
f4f8b22f7d
string_decoder: lazy loaded
PR-URL: https://github.com/nodejs/node/pull/20567
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-05-18 15:25:38 +02:00
Ayush Gupta
11892b0b64
url: introduce URL_FLAGS_IS_DEFAULT_SCHEME_PORT flag
Introduce `URL_FLAGS_IS_DEFAULT_SCHEME_PORT` flag which is retured
when the parser detects that the port passed is the default port
for that scheme.

PR-URL: https://github.com/nodejs/node/pull/20479
Fixes: https://github.com/nodejs/node/issues/20465
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-18 15:24:05 +02:00
Daniel Bevenius
9b24be1340
stream: refactor getHighWaterMark in state.js
This commit aims to reduce some code duplication in state.js

PR-URL: https://github.com/nodejs/node/pull/20415
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-18 15:22:42 +02:00
killagu
7d81f5d143
child_process: fix exec set stdout.setEncoding
cp.exec decide to use `_stdout`(_stdout is string) or
`Buffer.concat(_stdout)`(_stdout is buffer array) by options.encoding.
but std(out|err) encoding can be changed. If encoding is changed to
not null, `_stdout` will become string, and `Buffer.concat(_stdout)`
will throw TypeError. This patch will fix it, use
options.encoding and `std(out|err)._readableState.encoding`.

PR-URL: https://github.com/nodejs/node/pull/18976
Fixes: https://github.com/nodejs/node/issues/18969
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-18 15:20:28 +02:00
Ben Noordhuis
913a78936d build: export openssl TLSv1 methods again
Upstream deprecated them and moved them into categories of their own.
Add those categories to the export list.  Node.js doesn't use them but
some add-ons do.

Fixes: https://github.com/nodejs/node/issues/20369
PR-URL: https://github.com/nodejs/node/pull/20712
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-05-18 10:51:01 +02:00
Daniel Bevenius
0419adc771 src: add override to ThreadPool methods in zlib
Currently the following compiler warnings are generated:
../src/node_zlib.cc:222:8:
warning: 'DoThreadPoolWork' overrides a member function but is not marked
      'override' [-Winconsistent-missing-override]
  void DoThreadPoolWork() {
       ^
../src/node_internals.h:509:16: note: overridden virtual function is here
  virtual void DoThreadPoolWork() = 0;
               ^
../src/node_zlib.cc:357:8: warning:
'AfterThreadPoolWork' overrides a member function but is not marked
      'override' [-Winconsistent-missing-override]
  void AfterThreadPoolWork(int status) {
       ^
../src/node_internals.h:510:16:
note: overridden virtual function is here
  virtual void AfterThreadPoolWork(int status) = 0;
               ^

This commit adds the override specifier to the methods to silence the
warnings.

PR-URL: https://github.com/nodejs/node/pull/20769
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-05-18 06:17:16 +02:00
James M Snell
fa0cac51b9 fs: lazy load createPromise/promiseResolve
PR-URL: https://github.com/nodejs/node/pull/20766
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-17 20:18:51 -07:00
James M Snell
11aea015ef fs: lazy load the promises impl
PR-URL: https://github.com/nodejs/node/pull/20766
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-17 20:18:43 -07:00
James M Snell
1d3759a33c fs: consistent constants use and cleanup
* only require('buffer') once
* use constants directly
* fix incorrect constants

PR-URL: https://github.com/nodejs/node/pull/20765
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ron Korving <ron@ronkorving.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-17 20:14:05 -07:00
Alhadis
c8e7f8f77e doc: fix linter warnings and typos in manpage
Refs: https://github.com/nodejs/node/pull/19911

PR-URL: https://github.com/nodejs/node/pull/20741
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-17 13:40:11 -07:00
Vse Mozhet Byt
e6b7f0ef0c tools, doc: wrap manpage links in code elements
PR-URL: https://github.com/nodejs/node/pull/20785
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-05-17 23:31:50 +03:00
Eugene Ostroukhov
47bdc716f8 inspector: add a "NodeTracing" domain support
This change adds a new inspector domain for receiving Node tracing
data.
  1. Node.js now can extend Inspector protocol with new domains with
     the API defined in the src/inspector/node_protocol.pdl.
  2. Plumbing code will be generated at the build time. /json/protocol
     HTTP endpoint returns both V8 and Node.js inspector protocol.
  3. "NodeTracing" domain was introduced. It is based on the Chrome
     "Tracing" domain.

PR-URL: https://github.com/nodejs/node/pull/20608
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-05-17 13:14:26 -07:00
Eugene Ostroukhov
5248401174 deps: cherry-pick 23652c5f from upstream V8
Original commit message:
    Custom tag for the traceEvents array

    This API will be used by Node.js to provide output compatible with
    Chrome devtools.

    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I265495f8af39bfc78d7fdbe43ac308f0920e817d
    Reviewed-on: https://chromium-review.googlesource.com/1044491
    Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
    Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
    Commit-Queue: Eugene Ostroukhov <eostroukhov@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53041}

PR-URL: https://github.com/nodejs/node/pull/20608
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-05-17 13:14:26 -07:00
Rich Trott
c7831bb206 doc: sort references in ASCII order
The references in the COLLABORATOR_GUIDE appear to be in no particular
order. Sort in ASCII order.

PR-URL: https://github.com/nodejs/node/pull/20790
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-05-17 11:41:31 -07:00
Ali Ijaz Sheikh
0ebbd764a8 deps: V8: cherry-pick b49206d from upstream
Original commit message:
  ThreadDataTable: Change global linked list to per-Isolate hash map.

  For use cases with a large number of threads or a large number of
  isolates (or both), ThreadDataTable can be a major performance
  bottleneck due to O(n) lookup time of the linked list. Switching to a
  hash map reduces this to O(1).

  Example 1: Sandstorm.io, a Node.js app that utilizes "fibers", was
  observed spending the majority of CPU time iterating over the
  ThreadDataTable.
  See: https://sandstorm.io/news/2016-09-30-fiber-bomb-debugging-story

  Example 2: Cloudflare's Workers engine, a high-multi-tenancy web
  server framework built on V8 (but not Node), creates large numbers of
  threads and isolates per-process. It saw a 34x improvement in
  throughput when we applied this patch.

  Cloudflare has been using a patch in production since the Worker
  launch which replaces the linked list with a hash map -- but still
  global.

  This commit builds on that but goes further and creates a separate
  hash map and mutex for each isolate, with the table being a member of
  the Isolate class. This avoids any globals and should reduce lock
  contention.

  Bug: v8:5338
  Change-Id: If0d11509afb2e043b888c376e36d3463db931b47
  Reviewed-on: https://chromium-review.googlesource.com/1014407
  Reviewed-by: Yang Guo <yangguo@chromium.org>
  Commit-Queue: Yang Guo <yangguo@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#52753}

PR-URL: https://github.com/nodejs/node/pull/20727
Ref: https://github.com/nodejs/node/issues/20083

Refs: https://github.com/nodejs/node/issues/20083
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-17 11:23:36 -07:00