Commit Graph
24713 Commits
Author SHA1 Message Date
leeight b7b08d1009 https: add missing localPort while create socket
In `_tls_wrap.js` while calling `socket.connect` the `localPort` was
missing, restore it.

PR-URL: https://github.com/nodejs/node/pull/24554
Fixes: https://github.com/nodejs/node/issues/24543
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-16 22:14:43 +01:00
himself65 cb0fc6520a events: onceWrapper returns target value
PR-URL: https://github.com/nodejs/node/pull/25818
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-04-16 22:14:34 +01:00
gengjiawen 32b83eaf38 http2: refactor deprecated method in core.js
PR-URL: https://github.com/nodejs/node/pull/26275
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-04-16 22:14:22 +01:00
gengjiawen 0bff833df9 src: remove unused struct in test_inspector_socket.cc
PR-URL: https://github.com/nodejs/node/pull/26284
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-16 22:14:11 +01:00
Juan José Arboleda ee9694668b test: improve code coverage in timers
PR-URL: https://github.com/nodejs/node/pull/26310
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-16 22:14:01 +01:00
Ruben Bridgewater 5249a22704 benchmark: refactor path benchmarks
So far the benchmarks created a highly specialized function which
would inline exactly to the input. This changes it to provide a
more realistic view to actual input by changing the input on each
iteration. That prevents the function to be to specific.

It also reduces the number of iterations the benchmarks are run to
reduce the overall runtime. A microbenchmark should already show a
significant difference with lower iterations, otherwise the
significance for real world applications is only limited.

PR-URL: https://github.com/nodejs/node/pull/26359
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-16 22:13:39 +01:00
Michael Dawson b450ee28e3 doc: fix up N-API support matrix
The support matrix was out of date. Update
with current status.

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

PR-URL: https://github.com/nodejs/node/pull/26377
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-16 22:04:47 +01:00
Rich Trott 60880d79a5 test: remove flaky designation for test_threadsafe_function
The test_threadsafe_function doesn't seem to be flaky anymore on
Windows. Optimistically removing the flaky designation in the relevant
status file.

Refs: https://github.com/nodejs/node/issues/23621#issuecomment-468938980

PR-URL: https://github.com/nodejs/node/pull/26403
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-16 22:04:46 +01:00
Pavel Feldman 481929653e tools: roll inspector_protocol to f67ec5
Fixes: https://github.com/nodejs/node/issues/25808

PR-URL: https://github.com/nodejs/node/pull/26303
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-16 21:59:31 +01:00
Jon Kunkee 680ef36675 win,build: update Windows build documentation
PR-URL: https://github.com/nodejs/node/pull/25995
Reviewed-By: João Reis <reis@janeasystems.com>
2019-04-16 21:59:10 +01:00
Jon Kunkee fa74b3eb03 win,build: scope NASM warning to only x64 and x86
PR-URL: https://github.com/nodejs/node/pull/25995
Reviewed-By: João Reis <reis@janeasystems.com>
2019-04-16 21:58:50 +01:00
Jon Kunkee 7e89684b8c win,build: add ARM64 sections to common.gypi
PR-URL: https://github.com/nodejs/node/pull/25995
Reviewed-By: João Reis <reis@janeasystems.com>
2019-04-16 21:58:43 +01:00
Jon Kunkee 103635c23b win,build: add ARM64 support to vcbuild.bat
PR-URL: https://github.com/nodejs/node/pull/25995
Reviewed-By: João Reis <reis@janeasystems.com>
2019-04-16 21:58:33 +01:00
Jon Kunkee a762907f8e win,build: add arbitrary and binlog options
This change adds a 'msbuild_arg' option to vcbuild.bat that can be used
to pass arbitrary flags to MSBuild.

It also adds a 'binlog' flag as a shortcut 'msbuild_arg' option to
enable binary logging to `%config%\node.binlog`. This is especially
convenient when debugging changes to the build system.

In the process of developing this change, the idea of adding 'setlocal'
to the beginning of the script was rejected since other scripts in this
repo rely on the exported environment variables. This change adds a
note describing this.

PR-URL: https://github.com/nodejs/node/pull/25994
Reviewed-By: João Reis <reis@janeasystems.com>
2019-04-16 21:58:23 +01:00
Sagi Tsofan cc25f22094 http2: improve compatibility with http/1
When using the compatibility API the connection header is from now on
ignored instead of throwing an `ERR_HTTP2_INVALID_CONNECTION_HEADERS`
error.
This logs a warning in such case to notify the user about the ignored
header.

PR-URL: https://github.com/nodejs/node/pull/23908
Fixes: https://github.com/nodejs/node/issues/23748
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-16 21:23:05 +01:00
Jeremy Apthorp 281eb0f928 src: extra-semi warning in node_platform.h
https://clang.llvm.org/docs/DiagnosticsReference.html#wextra-semi

PR-URL: https://github.com/nodejs/node/pull/26330
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-16 21:23:05 +01:00
ZYSzys 0fa3a512c1 src: reduce to simple const char* in OptionsParser
> A lot of the `std::string` usage here could be reduced
  to simple `const char*`s if it's reasonable to expect the values to be
  known at compile-time.

So this commit uses `const char*` to replace most of `std::string` in
`OptionsParser`.

PR-URL: https://github.com/nodejs/node/pull/26297
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-16 21:23:05 +01:00
Juan José Arboleda 6d4731e46e test: improve test coverage in perf_hooks
PR-URL: https://github.com/nodejs/node/pull/26290
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-16 21:23:05 +01:00
ZYSzys 7d6afb3dbf test: remove duplicated buffer negative allocation test
PR-URL: https://github.com/nodejs/node/pull/26160
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2019-04-16 21:23:05 +01:00
Ben Noordhuis 66ca795028 inspector: print all listening addresses
Some hostnames have multiple interfaces. Before this commit, the
inspector only printed the first one. Now, it prints them all.

No test. I can't think of a reliable way to test this on the CI matrix.

PR-URL: https://github.com/nodejs/node/pull/26008
Fixes: https://github.com/nodejs/node/issues/13772
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-16 21:23:04 +01:00
Ruben Bridgewater dcf1310351 test: only inspect on failure
The inspection was done in all cases so far and that's not necessary.
Therefore this changed this behavior to only inspect the input on
failure cases.

PR-URL: https://github.com/nodejs/node/pull/26360
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-04-16 21:10:13 +01:00
Rich Trott 3ff7c631a6 doc: edit deprecation identifier info in Collaborator Guide
Edit the deprecation identifier material in the Collaborator Guide for
simplicity and clarity.

PR-URL: https://github.com/nodejs/node/pull/26372
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-04-16 21:08:19 +01:00
Juan José Arboleda 44fd3a2fce src: remove already elevated Isolate namespce
PR-URL: https://github.com/nodejs/node/pull/26294
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-04-16 21:08:07 +01:00
Rich Trott 416aa6e4e7 tools: update extend to 3.0.2
Update `extend` to 3.0.2 as 3.0.1 is susceptible to a low-severity
security issue.

Refs: https://snyk.io/vuln/npm:extend:20180424

PR-URL: https://github.com/nodejs/node/pull/26392
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-04-16 21:07:17 +01:00
Rich Trott d4a8769b31 tools: remove unneeded .gitignore entries
Remove entries from `.gitignore` that are already covered by the generic
`.*` entry on line 2 of the .gitignore file.

PR-URL: https://github.com/nodejs/node/pull/26370
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-16 20:53:32 +01:00
Anna Henningsen 5cd96b367b src: avoid race condition in tracing code
`json_trace_writer_` is protected by `stream_mutex_`,
but one access to it was not guarded by a lock on said mutex.

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

PR-URL: https://github.com/nodejs/node/pull/25624
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-04-16 20:24:52 +01:00
Rich Trott a87c605e1c test: remove s_client from test-tls-ci-reneg-attack
Rewrite test-tls-ci-reneg-attack to use tls.renegotiate() instead of
external (and potentially unpredictable/quirky/buggy) s_client.

Refs: https://github.com/nodejs/node/pull/25676#issuecomment-457307881

PR-URL: https://github.com/nodejs/node/pull/25700
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-04-16 20:24:13 +01:00
Rich Trott 3fab8be211 test: replace Google servers with localhost
Replace Google DNS servers with 127.0.0.1 in
test-dns-setserver-when-querying.

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

PR-URL: https://github.com/nodejs/node/pull/25694
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-04-16 20:22:56 +01:00
gengjiawen 452b6aad5a src: remove redundant cast in PipeWrap::Fchmod
PR-URL: https://github.com/nodejs/node/pull/26242
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-16 20:01:42 +01:00
Thomas Leah 8d22048756 doc: update LICENSE file
Update the `LICENSE` file by running `tools/license-builder.sh`.

Backport-PR-URL: https://github.com/nodejs/node/pull/27131
PR-URL: https://github.com/nodejs/node/pull/24898
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-04-16 14:46:28 +01:00
Yann Hamon 277271c4a9 http: send connection: close when closing conn
HTTP/1.1 mandates connections which do not support keep-alive and
close the connection send the connection: close header, see
https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.10

This page also provides more information:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Connection

I understand that HTTP/1.1 defaults to keep-alive - and that the
Connection: close header is required when closing a connection.

This adds the Connection: close header in the 400 responses
sent on client errors.

Backport-PR-URL: https://github.com/nodejs/node/pull/26627
PR-URL: https://github.com/nodejs/node/pull/26467
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-04-16 14:29:20 +01:00
Anna Henningsen 55d3be7e9e src: simplify native immediate by using v8::Global
Unlike `node::Persistent`, `v8::Global` has move semantics and
can be used directly in STL containers.

PR-URL: https://github.com/nodejs/node/pull/26254
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-16 11:28:05 +01:00
Ouyang Yadong 4f60364201 http2: add Http2Stream.bufferSize
This commit adds `bufferSize` for `Http2Stream`.

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

PR-URL: https://github.com/nodejs/node/pull/23711
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-08 22:38:28 +01:00
Benjamin Chen d9d31e8d51 vm: allow cachedData to also be TypedArray|DataView
PR-URL: https://github.com/nodejs/node/pull/22921
Refs: https://github.com/nodejs/node/issues/1826
Refs: https://github.com/nodejs/node/pull/22921#issuecomment-422350213
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-08 22:18:09 +01:00
Geoffrey Booth 0dc6f03873 module: support multi-dot file extension
Support multi-dot file extensions like '.coffee.md' in Module.load.

PR-URL: https://github.com/nodejs/node/pull/23416
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
2019-04-08 17:11:19 +01:00
Ouyang Yadong 43f41beff2 lib: enable TypedArray and DataView for the v8 module
This commit allow passing `TypedArray` and `DataView` to:
- v8.deserialize()
- new v8.Deserializer()
- v8.serializer.writeRawBytes()

PR-URL: https://github.com/nodejs/node/pull/23953
Refs: https://github.com/nodejs/node/issues/1826
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-08 17:10:55 +01:00
Mathias Buus a1b253a416 stream: add auto-destroy mode
PR-URL: https://github.com/nodejs/node/pull/22795
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2019-04-08 17:10:23 +01:00
Ben Noordhuis 3516a2735f fs: default open/openSync flags argument to 'r'
Make fs.open() and fs.openSync() more economic to use by making the
flags argument optional. You can now write:

    fs.open(file, cb)

Instead of the more verbose:

    fs.open(file, 'r', cb)

This idiom is already supported by functions like fs.readFile().

PR-URL: https://github.com/nodejs/node/pull/23767
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Signed-off-by: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2019-04-08 16:22:40 +01:00
Raoof bda45a5cfe lib: add escapeCodeTimeout as an option to createInterface
PR-URL: https://github.com/nodejs/node/pull/19780
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Signed-off-by: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2019-04-08 16:22:40 +01:00
Shelley Vohr c2dab8e642 src,test: add public wrapper for Environment::GetCurrent
PR-URL: https://github.com/nodejs/node/pull/23676
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Signed-off-by: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2019-04-08 16:14:49 +01:00
Rich Trott 7cceecfd52 test: increase error information in test-cli-syntax-*
If there is an error, but not the error code the test expects, display
more information about the error.

PR-URL: https://github.com/nodejs/node/pull/25021
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2019-04-08 15:44:32 +01:00
Rich Trott 92792f04be test: split test-cli-syntax into multiple tests
Split test-cli-syntax into multiple files to improve reliability and/or
isolate unreliable test cases.

Move test cases back to parallel as appropriate.

PR-URL: https://github.com/nodejs/node/pull/24922
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2019-04-08 15:43:50 +01:00
Charles Samborski ca4f0dbec1 url: support LF, CR and TAB in pathToFileURL
Fixes: https://github.com/nodejs/node/issues/23696

PR-URL: https://github.com/nodejs/node/pull/23720
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-08 15:15:29 +01:00
bcoe 23ea7ee64b deps: v8, backport coverage fixes
Pulls in patches from V8 (52e2b5, 512175, aac2f8, 9365d09, 2d08967)
which address a variety of coverage bugs, bringing Node v10 coverage
to parity with Node v11.

  Original commit message:

    [coverage] Extend SourceRangeAstVisitor for throw statements

    The SourceRangeAstVisitor has custom logic for blocks ending with a
    statement that has a continuation range. In these cases, the trailing
    continuation is removed which makes the reported coverage ranges a bit
    nicer.

    throw Error('foo') consists of an ExpressionStatement, with a
    Throw expression stored within the statement. The source range itself
    is stored with the Throw, not the statement.

    We now properly extract the correct AST node for trailing throw
    statements.

  R=jgruber@chromium.org, neis@chromium.org, yangguo@chromium.org

  Bug: v8:8691
  Change-Id: Ibcbab79fbe54719a8993045040349c863b139011
  Reviewed-on: https://chromium-review.googlesource.com/c/1480632
  Commit-Queue: Georg Neis <neis@chromium.org>
  Reviewed-by: Georg Neis <neis@chromium.org>
  Reviewed-by: Jakob Gruber <jgruber@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#59936}

  Refs: v8/v8@2d08967

  Original commit message:

    [coverage] Rework continuation counter handling

    This changes a few bits about how continuation counters are handled.

    It introduces a new mechanism that allows removal of a continuation
    range after it has been created. If coverage is enabled, we run a first
    post-processing pass on the AST immediately after parsing, which
    removes problematic continuation ranges in two situations:

    1. nested continuation counters - only the outermost stays alive.
    2. trailing continuation counters within a block-like structure are
        removed if the containing structure itself has a continuation.

  R=bmeurer@chromium.org, jgruber@chromium.org, yangguo@chromium.org

  Bug: v8:8381, v8:8539
  Change-Id: I6bcaea5060d8c481d7bae099f6db9f993cc30ee3
  Reviewed-on: https://chromium-review.googlesource.com/c/1339119
  Reviewed-by: Yang Guo <yangguo@chromium.org>
  Reviewed-by: Leszek Swirski <leszeks@chromium.org>
  Reviewed-by: Georg Neis <neis@chromium.org>
  Commit-Queue: Jakob Gruber <jgruber@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#58443}

  Refs: v8/v8@9365d09

  Original commit message:

    [coverage] Filter out singleton ranges that alias full ranges

    Block coverage is based on a system of ranges that can either have
    both a start and end position, or only a start position (so-called
    singleton ranges). When formatting coverage information, singletons
    are expanded until the end of the immediate full parent range. E.g.
    in:

    {0, 10}  // Full range.
    {5, -1}  // Singleton range.

    the singleton range is expanded to {5, 10}.

    Singletons are produced mostly for continuation counters that track
    whether we execute past a specific language construct.

    Unfortunately, continuation counters can turn up in spots that confuse
    our post-processing. For example:

    if (true) { ... block1 ... } else { ... block2 ... }

    If block1 produces a continuation counter, it could end up with the
    same start position as the else-branch counter. Since we merge
    identical blocks, the else-branch could incorrectly end up with an
    execution count of one.

    We need to avoid merging such cases. A full range should always take
    precedence over a singleton range; a singleton range should never
    expand to completely fill a full range. An additional post-processing
    pass ensures this.

    Bug: v8:8237
    Change-Id: Idb3ec7b2feddc0585313810b9c8be1e9f4ec64bf
    Reviewed-on: https://chromium-review.googlesource.com/c/1273095
    Reviewed-by: Georg Neis <neis@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#56531}

  Refs: v8/v8@aac2f8c

  Original commit message:

    [ast] Introduce ZonePtrList<T> typedef for ZoneList<T*>.

    This is a preliminary step before changing the way we store zone pointers
    in the zones.

    Bug: v8:7903, v8:7754
    Change-Id: I1e1af1823766c888ee0f8fe190f205f5b7e21973
    Reviewed-on: https://chromium-review.googlesource.com/1118887
    Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
    Reviewed-by: Marja Hölttä <marja@chromium.org>
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54193}

  Refs: v8/v8@512175a

  Original commit message:

    [explicit isolates] Replace every Handle(T*) in parsing/

    Replace all but one Handle<T*>(T*) calls with ones that explicitly pass
    in an Isolate.

    Requires plumbing Isolate* through several Parser functions which
    previously avoided it because of worries about accessing the heap off
    the main thread. In all off-main-thread cases, isolate will be nullptr
    and every such function asserts with:
    DCHECK_EQ(parsing_on_main_thread_, isolate != nullptr);

    Also deletes unused function ParseInfo::ReopenHandlesInNewHandleScope.

    Bug: v8:7786
    Change-Id: I3dd9c49dcde49fdbcb684ba73f47a30d00fc495e
    Reviewed-on: https://chromium-review.googlesource.com/1087272
    Commit-Queue: Dan Elphick <delphick@chromium.org>
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53820}

  Refs: v8/v8@52e2b5a

PR-URL: https://github.com/nodejs/node/pull/26579
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2019-04-08 14:19:28 +01:00
Anthony Tuininga 2643801d9d n-api: improve performance creating strings
Improve performance creating strings using N-API by ensuring that the
strings are not internalized.

Added test cases for latin-1 and utf-16 strings.

PR-URL: https://github.com/nodejs/node/pull/26439
Fixes: https://github.com/nodejs/node/issues/26437
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-05 11:17:01 -04:00
Sam Roberts b0b73fa561 deps: update archs files for OpenSSL-1.1.1a
`cd deps/openssl/config; make` updates all archs dependant files.

Backport-PR-URL: https://github.com/nodejs/node/pull/26270
PR-URL: https://github.com/nodejs/node/pull/25381
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
2019-03-28 20:28:59 +00:00
Sam Roberts fe8e07ddd9 test: assert on client and server side seperately
This gets better coverage of the codes, and is more explicit. It also
works around ordering differences in the errors produced by openssl.
The approach was tested with 1.1.0 and 1.1.1, as well as TLSv1.2 vs
TLSv1.3. OpenSSL 1.1.0 is relevant when node is built against a shared
openssl.

Backport-PR-URL: https://github.com/nodejs/node/pull/26270
PR-URL: https://github.com/nodejs/node/pull/25381
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
2019-03-28 20:28:58 +00:00
Shigeki Ohtsu 8dd8033519 tls: workaround handshakedone in renegotiation
`SSL_CB_HANDSHAKE_START` and `SSL_CB_HANDSHAKE_DONE` are called
sending HelloRequest in OpenSSL-1.1.1.
We need to check whether this is in a renegotiation state or not.

Backport-PR-URL: https://github.com/nodejs/node/pull/26270
PR-URL: https://github.com/nodejs/node/pull/25381
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
2019-03-28 20:28:58 +00:00
Shigeki Ohtsu 56441a0900 deps: fix for non GNU assembler in AIX
AIX has own assembler not GNU as that does not support --noexecstack.

Backport-PR-URL: https://github.com/nodejs/node/pull/26270
PR-URL: https://github.com/nodejs/node/pull/25381
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
2019-03-28 20:28:58 +00:00
Shigeki Ohtsu e05eb3e041 doc: fix assembler requirement for OpenSSL-1.1.1
Add new requirements of assembler version for AVX-512 support
in OpenSSL-1.1.1.

Backport-PR-URL: https://github.com/nodejs/node/pull/26270
PR-URL: https://github.com/nodejs/node/pull/25381
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
2019-03-28 20:28:58 +00:00