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

22881 Commits

Author SHA1 Message Date
Michaël Zasso
f5db04dcbd workers: add test for messagePort.onmessage
PR-URL: https://github.com/nodejs/node/pull/21510
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-29 11:45:19 -07:00
Weijia Wang
ebf5b58bec workers: replace message types string by constants
This change can prevent typos and redundant strings in code.

PR-URL: https://github.com/nodejs/node/pull/21537
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-29 19:40:21 +08:00
Hugo Josefson
d6397afbac doc: fix typo in fs.md
Fixes simple typo of `excludiing` to `excluding`.

PR-URL: https://github.com/nodejs/node/pull/21579
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-06-29 01:23:47 +03:00
Gerhard Stoebich
4218573095 doc: add DataView to appropriate crypto methods
crypto.scrypt(), crypto.scryptSync(),
crypto.pbkdf2(), and crypto.pbkdf2Sync()
support also DataView like most other crypto APIs.

PR-URL: https://github.com/nodejs/node/pull/21549
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-28 21:33:42 +03:00
cjihrig
2a875c3c6f
src: add null check to GetCategoryGroupEnabled()
The input to this function shouldn't be null, and callers are
not equipped to deal with a nullptr return value. Change the
nullptr return to a CHECK_NOT_NULL(). Also fix the indentation
of the function.

PR-URL: https://github.com/nodejs/node/pull/21545
Fixes: https://github.com/nodejs/node/issues/19991
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-06-28 11:51:33 -04:00
GauthamBanasandra
026d279aca
inspector: use js_app.html as the landing page for chrome devtools
As of this commit in chromium -
https://chromium-review.googlesource.com/c/chromium/src/+/905450
a new landing page (js_app.html) has been added and inspector.html
has been made as the fallback page.

Another motivation for this patch is the following bug in
chromium -
https://bugs.chromium.org/p/chromium/issues/detail?id=846642
due to which, source maps won't get applied with inspector.html,
but works with js_app.html

In order to maintain compatibility, this patch adds a URL
"devtoolsFrontendUrlCompat" to the response of /json/list REST API
so that those using Chrome browsers older than 66.0.3345.0
could use this to open DevTools.

PR-URL: https://github.com/nodejs/node/pull/21385
Refs: https://bugs.chromium.org/p/chromium/issues/detail?id=846642
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/905450
Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-06-28 09:24:02 -03:00
Vse Mozhet Byt
3d04e6c9a5 doc: fix some typos in deprecations.md and vm.md
PR-URL: https://github.com/nodejs/node/pull/21569
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
2018-06-28 09:50:00 +03:00
Teddy Katz
80496a5570
util: add inspect suffix to BigInt64Array elements
This commit updates `util.inspect` to add an `n` suffix to BigInts that
appear in BigInt64Arrays. BigInts are formatted with an `n` suffix in
most cases, but this did not occur in BigInt64Arrays due to an apparent
oversight where the implementation of `inspect` for typed arrays assumed
that all typed array elements are numbers.

PR-URL: https://github.com/nodejs/node/pull/21499
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
2018-06-27 19:04:55 -07:00
Gus Caplan
dcb371ff1f
per_context: add warning to Atomics.wake
PR-URL: https://github.com/nodejs/node/pull/21518
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-06-27 17:11:26 -05:00
Gus Caplan
d13cdd9c48
src: move context bootstrap to js
PR-URL: https://github.com/nodejs/node/pull/21518
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-06-27 17:11:19 -05:00
Vse Mozhet Byt
759809f674 test: skip non-doc files in test-make-doc checks
PR-URL: https://github.com/nodejs/node/pull/21531
Fixes: https://github.com/nodejs/node/issues/21519
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-06-27 23:13:40 +03:00
Joonas Rouhiainen
1f6adff12c doc: fix function name in process.md
setUncaughtExceptionCapture -> setUncaughtExceptionCaptureCallback

process.setUncaughtExceptionCaptureCallback and its docs were originally
added in https://github.com/nodejs/node/pull/17159

PR-URL: https://github.com/nodejs/node/pull/21523
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-06-27 20:49:45 +03:00
Charmander
449f73b7ff doc: separate unrelated info about child_process.exec()
“Never pass unsanitized user input to this function” is followed by a
code example with `bad_file`, but they aren’t related. Avoid confusion
by moving the example and giving `bad_file` a more specific name.

PR-URL: https://github.com/nodejs/node/pull/21516
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-06-27 20:39:22 +03:00
Victor Belozyorov
02fd93d91a doc: fix code example and formatting in crypto.md
PR-URL: https://github.com/nodejs/node/pull/21500
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-06-27 20:33:27 +03:00
cjihrig
7ff50f9e9c
fs: undeprecate lchown()
uv_fs_lchown() exists, as of libuv 1.21.0. fs.lchown() can now
be undeprecated. This commit also adds tests, as there were
none.

PR-URL: https://github.com/nodejs/node/pull/21498
Fixes: https://github.com/nodejs/node/issues/19868
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
2018-06-27 11:37:17 -04:00
Joyee Cheung
4750ce26f2
build: speed up startup with V8 code cache
This patch speeds up the startup time and reduce the startup memory
footprint by using V8 code cache when comiling builtin modules.

The current approach is demonstrated in the `with-code-cache`
Makefile target (no corresponding Windows target at the moment).

1. Build the binary normally (`src/node_code_cache_stub.cc` is used),
  by now `internalBinding('code_cache')` is an empty object
2. Run `tools/generate_code_cache.js` with the binary, which generates
  the code caches by reading source code of builtin modules off source
  code exposed by `require('internal/bootstrap/cache').builtinSource`
  and then generate a C++ file containing static char arrays of the
  code cache, using a format similar to `node_javascript.cc`
3. Run `configure` with the `--code-cache-path` option so that
  the newly generated C++ file will be used when compiling the
  new binary. The generated C++ file will put the cache into
  the `internalBinding('code_cache')` object with the module
  ids as keys
4. The new binary tries to read the code cache from
  `internalBinding('code_cache')` and use it to compile
  builtin modules. If the cache is used, it will put the id
  into `require('internal/bootstrap/cache').compiledWithCache`
  for bookkeeping, otherwise the id will be pushed into
  `require('internal/bootstrap/cache').compiledWithoutCache`

This patch also added tests that verify the code cache is
generated and used when compiling builtin modules.

The binary with code cache:

- Is ~1MB bigger than the binary without code cahe
- Consumes ~1MB less memory during start up
- Starts up about 60% faster

PR-URL: https://github.com/nodejs/node/pull/21405
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
2018-06-27 21:11:31 +08:00
Bartosz Sosnowski
7c452845b8 build, win: make LTCG optional
Disables Link Time Code Generation by default. Adds ‘ltcg’ vcbuild
option to enable it. LTCG will be used by default by release and CI
builds.

PR-URL: https://github.com/nodejs/node/pull/21186
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-06-27 11:00:56 +02:00
itaysabato
8d33bbf168 worker: support relative paths
This commit adds support for relative paths in Worker.
Paths are relative to the current working directory.

PR-URL: https://github.com/nodejs/node/pull/21407
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-06-27 10:38:01 +03:00
Daniel Bevenius
8326bea6c2 test: use aliases for smart pointers in fixture
PR-URL: https://github.com/nodejs/node/pull/21419
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-06-27 05:19:56 +02:00
Daniel Bevenius
d6f7a32570 test: make cctest fixture use node::NewIsolate
This commit updates the gtest fixture to use node::NewIsolate instead of
creating a new V8 Isolate using v8::Isolate::New.

The motivation for this is that without calling node::NewIsolate the
various callbacks set on the isolate, for example AddMessageListener,
SetFatalErrorHandler etc, would not get set. I don't think this is the
expected behaviour and I ran into this when writing a new cctest.

PR-URL: https://github.com/nodejs/node/pull/21419
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-06-27 05:19:30 +02:00
Gus Caplan
4f67c6f667
vm: add Script.createCodeCache()
PR-URL: https://github.com/nodejs/node/pull/20300
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
2018-06-26 16:38:13 -05:00
Keita Akutsu
a9d9d7689d
test: add some test cases for validateOffsetLengthWrite
PR-URL: https://github.com/nodejs/node/pull/21195
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-06-26 19:35:31 +02:00
Jo Colina
467a307986
doc: updated docs to include --experimental-worker flag
Updated worker-threads.md, cli.md and node.1 to include
--experimental-worker flag

PR-URL: https://github.com/nodejs/node/pull/21461
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-06-26 19:15:11 +02:00
Bartosz Sosnowski
4dece043ba win, build: generate .sln only when necessary
When generating sln, store flags passed to configure. Next time, if
node.sln exists and configure flags match those stored, skip building
.sln files.

Adds projgen vcbuild option to force .sln regeneration.

PR-URL: https://github.com/nodejs/node/pull/21284
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-26 19:07:27 +02:00
Timothy Gu
8836a0d780
inspector: add debugging for WebSocket messages
PR-URL: https://github.com/nodejs/node/pull/21473
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-25 23:18:11 -04:00
Timothy Gu
65f617314d
src: start annotating native code side effect
PR-URL: https://github.com/nodejs/node/pull/21458
Refs: https://github.com/nodejs/node/issues/20977
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-25 23:15:35 -04:00
Timothy Gu
cd8adfaf98
build: improve Travis CI settings
Remove macOS-specific steps, and reduce warnings due to compilation with
clang.

PR-URL: https://github.com/nodejs/node/pull/21459
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.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-06-25 21:56:05 -04:00
Benjamin Coe
ba4f5e9bb9
build: fail on instrumentation errors
nyc was silently failing to instrument new language features,
resulting in a failure to instrument console.js.

Refs: https://github.com/nodejs/node/issues/20952
PR-URL: https://github.com/nodejs/node/pull/21071
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Rebecca Turner <me@re-becca.org>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-06-25 16:28:27 -07:00
Benjamin Coe
198c872990
doc: add bcoe as collaborator
PR-URL: https://github.com/nodejs/node/pull/21536
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-06-25 16:20:18 -07:00
Matheus Marchini
fc45b16e0f
deps: fix gypi sysroot settings on V8
On Node.js v8.x, gn will pass a sysroot parameter to clang to use a
downloaded sysroot files while running `make test-v8`. Recently,
chromium build tools switched to use Debian sid sysroot files instead of
Debian jessie. This patch updates our V8 GYP files to conform with those
changes.

Ref: https://github.com/nodejs/node/issues/21433

PR-URL: https://github.com/nodejs/node/pull/21494
Refs: https://github.com/nodejs/node/issues/21433
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-06-25 15:05:21 -07:00
Ben Noordhuis
19fe5299d3 crypto: fix UB in computing max message size
Before this commit it computed `(1<<(8*(15-iv_len)))-1` for `iv_len>=11`
and that reduces to `(1<<32)-1` for `iv_len==11`.  Left-shifting past
the sign bit and overflowing a signed integral type are both undefined
behaviors.

This commit switches to fixed values and restricts the `iv_len==11`
case to `INT_MAX`, as was already the case for all `iv_len<=10`.

PR-URL: https://github.com/nodejs/node/pull/21462
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-06-25 23:45:14 +02:00
Myles Borins
8b4af64f50
deps: float fix on node-gyp in npm tree
This is a fix for filenames that have spaces which currently breaks
node-gyp. npm has not yet updated the dependency to the latest version
in the mean time we should land this as a patch

PR-URL: https://github.com/nodejs/node/pull/21448
Refs: https://github.com/nodejs/node-gyp/pull/1436
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
2018-06-25 16:02:46 -04:00
Shivang Saxena
95205a6125 doc: clarify setServers() methods in dns.md
Added a note that that clarifies the fact that setServers() does not
check subsequent servers when the first one produces a NOTFOUND error.

PR-URL: https://github.com/nodejs/node/pull/21469
Refs: https://github.com/nodejs/node/issues/21391
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-25 21:03:21 +03:00
Gerhard Stoebich
8132413166
doc: Improve doc for Http2 headers object
Add more details regarding processing and data type of incoming
headers in Http2.

PR-URL: https://github.com/nodejs/node/pull/21296
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2018-06-24 23:57:20 -07:00
Rod Vagg
831821bcf5
deps: float 0c27d793 from openssl (ECDSA blinding)
Pending OpenSSL 1.1.0i release.

Refs: https://www.nccgroup.trust/us/our-research/technical-advisory-return-of-the-hidden-number-problem/
PR-URL: https://github.com/nodejs/node/pull/21345
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
Upstream: https://github.com/openssl/openssl/commit/0c27d793

Original commit message:
    Add blinding to an ECDSA signature

    Keegan Ryan (NCC Group) has demonstrated a side channel attack on an
    ECDSA signature operation. During signing the signer calculates:

    s:= k^-1 * (m + r * priv_key) mod order

    The addition operation above provides a sufficient signal for a
    flush+reload attack to derive the private key given sufficient signature
    operations.

    As a mitigation (based on a suggestion from Keegan) we add blinding to
    the operation so that:

    s := k^-1 * blind^-1 (blind * m + blind * r * priv_key) mod order

    Since this attack is a localhost side channel only no CVE is assigned.

    Reviewed-by: Rich Salz <rsalz@openssl.org>
2018-06-24 23:27:12 -07:00
Michaël Zasso
c7c52127ec
doc: update AUTHORS list
PR-URL: https://github.com/nodejs/node/pull/21468
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.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-06-24 23:14:38 -07:00
Ruben Bridgewater
b26506b95f
util: recover from maximum call stack size
Using util.inspect should still return values in case the maximum
call stack size is reached. This is important to inspect linked
lists and similar.

PR-URL: https://github.com/nodejs/node/pull/20725
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 23:11:52 -07:00
Bartosz Sosnowski
43a2091187
win, build: fix building on 32-bit machines
Fixes: https://github.com/nodejs/node/issues/21402

PR-URL: https://github.com/nodejs/node/pull/21437
Fixes: https://github.com/nodejs/node/issues/21402
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-06-24 23:06:24 -07:00
Anna Henningsen
018d6186a7
src: add native debugging code to workers
Now that we have better native debugging utilities in core,
let’s use them :)

PR-URL: https://github.com/nodejs/node/pull/21423
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-06-24 23:04:55 -07:00
Bartosz Sosnowski
c403eeb7fd
build: build addons in parallel on Windows
Port https://github.com/nodejs/node/pull/21155 to vcbuild.bat

PR-URL: https://github.com/nodejs/node/pull/21403
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-06-24 22:56:10 -07:00
Anna Henningsen
15c627f185
http2: track memory allocated by nghttp2
Provide a custom memory allocator for nghttp2, and track
memory allocated by the library with it.

This makes the used-memory-per-session estimate more
accurate, and allows us to track memory leaks either
in nghttp2 itself or, more likely, through faulty
usage on our end.

It also allows us to make the per-session memory limit
more accurate in the future; currently, we are not
handling this in an ideal way, and instead let nghttp2
allocate what it wants, even if that goes over our limit.

PR-URL: https://github.com/nodejs/node/pull/21374
Refs: https://github.com/nodejs/node/pull/21373
Refs: https://github.com/nodejs/node/pull/21336
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-06-24 22:54:49 -07:00
Anatoli Papirovski
bfcf5b01bb
src: remove tick_info->has_thrown
This is no longer necessary in the only place it was used (timers).

PR-URL: https://github.com/nodejs/node/pull/20894
Fixes: https://github.com/nodejs/node/issues/10154
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-06-24 21:35:11 -07:00
Anatoli Papirovski
2930bd1317
src: refactor timers to remove TimerWrap
Refactor Timers to behave more similarly to Immediates by having
a single uv_timer_t handle which is stored on the Environment.

No longer expose timers in a public binding and instead make
it part of the internalBinding.

PR-URL: https://github.com/nodejs/node/pull/20894
Fixes: https://github.com/nodejs/node/issues/10154
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-06-24 21:35:05 -07:00
Anatoli Papirovski
6f63f8d730
test: remove outdated, non-functioning test
The timers directory test, utilizing FakeTime, has not worked in
quite a while and is not truly testing Node.js behaviour. If a
similar test is necessary it would be better suited to libuv
on which Node.js relies for timers functionality.

PR-URL: https://github.com/nodejs/node/pull/20894
Fixes: https://github.com/nodejs/node/issues/10154
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-06-24 21:34:59 -07:00
Rich Trott
1e7ff81e47 doc: update LICENSE file
Running `license-builder.sh` seems to indicate that there have been some
license changes that have not been propagated to our LICENSE file yet.
Here they are.

PR-URL: https://github.com/nodejs/node/pull/21472
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2018-06-24 20:41:58 -07:00
cjihrig
537a4baa44
deps: upgrade to libuv 1.21.0
Notable changes:

- Building via cmake is now supported.
  PR-URL: https://github.com/libuv/libuv/pull/1850
- Stricter checks have been added to prevent watching the same
  file descriptor multiple times.
  PR-URL: https://github.com/libuv/libuv/pull/1851
  Refs: https://github.com/nodejs/node/issues/3604
- An IPC deadlock on Windows has been fixed.
  PR-URL: https://github.com/libuv/libuv/pull/1843
  Fixes: https://github.com/nodejs/node/issues/9706
  Fixes: https://github.com/nodejs/node/issues/7657
- uv_fs_lchown() has been added.
  PR-URL: https://github.com/libuv/libuv/pull/1826
  Refs: https://github.com/nodejs/node/issues/19868
- uv_fs_copyfile() sets errno on error.
  PR-URL: https://github.com/libuv/libuv/pull/1881
  Fixes: https://github.com/nodejs/node/issues/21329
- uv_fs_fchmod() supports -A files on Windows.
  PR-URL: https://github.com/libuv/libuv/pull/1819
  Refs: https://github.com/nodejs/node/issues/12803

PR-URL: https://github.com/nodejs/node/pull/21466
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 20:54:34 -04:00
Santiago Gimeno
49e5f0a10f
test: fix test-net-socket-constructor
So it doesn't fail when creating a socket whose `fd` is already
being watched. Test that functionality now inside a cluster
worker.

Refs: https://github.com/libuv/libuv/pull/1851
Refs: https://github.com/libuv/libuv/issues/1897
PR-URL: https://github.com/nodejs/node/pull/21466
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 20:54:08 -04:00
cjihrig
cb261c8648
process: avoid using the same fd for ipc and stdio
There is already a check in place to prevent stdin and the IPC
channel from sharing a file descriptor. This commit adds a
similar check to stdout and stderr.

Refs: https://github.com/libuv/libuv/pull/1851
Refs: https://github.com/libuv/libuv/issues/1897
PR-URL: https://github.com/nodejs/node/pull/21466
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 20:53:46 -04:00
Timothy Gu
6396574cde
crypto: remove outdated comment
PR-URL: https://github.com/nodejs/node/pull/21511
Fixes: https://github.com/nodejs/node/issues/21488
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-06-24 18:02:10 -04:00
Vse Mozhet Byt
28100bbe6d doc: fix sort in sections, lists, tables of dns.md
`dns.resolveAny()`, `dnsPromises.resolveAny()`,
`dns.setServers()`, `dnsPromises.setServers()`
were out of ABC order in some places.

PR-URL: https://github.com/nodejs/node/pull/21505
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-06-24 23:49:45 +03:00