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

28381 Commits

Author SHA1 Message Date
Shelley Vohr
f120e6d817 test: --force-context-aware cli flag
PR-URL: https://github.com/nodejs/node/pull/29631
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-09-24 22:49:35 -07:00
Shelley Vohr
3c17f160e3 src: add buildflag to force context-aware addons
PR-URL: https://github.com/nodejs/node/pull/29631
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-09-24 22:49:33 -07:00
Ruben Bridgewater
5058c7f138 doc: document that iv may be null when using createCipheriv()
This adds `null` to the supported types of the `iv` option when
using `crypto.createCipheriv()`.

PR-URL: https://github.com/nodejs/node/pull/29684
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-24 22:06:56 -07:00
Anna Henningsen
81fee01310 doc: update AUTHORS list
PR-URL: https://github.com/nodejs/node/pull/29608
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-24 21:51:01 -07:00
Anna Henningsen
f9d026dbb7 tools: make mailmap processing for author list case-insensitive
This is to accommodate Myles Borins otherwise ending up with
multiple entries due to different casing in the email 🙂

PR-URL: https://github.com/nodejs/node/pull/29608
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-24 21:50:59 -07:00
Anna Henningsen
7899a96e66 worker: keep allocators for transferred SAB instances alive longer
Keep the `ArrayBuffer::Allocator` behind a `SharedArrayBuffer` instance
alive for at least as long as the receiving Isolate lives, if the
`SharedArrayBuffer` instance isn’t already destroyed through GC.

This is to work around the fact that V8 7.9 started refactoring
how backing stores for `SharedArrayBuffer` instances work, changing
the timing of the call that releases the backing store to be
during Isolate disposal.

The flag added to the test is optional but helps verify that the
backing store is actually free’d at the end of the test and does not
leak memory.

Fixes: https://github.com/nodejs/node-v8/issues/115
PR-URL: https://github.com/nodejs/node/pull/29637
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-09-24 21:35:40 -07:00
Joyee Cheung
355f2ad466 src: try showing stack traces when process._fatalException is not set
So that the stack trace of errors shown in internal code run during
bootstrap (before process._fatalException is set) can be printed.

PR-URL: https://github.com/nodejs/node/pull/29624
Refs: https://github.com/nodejs/node/pull/29593
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-09-24 21:24:00 -07:00
Joyee Cheung
b2634238d8
src: disconnect inspector before exiting out of fatal exception
So that coverage, .etc are properly written in case of a normal
fatal exception.

PR-URL: https://github.com/nodejs/node/pull/29611
Fixes: https://github.com/nodejs/node/issues/29570
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Ben Coe <bencoe@gmail.com>
2019-09-24 09:55:00 -07:00
Matteo Collina
c5f5f84a33 events: improve performance of EventEmitter.emit
This restore some performance we lost when we introduced primordialias.
Improvements are up to +100%.

PR-URL: https://github.com/nodejs/node/pull/29633
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-09-24 09:12:59 +02:00
Ruben Bridgewater
1fa403762c console,util: fix missing recursion end while inspecting prototypes
This makes sure prototypes won't be inspected infinitely for some
obscure object creations. The depth is now taken into account and
the recursion ends when the depth limit is reached.

PR-URL: https://github.com/nodejs/node/pull/29647
Fixes: https://github.com/nodejs/node/issues/29646
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
2019-09-23 23:42:10 -07:00
Anton Gerasimov
0c32ca96c8 tls: add option to override signature algorithms
Passes the list down to SSL_CTX_set1_sigalgs_list.

Option to get the list of shared signature algorithms
from a TLS socket added as well for testing.

Signed-off-by: Anton Gerasimov <agerasimov@twilio.com>

PR-URL: https://github.com/nodejs/node/pull/29598
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-09-23 23:32:45 -07:00
Chetan Karande
e078e482c5 stream: add test for multiple .push(null)
PR-URL: https://github.com/nodejs/node/pull/29645
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-09-24 06:43:03 +02:00
Chetan Karande
fed05cc414 stream: cleanup use of internal ended state
PR-URL: https://github.com/nodejs/node/pull/29645
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-09-24 06:42:56 +02:00
Christian Clauss
06929956f9 tools: cleanup getnodeversion.py for readability
PR-URL: https://github.com/nodejs/node/pull/29648
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-09-23 12:06:47 -07:00
Michaël Zasso
cbd3a1cb77
deps: patch V8 to 7.7.299.11
Refs: https://github.com/v8/v8/compare/7.7.299.10...7.7.299.11

PR-URL: https://github.com/nodejs/node/pull/29628
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-09-23 15:25:22 +02:00
Shobhit Chittora
fdd5d4ad4a
bootstrap: add exception handling for profiler bootstrap
Add exception handling for the case when profile is
not bootstrapped when coverage is enabled.

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

PR-URL: https://github.com/nodejs/node/pull/29552
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-09-23 12:04:20 +02:00
Jeremy Apthorp
4ef3ccbbe0 src: perform check before running in runMicrotasks()
This is a continuation of https://github.com/nodejs/node/pull/29434,
rewriting the last remaining call to RunMicrotasks.

PR-URL: https://github.com/nodejs/node/pull/29581
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-09-22 19:09:48 -07:00
Robert Nagy
d398b8f02b stream: make _write() optional when _writev() is implemented
When implementing _writev, _write should be optional.

PR-URL: https://github.com/nodejs/node/pull/29639
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-22 19:07:35 -07:00
Juan José Arboleda
68d6c4c661 doc: add code example to process.throwDeprecation property
PR-URL: https://github.com/nodejs/node/pull/29495
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-22 18:30:06 -07:00
Robert Nagy
e573c39b88 http: don't emit 'data' after 'error'
PR-URL: https://github.com/nodejs/node/pull/28711
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-22 18:08:20 -07:00
Robert Nagy
1665a9330c stream: apply special logic in removeListener for readable.off()
We have special logic in removeListener() which must apply
to off() as well.

PR-URL: https://github.com/nodejs/node/pull/29486
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-22 18:05:54 -07:00
Jenia
34a61d5630 events: add support for EventTarget in once
PR-URL: https://github.com/nodejs/node/pull/29498
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
2019-09-22 17:48:21 -07:00
Anna Henningsen
54c4139efd src: discard remaining foreground tasks on platform shutdown
While V8 itself should not have any remaining tasks on the queue
during platform shutdown, our inspector implementation may do so.
Thus, the checks verifying that no tasks are queued at that point
make some of the inspector tasks flaky.
Remove the checks and replace them by explicitly destroying all
tasks that are left.

Refs: https://github.com/nodejs/node/pull/25653
Refs: https://github.com/nodejs/node/pull/28870#issuecomment-531908090

PR-URL: https://github.com/nodejs/node/pull/29587
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
2019-09-22 17:00:43 -07:00
Vse Mozhet Byt
ab9b8e73eb doc: fix some signatures of .end() methods
In `.end()` methods, an optional `encoding` parameter makes sense
only if the `data` (`chunk`) parameter is provided.

PR-URL: https://github.com/nodejs/node/pull/29615
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-09-22 16:58:54 -07:00
Joyee Cheung
54a0553a9f build: do not indent assignments in Makefile
Indented assignment in a Makefile can be interpreted
as a command in e.g. GNU Make 3.81 which results in the
following error:

```
make: CPPLINT_QUIET: No such file or directory
```

PR-URL: https://github.com/nodejs/node/pull/29623
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-09-22 16:57:31 -07:00
Robert Nagy
aa32e13968 stream: do not flush destroyed writable
It doesn't make much sense to flush a stream which has been destroyed.

PR-URL: https://github.com/nodejs/node/pull/29028
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-09-22 16:25:50 -07:00
Robert Nagy
95d6ad67bf fs: remove unnecessary argument check
Writable already assures that only Buffer's are passed to _write. Also
this is not the "correct" way to handle errors inside _write.

PR-URL: https://github.com/nodejs/node/pull/29043
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-09-22 16:23:02 -07:00
Jeremiah Senkpiel
a861b84d5d timers: set _destroyed even if there are no destroy-hooks
Required for other potential changes.

This should make it so we can always just check _destroyed to
check if a timer has been ended.

PR-URL: https://github.com/nodejs/node/pull/29595
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-22 16:19:26 -07:00
Robert Nagy
ec390b63a1 stream: do not call _read() after destroy()
PR-URL: https://github.com/nodejs/node/pull/29491
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2019-09-22 15:55:15 -07:00
Robert Nagy
8709a408d2 stream: use more accurate end-of-stream writable and readable detection
The value of stream.readable and stream.writable should not
be used to detect whether a stream is Writable or Readable.

Refs: https://github.com/nodejs/node/issues/29395
PR-URL: https://github.com/nodejs/node/pull/29409
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-22 15:47:40 -07:00
Maledong
872d803faf doc: remove the suffix number of the anchor link
Remove the number '11' as the suffix anchor id for the 'Developer's
Certificate of Origin 1.1'.

PR-URL: https://github.com/nodejs/node/pull/29468
Refs: https://github.com/nodejs/node/pull/6257
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-22 13:35:18 -07:00
Shelley Vohr
ef2e9e359c crypto: use BoringSSL-compatible flag getter
PR-URL: https://github.com/nodejs/node/pull/29604
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2019-09-22 13:05:12 -07:00
Robert Nagy
4c40a640ea doc: explain stream.finished cleanup
PR-URL: https://github.com/nodejs/node/pull/28935
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-09-22 13:05:12 -07:00
Marian Rusnak
b82ffd9526 doc: fix require call for spawn() in code example
PR-URL: https://github.com/nodejs/node/pull/29621
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-22 10:52:17 -07:00
Robert Nagy
1fceccb4cf doc: make minor improvements to stream.md
PR-URL: https://github.com/nodejs/node/pull/28970
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-09-22 08:40:08 -07:00
Robert Nagy
bd02775af8 stream: optimize creation
PR-URL: https://github.com/nodejs/node/pull/29135
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-09-22 21:46:58 +08:00
Gus Caplan
8235ffd786
console: skip/strip %c formatting
Fixes: https://github.com/nodejs/node/issues/29605
Refs: https://console.spec.whatwg.org
PR-URL: https://github.com/nodejs/node/pull/29606
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-09-22 00:42:22 +02:00
Benjamin Coe
8f06773a8c
process: initial SourceMap support via NODE_V8_COVERAGE
PR-URL: https://github.com/nodejs/node/pull/28960
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2019-09-22 00:39:41 +02:00
Anna Henningsen
e74f30894c
src: fix closing weak HandleWraps on GC
In 0af62aae07, this was overlooked, with it
possibly leading to hard crashes.

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

PR-URL: https://github.com/nodejs/node/pull/29640
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-09-21 13:53:25 -07:00
Benjamin Coe
f634f37be0
deps: V8: cherry-pick deac757
Original commit message:

    [debugger] Fix code coverage for break/return inside switch-case

    Case statements have a list of statements associated with them, but are
    not blocks, and were hence not fixed-up correctly for code coverage.
    This CL also applies the fix-up to the "body" of case statements,
    in this way removing ranges reported as uncovered between the final
    break/return in a case and the next case (or end of function).

    Drive-by: Add optional pretty printing to code coverage test results.

    Change-Id: I5f4002d4e17b7253ed516d99f7c389ab2264be10
    Bug: v8:9705
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1798426
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Reviewed-by: Jakob Gruber <jgruber@chromium.org>
    Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#63719}

Refs: deac757bc7

PR-URL: https://github.com/nodejs/node/pull/29626
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-09-21 10:59:35 -07:00
Michael Dawson
9f830f37da build: update minimum Xcode version for macOS
Update the minimum Xcode version for macOS to 10. We'll
need this level to incorporate future V8 versions.

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

PR-URL: https://github.com/nodejs/node/pull/29622
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2019-09-20 15:01:33 -04:00
Anna Henningsen
ac59dc42ed
http: remove legacy parser
Remove the legacy `http_parser` implementation as a dependency
and all code that uses it in favor of llhttp, given that the latter
has been the default for all of Node 12 with no outstanding issues.

PR-URL: https://github.com/nodejs/node/pull/29589
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-09-20 20:18:35 +02:00
Robert Nagy
ba3be578d8 stream: don't emit finish on error
After 'error' only 'close' should be emitted.

PR-URL: https://github.com/nodejs/node/pull/28979
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-09-20 11:22:31 +02:00
Thomas
dc7c7b83be
deps: patch V8 to 7.7.299.10
Refs: https://github.com/v8/v8/compare/7.7.299.8...7.7.299.10

PR-URL: https://github.com/nodejs/node/pull/29472
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-09-20 10:23:07 +02:00
Guy Bedford
4396bebfe1 module: error for CJS .js load within type: module
PR-URL: https://github.com/nodejs/node/pull/29492
Reviewed-By: Jan Krems <jan.krems@gmail.com>
2019-09-19 15:24:50 -07:00
Lucas Holmquist
ac41959922 repl: convert var to let and const
Refs: https://github.com/nodejs/node/pull/29535

This PR replaces the instances of var with let/const.

PR-URL: https://github.com/nodejs/node/pull/29575
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-09-18 17:04:55 -07:00
Sam Roberts
d36cef7496 deps: V8: cherry-pick 35c6d4d
Original commit message:

    Make code generator python3.7 compatible (async keyword).

    Change-Id: Ifcd8b8cb1de60a007c7bbd4564d7869e83cb7109

Fixes: https://github.com/nodejs/node/issues/29548
Refs:
- https://github.com/nodejs/node/issues/29548#issuecomment-531717985
- https://github.com/nodejs/node/pull/29520
- https://github.com/nodejs/node/pull/29340
- https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1781351
- 35c6d4d0d8

PR-URL: https://github.com/nodejs/node/pull/29585
Refs: https://github.com/nodejs/node/pull/29520
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-09-18 23:26:25 +02:00
Anna Henningsen
5664791790
src: use libuv to get env vars
This allows us to remove OS-dependent code.

                                                           confidence improvement accuracy (*)    (**)   (***)
     process/bench-env.js operation='delete' n=1000000                    3.57 %      ±10.86% ±14.46% ±18.85%
     process/bench-env.js operation='enumerate' n=1000000        ***    -14.06 %       ±7.46%  ±9.94% ±12.96%
     process/bench-env.js operation='get' n=1000000                      -7.97 %      ±11.80% ±15.70% ±20.45%
     process/bench-env.js operation='query' n=1000000                    -1.32 %       ±8.38% ±11.17% ±14.58%
     process/bench-env.js operation='set' n=1000000                      -0.98 %       ±9.63% ±12.81% ±16.68%

The drop in enumeration performance is likely due to the large
number of extra allocations that libuv performs. However, enumerating
process.env should generally not be a hot path in most applications.

PR-URL: https://github.com/nodejs/node/pull/29188
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-09-18 23:24:46 +02:00
Anna Henningsen
82ebcb37d6
benchmark: improve process.env benchmarks
Benchmark different types of operations and make results comparable
by normalizing process.env for enumeartion.

PR-URL: https://github.com/nodejs/node/pull/29188
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-09-18 23:24:42 +02:00
Gus Caplan
1ec4154e50
src: re-delete Atomics.wake
PR-URL: https://github.com/nodejs/node/pull/29586
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2019-09-18 16:09:20 -05:00